Skip to main content
POST
Chat completions (OpenAI-compatible)

Authorizations

Authorization
string
header
required

OAuth2 access token issued via POST /oauth/token

Body

application/json
model
string
required

Model identifier

Example:

"deepseek-chat"

messages
object[]
required
Minimum array length: 1
stream
boolean
default:false
temperature
number
Required range: 0 <= x <= 2
max_tokens
integer
top_p
number
frequency_penalty
number
presence_penalty
number
stop
tools
object[]

Tool definitions (OpenAI function calling format)

tool_choice
any

Controls tool use behavior

Response

Chat completion response (JSON or SSE stream depending on stream parameter)

id
string
object
string
Example:

"chat.completion"

model
string
choices
object[]
usage
object
balance_remaining
number

Remaining credit balance after this request