Doubao Seed 2.0 Responses API - Complete API Reference
- Use Responses API format to call Doubao Seed 2.0 series models
- Server-side context storage: Implement multi-turn conversations via
previous_response_id, no need to manually pass conversation history - Multimodal input: Supports text + image + video + file (PDF) mixed input
- Deep thinking: Supports thinking chain-of-thought mode
- Tool calling: Supports Function Calling, web search, image processing, MCP tools, private knowledge base, Doubao App
- Context caching: Supports caching mechanism to reduce costs
- Structured output: Supports JSON Object / JSON Schema format
- Context management: Supports context_management strategy
- Quick start? Check out 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 capabilitydoubao-seed-2.0-lite: Lightweight, faster speeddoubao-seed-2.0-mini: Ultra-fast, quickest responsedoubao-seed-2.0-code: Code-specialized
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"
Input content. Supports two formats:
1. Plain text string: Equivalent to text input from the user role
2. Element list (array): Contains multiple input types including messages, context, tool calls, etc.
Insert a system message or developer instruction as the first instruction in the model context
Note:
- When used with previous_response_id, instructions from the previous response are not inherited
- Cannot be used together with caching
Unique identifier of the previous model response, used to implement multi-turn conversations
Note:
- When provided, it will include the input and response content from the previous round, and the input tokens for the current request will increase accordingly
- In continuous multi-turn conversations, it is recommended to add approximately 100ms delay between each request
Storage expiration time, UTC Unix timestamp (seconds)
Note:
- Value range: (creation time, creation time + 604800], i.e., maximum retention of 7 days
- Default: creation time + 259200 (3 days)
- Applies to both store and caching
- Cache storage is billed by time, less than 1 hour is counted as 1 hour
Maximum number of output tokens from the model, including model response and chain-of-thought content
32768
Controls whether the model enables deep thinking mode
Limit deep thinking workload, reducing it can make responses faster and use fewer tokens
Whether to enable context caching
Note: Cannot be used together with instructions field or tools field (except Function Calling)
Whether to store the generated model response for later retrieval via API
true: Store the current model responsefalse: Do not store
Whether to stream the response content
false: Return all content at once after the model finishes generatingtrue: Return chunks progressively via SSE protocol, ending with adata: [DONE]message
Sampling temperature, controls output randomness
- Value range: [0, 2]
- Lower values are more deterministic, higher values are more random
- It is recommended to adjust only one of temperature or top_p
Note: doubao-seed-2.0-pro and doubao-seed-2.0-lite are fixed at 1, manual specification will be ignored
0 <= x <= 2Nucleus sampling probability threshold
- Value range: [0, 1]
- It is recommended to adjust only one of temperature or top_p
Note: doubao-seed-2.0-pro and doubao-seed-2.0-lite are fixed at 0.95, manual specification will be ignored
0 <= x <= 1Format definition for model text output
List of tools the model can call
Supported tool types:
function: Custom function (Function Calling)web_search: Web searchdoubao_app: Doubao Appimage_process: Image processingmcp: MCP toolsknowledge_search: Private knowledge base search
Controls whether the model calls tools
String mode:
none: Do not call toolsrequired: Must call toolsauto: Model decides (default)
Object mode: Specify a particular tool to call
none, auto, required Maximum number of tool call rounds (unlimited calls per round)
- Value range: [1, 10]
- Web Search default: 3
- Image Process default: 10 (modification not supported)
- Knowledge Search default: 3
Note: This parameter operates on a best-effort basis; the actual number of calls is influenced by model inference performance and other factors
1 <= x <= 10Context management strategy to help the model effectively utilize the context window
Response
Response generated successfully
Unique identifier for this response
"resp_02177148667427813c33c36521378d02b2c8389204fa8c3e2f63e"
Object type, fixed as response
response "response"
Unix timestamp (seconds) of creation time
1771486674
Actual model name and version used
"doubao-seed-2-0-code-preview-260215"
Response status
completed: Generation completedin_progress: Generation in progressincomplete: Incompletefailed: Failed
completed, in_progress, incomplete, failed "completed"
Model output content list, including chain-of-thought output, message output, tool call output, etc.
- Chain-of-thought output
- Message output
- Tool call output
Service tier for this request
default: Default service tierscale: Used guaranteed package quota
"default"
System instructions used for this request
Referenced previous response ID
Maximum number of output tokens from the model
32768
Sampling temperature used
top_p value used
Thinking mode configuration used
List of tools used
Tool choice configuration used
Whether parallel tool calls are allowed
Text output format configuration
Token usage statistics
Caching configuration
Whether the response was stored
Storage expiration time (Unix timestamp)
1756539922
Error information, null on success
Detailed reason for incompleteness