curl --request POST \
--url https://direct.evolink.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "doubao-seed-2-1-pro",
"messages": [
{
"role": "user",
"content": "自己紹介をしてください"
}
]
}
'
{
"id": "0217714854126607f5a9cf8ed5b018c76e4ad3dc2810db57ffb50",
"model": "doubao-seed-2-1-pro",
"object": "chat.completion",
"created": 1771485416,
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "こんにちは。推論、文章作成、プログラミング、マルチモーダル理解が得意な Seed 言語モデルです…",
"reasoning_content": "<string>",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
]
},
"finish_reason": "stop",
"logprobs": {
"content": [
{
"token": "<string>",
"bytes": [
123
],
"logprob": 123,
"top_logprobs": [
{
"token": "<string>",
"bytes": [
123
],
"logprob": 123
}
]
}
]
},
"moderation_hit_type": "severe_violation"
}
],
"usage": {
"total_tokens": 271,
"prompt_tokens": 15,
"prompt_tokens_details": {
"cached_tokens": 0,
"audio_tokens": 0,
"audio_cached_tokens": 0
},
"completion_tokens": 256,
"completion_tokens_details": {
"reasoning_tokens": 0
}
}
}{
"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/credits"
}
}{
"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-1-pro"
}
}{
"error": {
"code": 413,
"message": "Image file too large",
"type": "request_too_large_error",
"param": "content",
"fallback_suggestion": "compress image to under 10MB"
}
}{
"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"
}
}Chat Completions API
Seed Chat Completions — API リファレンス
- OpenAI SDK で Seed を呼び出します。
- 同期リクエストでは応答が直接返ります。
- 単一・複数ターンのテキスト対話に対応し、システムプロンプトで振る舞いを指定できます。
- 複数ターンの会話メッセージ。テキスト・画像・動画を組み合わせられます。
doubao-seed-2-1-liteのみ音声にも対応します。 - 思考は既定で有効です。無効化や深さの調整ができます。
- モデルが呼び出せるツールの一覧。このエンドポイントは
functionのみ対応。 - JSON Object または JSON Schema 形式の構造化出力に対応します。
- Chat Completions にはウェブ検索がありません。Seed 2.1 または
doubao-seed-evolvingで Responses か Messages を使用してください。 - Seed 2.0 の旧モデル名:
doubao-seed-2.0-pro/doubao-seed-2.0-liteは現在doubao-seed-2-1-lite、doubao-seed-2.0-codeはdoubao-seed-evolvingに転送されます。パラメータの動作は新しいモデルに準じます。新規連携では新しいモデル名を使用してください。doubao-seed-2.0-miniは変わりません - クイックスタート
POST
/
v1
/
chat
/
completions
curl --request POST \
--url https://direct.evolink.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "doubao-seed-2-1-pro",
"messages": [
{
"role": "user",
"content": "自己紹介をしてください"
}
]
}
'
{
"id": "0217714854126607f5a9cf8ed5b018c76e4ad3dc2810db57ffb50",
"model": "doubao-seed-2-1-pro",
"object": "chat.completion",
"created": 1771485416,
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "こんにちは。推論、文章作成、プログラミング、マルチモーダル理解が得意な Seed 言語モデルです…",
"reasoning_content": "<string>",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
]
},
"finish_reason": "stop",
"logprobs": {
"content": [
{
"token": "<string>",
"bytes": [
123
],
"logprob": 123,
"top_logprobs": [
{
"token": "<string>",
"bytes": [
123
],
"logprob": 123
}
]
}
]
},
"moderation_hit_type": "severe_violation"
}
],
"usage": {
"total_tokens": 271,
"prompt_tokens": 15,
"prompt_tokens_details": {
"cached_tokens": 0,
"audio_tokens": 0,
"audio_cached_tokens": 0
},
"completion_tokens": 256,
"completion_tokens_details": {
"reasoning_tokens": 0
}
}
}{
"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/credits"
}
}{
"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-1-pro"
}
}{
"error": {
"code": 413,
"message": "Image file too large",
"type": "request_too_large_error",
"param": "content",
"fallback_suggestion": "compress image to under 10MB"
}
}{
"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"
}
}BaseURL:デフォルトの BaseURL は
https://direct.evolink.ai で、テキストモデルへの対応が優れており、長時間接続をサポートします。https://api.evolink.ai はマルチモーダルの主力エンドポイントで、テキストモデルに対しては代替アドレスとして使用されます。承認
##すべてのAPIにBearer Token認証が必要です##
APIキーの取得:
APIキー管理ページにアクセスしてAPIキーを取得してください
リクエストヘッダーに追加:
Authorization: Bearer YOUR_API_KEY
ボディ
application/json
モデルの選択
| モデル ID | 用途 | コンテキスト長 |
|---|---|---|
doubao-seed-2-1-pro | 複雑な推論、長文書、コードベースに適した推奨の最上位モデル | 100 万トークン |
doubao-seed-2-1-turbo | 対話、データ抽出、エージェント処理向けの低価格モデル | 25.6 万トークン |
doubao-seed-2-1-lite | Seed 2.1 で最も低価格。音声入力に対応 | 100 万トークン |
doubao-seed-evolving | 新機能の評価向けに毎週更新 | 100 万トークン |
doubao-seed-2.0-pro | 旧モデル名。現在は doubao-seed-2-1-lite に転送されます | 100 万トークン |
doubao-seed-2.0-lite | 旧モデル名。現在は doubao-seed-2-1-lite に転送されます | 100 万トークン |
doubao-seed-2.0-mini | 簡単なタスク向けの Seed 2.0 最速モデル | 25.6 万トークン |
doubao-seed-2.0-code | 旧モデル名。現在は doubao-seed-evolving に転送されます | 100 万トークン |
Seed 2.1 のモデル ID はハイフン(2-1)、Seed 2.0 はピリオド(2.0)を使います。
利用可能なオプション:
doubao-seed-2-1-pro, doubao-seed-2-1-turbo, doubao-seed-2-1-lite, doubao-seed-evolving, doubao-seed-2.0-pro, doubao-seed-2.0-lite, doubao-seed-2.0-mini, doubao-seed-2.0-code 例:
"doubao-seed-2-1-pro"
思考を浅くすると応答が速くなり、思考トークンを減らせます。
思考の深さ。minimal は直接回答、low は速度優先、medium は速度と深さのバランス、high は複雑な問題の詳細な分析に適しています。
既定値は Seed 2.1 と doubao-seed-evolving が high、Seed 2.0 が medium。none は minimal、xhigh と max は high として扱います。
利用可能なオプション:
none, minimal, low, medium, high, xhigh, max 例:
"medium"
レスポンス
チャット生成成功