Skip to main content
POST

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
enum<string>
required

AnyFast model ID.

Available options:
deepseek-v4.1-flash
Example:

"deepseek-v4.1-flash"

messages
object[]
required

Conversation messages. Image content is accepted only in user messages.

Minimum array length: 1
thinking
object | null

Thinking mode configuration. Thinking is enabled by default.

reasoning_effort
enum<string>
default:high

Thinking control and effort. none disables thinking; this is a top-level field, separate from thinking.

Available options:
none,
low,
high,
max
max_tokens
integer

Maximum number of generated tokens.

Required range: 1 <= x <= 393216
response_format
object

Use json_object for JSON mode and explicitly request JSON in the prompt.

stop
stream
boolean
default:false

Stream partial message deltas over SSE.

stream_options
object
temperature
number
default:1

Ignored when thinking mode is enabled.

Required range: 0 <= x <= 2
top_p
number
default:1

In thinking mode, values below 0.95 are treated as 0.95; in non-thinking mode the effective value is 1.0.

Required range: 0 <= x <= 1
tools
object[]
tool_choice
Available options:
none,
auto,
required
frequency_penalty
number
default:0

Accepted for compatibility but has no effect in thinking mode.

Required range: -2 <= x <= 2
presence_penalty
number
default:0

Accepted for compatibility but has no effect in thinking mode.

Required range: -2 <= x <= 2
user_id
string

Stable end-user identifier for content safety and cache isolation.

Maximum string length: 512
Pattern: ^[a-zA-Z0-9\-_]+$

Response

Chat completion created

id
string
required
Example:

"chatcmpl-example"

object
enum<string>
required
Available options:
chat.completion
created
integer
required

Unix timestamp in seconds.

model
string
required
Example:

"deepseek-v4.1-flash"

choices
object[]
required
usage
object
required