Doubao Seed 2.0 - Complete API Reference
- Call Doubao Seed 2.0 series models using OpenAI SDK format
- Synchronous processing mode, real-time response
- Text Chat: Single or multi-turn contextual conversation
- System Prompts: Customize AI role and behavior
- Multimodal Input: Supports text + image + video mixed input
- Deep Thinking: Supports enabling chain-of-thought mode for deep reasoning
- Tool Calling: Function Calling support
- Structured Output: Supports JSON Object / JSON Schema format output
- Quick start? Check the Quick Start Guide
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.Authorizations
##All APIs require Bearer Token authentication##
Get API Key:
Visit the API Key Management Page to get your API Key
Add to request headers:
Authorization: Bearer YOUR_API_KEY
Body
Chat model name
doubao-seed-2.0-pro: Flagship, strongest overall capability, ideal for complex reasoning and high-quality generationdoubao-seed-2.0-lite: Lightweight, faster speed, cost-effectivedoubao-seed-2.0-mini: Ultra-fast, quickest response, suitable for simple tasksdoubao-seed-2.0-code: Code-specialized, optimized for code generation and understanding
doubao-seed-2.0-pro, doubao-seed-2.0-lite, doubao-seed-2.0-mini, doubao-seed-2.0-code "doubao-seed-2.0-pro"
List of conversation messages, supports multi-turn conversation and multimodal input (text, image, video)
1Control whether the model enables deep thinking mode
Different models may vary in support and default values
Whether to stream the response content
false: Model generates all content before returning the result at oncetrue: Returns model-generated content incrementally via SSE protocol, ending with adata: [DONE]message. When stream is true, you can set the stream_options field to get token usage statistics
false
Options for streaming responses. Can be set when stream is true
Maximum length of model response (in tokens)
Note:
- Model response does not include chain-of-thought content (model response = model output - model chain-of-thought)
- Total output token length is also limited by the model's context length
- Cannot be set simultaneously with max_completion_tokens
4096
Controls the maximum output length of the model, including both response and chain-of-thought content (in tokens)
Note:
- Value range: [0, 65536]
- When configured, the default value of max_tokens becomes ineffective; the model outputs content (response and chain-of-thought) as needed until reaching this value
- Cannot be set simultaneously with max_tokens
- Recommended when deep thinking mode is enabled
0 <= x <= 6553616384
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
0 <= x <= 20.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
0 <= x <= 10.9
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
["hello", "weather"]
Limits the amount of thinking effort, reducing thinking depth can improve speed and consume fewer tokens
minimal: Disable thinking, answer directlylow: Lightweight thinking, prioritizes quick responsemedium: Balanced mode, balances speed and depthhigh: Deep analysis, handles complex problems
minimal, low, medium, high "medium"
Specify the model response format
Supports three formats: text (default), json_object, json_schema
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
-2 <= x <= 20
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
-2 <= x <= 20
Whether to return log probabilities of output tokens
false: Do not return log probability informationtrue: Return log probabilities for each output token in the message content
Note: Deep thinking models do not support this field
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
0 <= x <= 20Adjust 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
List of tools to be called; the model response may contain tool call requests
Whether the model response is allowed to contain multiple tool calls for this request
true: Allow returning multiple tool callsfalse: The number of tool calls returned is <= 1
Whether the model response should contain tool calls for this request
String mode:
none: Model response does not contain tool callsrequired: Model response must contain tool callsauto: Model decides whether to include tool calls (default when tools are provided)
Object mode: Specify the scope of tools to be called
none, auto, required Response
Chat completion successful
Unique identifier for this request
"0217714854126607f5a9cf8ed5b018c76e4ad3dc2810db57ffb50"
Actual model name and version used for this request
"doubao-seed-2-0-pro-260215"
Response type, always chat.completion
chat.completion "chat.completion"
Service tier for this request
default: Default service tierscale: Used reserved capacity quota
default, scale "default"
Unix timestamp (in seconds) of when this request was created
1771485416
Model output content for this request
Token usage for this request