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 Seed 2.1 and doubao-seed-evolving support web_search_20250305. Messages does not accept audio. For audio input with doubao-seed-2-1-lite, use Chat Completions or Responses.

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"

max_tokens
integer
required

Maximum output tokens, including reasoning and the answer. With reasoning enabled, allow at least 1024 tokens. If the budget runs out, stop_reason is max_tokens and the response may contain only reasoning.

Required range: x >= 1
Example:

4096

messages
object[]
required

Send the full message history on each turn. Preserve assistant thinking blocks and their signatures exactly.

Minimum array length: 1
system

System prompt as a string or an array of text blocks.

stream
boolean
default:false

Stream the response as Anthropic SSE events.

thinking
object

Enable or disable reasoning.

output_config
object

Reasoning effort and structured output settings.

temperature
number

Sampling temperature in [0, 2]. Adjust either temperature or top_p.

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

Nucleus sampling probability threshold in [0, 1].

Required range: 0 <= x <= 1
stop_sequences
string[]

Up to four sequences that stop generation. The matched string is omitted. Disable reasoning before using this parameter.

Maximum array length: 4
tools
(Custom function · object | Web search (Seed 2.1 and Evolving only) · object)[]

All Seed models support functions defined with name, description and input_schema. For web search, use type=web_search_20250305 and name=web_search on Seed 2.1 or doubao-seed-evolving. doubao-seed-2.0-mini returns 400 for web search. Other server tools such as web_fetch also return 400. Each search performed is billed at the model’s rate.

tool_choice
object

Tool selection policy. Configure tools first.

Response

Successful response. Streaming requests return an Anthropic SSE event stream.

id
string

Unique identifier for the response

Example:

"0217952345678901234567890abcdef"

type
enum<string>

Always message.

Available options:
message
role
enum<string>

Always assistant.

Available options:
assistant
model
string

Model used for this request.

Example:

"doubao-seed-2-1-pro"

content
(Text · object | Reasoning · object | Tool use · object | Web search call · object | Web search results · object)[]

Generated content blocks. With reasoning enabled, a thinking block usually precedes the text block. Read all blocks with type="text" to obtain the answer.

Example:
stop_reason
enum<string>

Reason generation stopped.

  • end_turn: normal completion
  • max_tokens: token limit reached
  • stop_sequence: stop sequence matched
  • tool_use: the model requested a function call
Available options:
end_turn,
max_tokens,
stop_sequence,
tool_use
Example:

"end_turn"

stop_sequence
string | null

Matched stop sequence, or null if none matched.

usage
object

Token usage statistics