StarMagicStarMagic
English
简体中文简繁體中文繁EnglishEN日本語日EspañolES한국어KO
Integration Guide
Doubao Seed 2.0 - 快速开始Doubao Seed 2.0 - 完整参数文档Doubao Seed 2.0 Responses API - 快速开始Doubao Seed 2.0 Responses API - 完整参数文档
StarMagicStarMagic
English
简体中文简繁體中文繁EnglishEN日本語日EspañolES한국어KO
TextDoubaoDoubao.Seed.2.0

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
<Note> **BaseURL**: The default BaseURL is `https://api.starmagic.ai`, which has better support for text models and long-lived connections. `https://api.starmagic.ai` is the primary endpoint for multimodal services and serves as a fallback address for text models. </Note>

Authorization

AuthorizationstringheaderRequired

## 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_KEY

Request body

application/json
modelenum<doubao-seed-2.0-pro | doubao-seed-2.0-lite | doubao-seed-2.0-mini | doubao-seed-2.0-code>Required

Chat 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"
inputstringRequired

Input content (plain text), equivalent to text input with user role

"Hello, introduce the new features of Doubao Seed 2.0"

Response

application/json
成功

Response body

idstring

Unique identifier of this response

"resp_02177148667427813c33c36521378d02b2c8389204fa8c3e2f63e"
objectenum<response>

Object type, fixed as response

"response"
created_atnumber

Creation Unix timestamp (seconds)

1771486674
modelstring

Actual model name and version used

"doubao-seed-2-0-code-preview-260215"
statusenum<completed | in_progress | incomplete | failed>

Response status - `completed`: Generation completed - `in_progress`: Generation in progress - `incomplete`: Incomplete - `failed`: Failed

"completed"
outputobject[]

Model output content list

[
  null
]
service_tierstring

Service tier for this request

"default"
usageobject

Token usage statistics

{
  "input_tokens": 88,
  "input_tokens_details": {
    "cached_tokens": 0
  },
  "output_tokens": 230,
  "output_tokens_details": {
    "reasoning_tokens": 211
  },
  "total_tokens": 318
}
max_output_tokensinteger

Maximum output token count

32768
cachingobject

Caching configuration

{
  "type": "enabled"
}
storeboolean

Whether the response was stored

true
expire_atinteger

Storage expiration time (Unix timestamp)

1771745874
errorobject

Error information, null on success

{}
POST/v1/responses
curl --request POST \
  --url https://api.starmagic.ai/v1/responses \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "doubao-seed-2.0-pro",
  "input": "Hello, introduce the new features of Doubao Seed 2.0"
}'
Response: 成功
{
  "id": "resp_02177148667427813c33c36521378d02b2c8389204fa8c3e2f63e",
  "object": "response",
  "created_at": 1771486674,
  "model": "doubao-seed-2-0-code-preview-260215",
  "status": "completed",
  "output": [
    null
  ],
  "service_tier": "default",
  "usage": {
    "input_tokens": 88,
    "input_tokens_details": {
      "cached_tokens": 0
    },
    "output_tokens": 230,
    "output_tokens_details": {
      "reasoning_tokens": 211
    },
    "total_tokens": 318
  },
  "max_output_tokens": 32768,
  "caching": {
    "type": "enabled"
  },
  "store": true,
  "expire_at": 1771745874,
  "error": {}
}