curl --request POST \
--url https://direct.evolink.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"
}
'import requests
url = "https://direct.evolink.ai/v1/responses"
payload = {
"model": "doubao-seed-2.0-pro",
"input": "Hello, introduce the new features of Doubao Seed 2.0"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'doubao-seed-2.0-pro',
input: 'Hello, introduce the new features of Doubao Seed 2.0'
})
};
fetch('https://direct.evolink.ai/v1/responses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://direct.evolink.ai/v1/responses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'doubao-seed-2.0-pro',
'input' => 'Hello, introduce the new features of Doubao Seed 2.0'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://direct.evolink.ai/v1/responses"
payload := strings.NewReader("{\n \"model\": \"doubao-seed-2.0-pro\",\n \"input\": \"Hello, introduce the new features of Doubao Seed 2.0\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://direct.evolink.ai/v1/responses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"doubao-seed-2.0-pro\",\n \"input\": \"Hello, introduce the new features of Doubao Seed 2.0\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://direct.evolink.ai/v1/responses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"doubao-seed-2.0-pro\",\n \"input\": \"Hello, introduce the new features of Doubao Seed 2.0\"\n}"
response = http.request(request)
puts response.read_body{
"id": "resp_02177148667427813c33c36521378d02b2c8389204fa8c3e2f63e",
"object": "response",
"created_at": 1771486674,
"model": "doubao-seed-2-0-code-preview-260215",
"status": "completed",
"output": [
{
"id": "rs_0217****404a",
"type": "reasoning",
"summary": [
{
"text": "<string>",
"type": "summary_text"
}
],
"status": "completed"
}
],
"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": {}
}{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": 401,
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": 402,
"message": "Insufficient quota",
"type": "insufficient_quota_error",
"fallback_suggestion": "https://evolink.ai/dashboard/billing"
}
}{
"error": {
"code": 403,
"message": "Access denied for this model",
"type": "permission_error",
"param": "model"
}
}{
"error": {
"code": 404,
"message": "Specified model not found",
"type": "not_found_error",
"param": "model",
"fallback_suggestion": "doubao-seed-2.0-pro"
}
}{
"error": {
"code": 429,
"message": "Rate limit exceeded",
"type": "rate_limit_error",
"fallback_suggestion": "retry after 60 seconds"
}
}{
"error": {
"code": 500,
"message": "Internal server error",
"type": "internal_server_error",
"fallback_suggestion": "try again later"
}
}{
"error": {
"code": 502,
"message": "Upstream AI service unavailable",
"type": "upstream_error",
"fallback_suggestion": "try different model"
}
}{
"error": {
"code": 503,
"message": "Service temporarily unavailable",
"type": "service_unavailable_error",
"fallback_suggestion": "retry after 30 seconds"
}
}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
curl --request POST \
--url https://direct.evolink.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"
}
'import requests
url = "https://direct.evolink.ai/v1/responses"
payload = {
"model": "doubao-seed-2.0-pro",
"input": "Hello, introduce the new features of Doubao Seed 2.0"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'doubao-seed-2.0-pro',
input: 'Hello, introduce the new features of Doubao Seed 2.0'
})
};
fetch('https://direct.evolink.ai/v1/responses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://direct.evolink.ai/v1/responses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'doubao-seed-2.0-pro',
'input' => 'Hello, introduce the new features of Doubao Seed 2.0'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://direct.evolink.ai/v1/responses"
payload := strings.NewReader("{\n \"model\": \"doubao-seed-2.0-pro\",\n \"input\": \"Hello, introduce the new features of Doubao Seed 2.0\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://direct.evolink.ai/v1/responses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"doubao-seed-2.0-pro\",\n \"input\": \"Hello, introduce the new features of Doubao Seed 2.0\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://direct.evolink.ai/v1/responses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"doubao-seed-2.0-pro\",\n \"input\": \"Hello, introduce the new features of Doubao Seed 2.0\"\n}"
response = http.request(request)
puts response.read_body{
"id": "resp_02177148667427813c33c36521378d02b2c8389204fa8c3e2f63e",
"object": "response",
"created_at": 1771486674,
"model": "doubao-seed-2-0-code-preview-260215",
"status": "completed",
"output": [
{
"id": "rs_0217****404a",
"type": "reasoning",
"summary": [
{
"text": "<string>",
"type": "summary_text"
}
],
"status": "completed"
}
],
"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": {}
}{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": 401,
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": 402,
"message": "Insufficient quota",
"type": "insufficient_quota_error",
"fallback_suggestion": "https://evolink.ai/dashboard/billing"
}
}{
"error": {
"code": 403,
"message": "Access denied for this model",
"type": "permission_error",
"param": "model"
}
}{
"error": {
"code": 404,
"message": "Specified model not found",
"type": "not_found_error",
"param": "model",
"fallback_suggestion": "doubao-seed-2.0-pro"
}
}{
"error": {
"code": 429,
"message": "Rate limit exceeded",
"type": "rate_limit_error",
"fallback_suggestion": "retry after 60 seconds"
}
}{
"error": {
"code": 500,
"message": "Internal server error",
"type": "internal_server_error",
"fallback_suggestion": "try again later"
}
}{
"error": {
"code": 502,
"message": "Upstream AI service unavailable",
"type": "upstream_error",
"fallback_suggestion": "try different model"
}
}{
"error": {
"code": 503,
"message": "Service temporarily unavailable",
"type": "service_unavailable_error",
"fallback_suggestion": "retry after 30 seconds"
}
}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 API Key Management Page to get your API Key
Add to request header:
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"
Input content (plain text), equivalent to text input with user role
"Hello, introduce the new features of Doubao Seed 2.0"
Response
Response generated successfully
Unique identifier of this response
"resp_02177148667427813c33c36521378d02b2c8389204fa8c3e2f63e"
Object type, fixed as response
response "response"
Creation Unix timestamp (seconds)
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
- Chain-of-thought output
- Message output
Show child attributes
Show child attributes
Service tier for this request
"default"
Token usage statistics
Show child attributes
Show child attributes
Maximum output token count
32768
Caching configuration
Show child attributes
Show child attributes
Whether the response was stored
true
Storage expiration time (Unix timestamp)
1771745874
Error information, null on success