Skip to content

Doubao Seed 2.0

Doubao Seed 2.0 models are served through the OpenAI-compatible Chat Completions API. Client applications only need to call Cubicspaces /v1/chat/completions and set model to an available Doubao Seed 2.0 model name.

Endpoint

http
POST /v1/chat/completions

Supported Models

ModelNotes
doubao-seed-2-0-proSeed 2.0 Pro standard model
doubao-seed-2-0-liteSeed 2.0 Lite lightweight model
doubao-seed-2-0-miniSeed 2.0 Mini low-latency model
doubao-seed-2-0-codeSeed 2.0 Code model for coding scenarios

Actual model availability depends on account permissions and platform configuration.

Request Example

bash
curl https://cubicspaces.cloud/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seed-2-0-pro",
    "messages": [
      { "role": "system", "content": "You are a concise and reliable assistant." },
      { "role": "user", "content": "Introduce Doubao Seed 2.0 in three sentences." }
    ],
    "temperature": 0.2,
    "stream": false
  }'

Streaming

bash
curl https://cubicspaces.cloud/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seed-2-0-lite",
    "messages": [
      { "role": "user", "content": "Write a short title for a product announcement." }
    ],
    "stream": true,
    "stream_options": {
      "include_usage": true
    }
  }'

Streaming responses follow the OpenAI SSE format. Read choices[0].delta.content from each data: chunk; the final chunk may include usage.

SDK Examples

python
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://cubicspaces.cloud/v1"
)

response = client.chat.completions.create(
    model="doubao-seed-2-0-pro",
    messages=[
        {"role": "user", "content": "Confirm that the Doubao Seed 2.0 API is working."}
    ],
    temperature=0.2
)

print(response.choices[0].message.content)
js
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "YOUR_API_KEY",
  baseURL: "https://cubicspaces.cloud/v1"
});

const response = await client.chat.completions.create({
  model: "doubao-seed-2-0-mini",
  messages: [{ role: "user", content: "Introduce Seed 2.0 mini in one sentence." }],
  temperature: 0.2
});

console.log(response.choices[0].message.content);

Troubleshooting

HTTP 404 or model unavailable

Make sure the request path is /v1/chat/completions and model is set to an available model for your account, such as doubao-seed-2-0-pro, doubao-seed-2-0-lite, doubao-seed-2-0-mini, or doubao-seed-2-0-code. If the request still fails, contact your platform administrator to confirm model availability.

The root URL returns HTML

https://cubicspaces.cloud/ is the web frontend. API calls must use:

text
https://cubicspaces.cloud/v1/chat/completions