Doubao Seed 2.0 Responses API - Quick Start
- Use Responses API format to call Doubao Seed 2.0 series models
- Supports server-side context storage, enabling multi-turn conversations via
previous_response_id - Minimal parameters, quick start
- Supported models:
doubao-seed-2.0-pro,doubao-seed-2.0-lite,doubao-seed-2.0-mini,doubao-seed-2.0-code - Need more features? Check out Complete API Reference
Authorization
## All APIs require Bearer Token authentication ## **Get API Key:** Visit [API Key Management Page](https://starmagic.ai/app/api-keys) to get your API Key **Add to request header:** ``` Authorization: Bearer YOUR_API_KEY ```
Authorization: Bearer YOUR_API_KEYRequest body
application/jsonChat model name - `doubao-seed-2.0-pro`: Flagship, strongest overall capability, ideal for complex reasoning and high-quality generation - `doubao-seed-2.0-lite`: Lightweight, faster speed, cost-effective - `doubao-seed-2.0-mini`: Ultra-fast, quickest response, suitable for simple tasks - `doubao-seed-2.0-code`: Code-specialized, optimized for code generation and understanding
"doubao-seed-2.0-pro"Input content (plain text), equivalent to text input with user role
"Hello, introduce the new features of Doubao Seed 2.0"Response
application/jsonResponse body
Unique identifier of this response
"resp_02177148667427813c33c36521378d02b2c8389204fa8c3e2f63e"Object type, fixed as response
"response"Creation Unix timestamp (seconds)
1771486674Actual model name and version used
"doubao-seed-2-0-code-preview-260215"Response status - `completed`: Generation completed - `in_progress`: Generation in progress - `incomplete`: Incomplete - `failed`: Failed
"completed"Model output content list
[
null
]Service tier for this request
"default"Token usage statistics
{
"input_tokens": 88,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 230,
"output_tokens_details": {
"reasoning_tokens": 211
},
"total_tokens": 318
}Maximum output token count
32768Caching configuration
{
"type": "enabled"
}Whether the response was stored
trueStorage expiration time (Unix timestamp)
1771745874Error information, null on success
{}
