Skip to main content
POST
Chat Completion

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

Model ID

Available options:
doubao-seed-evolving
Example:

"doubao-seed-evolving"

messages
object[]
required

A list of messages comprising the conversation so far.

Minimum array length: 1
Example:
thinking
object

Controls deep thinking. On by default for Doubao-Seed-2.1.

reasoning_effort
enum<string>
default:high

Controls reasoning length; effective only when thinking is enabled.

Available options:
minimal,
low,
medium,
high
max_tokens
integer
default:65536

The maximum number of tokens to generate (up to 256K).

Required range: 1 <= x <= 262144
temperature
number
default:1

Sampling temperature. Higher values make output more random.

Required range: 0 <= x <= 2
Example:

1

top_p
number
default:1

Nucleus sampling threshold.

Required range: 0 <= x <= 1
stream
boolean
default:false

If true, stream partial message deltas using SSE.

tools
object[]

A list of tools (functions) the model may call.

response_format
object

Output format. Use { "type": "json_object" } for structured JSON output (beta).

stop

Sequences where the model will stop generating further tokens.

Response

Completion generated successfully

id
string
required
Example:

"chatcmpl-abc123"

object
string
required
Example:

"chat.completion"

created
integer
required

Unix timestamp

model
string
required
Example:

"doubao-seed-evolving"

choices
object[]
required
usage
object