Skip to main content
POST
BaseURL: The default BaseURL is https://direct.evolink.ai, which has better support for text models and long-lived connections. https://api.evolink.ai is the primary endpoint for multimodal services and serves as a fallback address for text models.
Only doubao-seed-2-1-lite accepts audio input. Web search is available via Responses or Messages on Seed 2.1 and doubao-seed-evolving. Chat Completions does not offer it.

Authorizations

Authorization
string
header
required

All APIs require Bearer Token authentication

Get API Key:

Visit API Key Management Page to get your API Key

Add to request header:

Body

application/json
model
enum<string>
default:doubao-seed-2-1-pro
required

Choose a model

Seed 2.1 model IDs use a hyphen (2-1). Seed 2.0 IDs use a period (2.0).

Available options:
doubao-seed-2-1-pro,
doubao-seed-2-1-turbo,
doubao-seed-2-1-lite,
doubao-seed-evolving,
doubao-seed-2.0-pro,
doubao-seed-2.0-lite,
doubao-seed-2.0-mini,
doubao-seed-2.0-code
Example:

"doubao-seed-2-1-pro"

messages
object[]
required

Messages for multi-turn conversations. Mix text, images and video. Only doubao-seed-2-1-lite also accepts audio.

Minimum array length: 1
thinking
object

Controls whether the model enables deep thinking mode

stream
boolean
default:false

Whether to stream the response content

  • false: Model generates all content before returning the result at once
  • true: Returns model-generated content incrementally via SSE protocol, ending with a data: [DONE] message. When stream is true, you can set the stream_options field to get token usage statistics
Example:

false

stream_options
object | null

Options for streaming responses. Can be set when stream is true

max_tokens
integer | null
default:4096

Maximum answer tokens. Reasoning is outside this limit and billed as output, so total output can substantially exceed it. To cap both, use max_completion_tokens instead or disable reasoning. The answer ceiling is 256K for Seed 2.1 and doubao-seed-evolving, and 128K for Seed 2.0. Do not combine with max_completion_tokens.

Example:

4096

max_completion_tokens
integer | null

Maximum combined answer and reasoning tokens, from 1 to 65536. Overrides the default max_tokens. The model generates as needed up to this limit. Recommended with reasoning. Do not set both parameters.

Required range: 1 <= x <= 65536
Example:

16384

temperature
number | null
default:1

Sampling temperature, controls output randomness

Note:

  • Value range: [0, 2]
  • Lower values (e.g., 0.2): More deterministic, more focused output
  • Higher values (e.g., 0.8): More random, more creative output
  • A value of 0 means the model only considers the token with the highest log probability
  • It is recommended to adjust only temperature or top_p, not both
Required range: 0 <= x <= 2
Example:

0.7

top_p
number | null
default:0.7

Nucleus sampling probability threshold

Note:

  • Value range: [0, 1]
  • The model considers tokens within the top_p probability mass
  • 0.1 means only considering the top 10% of tokens by probability mass
  • Higher values produce more random output, lower values produce more deterministic output
  • It is recommended to adjust only temperature or top_p, not both
Required range: 0 <= x <= 1
Example:

0.9

stop

The model will stop generating when it encounters the string(s) specified in the stop field. The stop string itself will not be included in the output. Up to 4 strings are supported

Note: Deep thinking models do not support this field

Example:
reasoning_effort
enum<string> | null

Lower reasoning effort can improve speed and reduce reasoning tokens.

Reasoning effort: minimal answers directly, low prioritizes speed, medium balances speed and depth, and high analyzes complex problems in depth.

Seed 2.1 and doubao-seed-evolving default to high. Seed 2.0 defaults to medium. The alias none maps to minimal, and xhigh and max map to high.

Available options:
none,
minimal,
low,
medium,
high,
xhigh,
max
Example:

"medium"

response_format
object

Specify the model response format

Supports three formats: text (default), json_object, json_schema

frequency_penalty
number | null
default:0

Frequency penalty coefficient

Note:

  • Value range: [-2.0, 2.0]
  • Positive values penalize new tokens based on their frequency in the text so far, reducing the likelihood of the model repeating the same content verbatim
Required range: -2 <= x <= 2
Example:

0

presence_penalty
number | null
default:0

Presence penalty coefficient

Note:

  • Value range: [-2.0, 2.0]
  • Positive values penalize new tokens based on whether they have appeared in the text so far, increasing the likelihood of the model talking about new topics
Required range: -2 <= x <= 2
Example:

0

logprobs
boolean | null
default:false

Whether to return log probabilities of output tokens

  • false: Do not return log probability information
  • true: Return log probabilities for each output token in the message content

Note: Deep thinking models do not support this field

top_logprobs
integer | null
default:0

Specify the number of most likely tokens to return at each output token position, each with an associated log probability

  • Value range: [0, 20]
  • Can only be set when logprobs is true

Note: Deep thinking models do not support this field

Required range: 0 <= x <= 20
logit_bias
object | null

Adjust the probability of specified tokens appearing in the model output

Note:

  • Accepts a map where keys are token IDs from the vocabulary and values are bias values
  • Bias value range: [-100, 100]
  • -1 reduces the likelihood of selection, 1 increases the likelihood of selection
  • -100 completely prohibits selection of the token, 100 causes only that token to be selectable

Note: Deep thinking models do not support this field

tools
object[] | null

List of tools the model may request. This endpoint accepts only function tools.

parallel_tool_calls
boolean
default:true

Whether the model response is allowed to contain multiple tool calls for this request

  • true: Allow returning multiple tool calls
  • false: The number of tool calls returned is <= 1
tool_choice

Whether the model response should contain tool calls for this request

String mode:

  • none: Model response does not contain tool calls
  • required: Model response must contain tool calls
  • auto: Model decides whether to include tool calls (default when tools are provided)

Object mode: Specify the scope of tools to be called

Available options:
none,
auto,
required

Response

Chat completion successful

id
string

Unique identifier for this request

Example:

"0217714854126607f5a9cf8ed5b018c76e4ad3dc2810db57ffb50"

model
string

Model used for this request.

Example:

"doubao-seed-2-1-pro"

object
enum<string>

Response type, always chat.completion

Available options:
chat.completion
Example:

"chat.completion"

created
integer

Unix timestamp (in seconds) of when this request was created

Example:

1771485416

choices
object[]

Model output content for this request

usage
object

Token usage for this request