curl --request POST \
--url https://api.apiyi.com/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "dola-seed-2-1-turbo-260628",
"input": "Introduce yourself in one sentence"
}
'import requests
url = "https://api.apiyi.com/v1/responses"
payload = {
"model": "dola-seed-2-1-turbo-260628",
"input": "Introduce yourself in one sentence"
}
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: 'dola-seed-2-1-turbo-260628',
input: 'Introduce yourself in one sentence'
})
};
fetch('https://api.apiyi.com/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://api.apiyi.com/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' => 'dola-seed-2-1-turbo-260628',
'input' => 'Introduce yourself in one sentence'
]),
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://api.apiyi.com/v1/responses"
payload := strings.NewReader("{\n \"model\": \"dola-seed-2-1-turbo-260628\",\n \"input\": \"Introduce yourself in one sentence\"\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://api.apiyi.com/v1/responses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"dola-seed-2-1-turbo-260628\",\n \"input\": \"Introduce yourself in one sentence\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apiyi.com/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\": \"dola-seed-2-1-turbo-260628\",\n \"input\": \"Introduce yourself in one sentence\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "<string>",
"output": [
{}
],
"usage": {},
"caching": {}
}Seed 2.1 Turbo Responses API リファレンス
Seed 2.1 Turbo (dola-seed-2-1-turbo-260628) の Responses API リファレンスとインタラクティブなプレイグラウンド: ネイティブなマルチターン previous_response_id と、連鎖する明示的キャッシュ。
curl --request POST \
--url https://api.apiyi.com/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "dola-seed-2-1-turbo-260628",
"input": "Introduce yourself in one sentence"
}
'import requests
url = "https://api.apiyi.com/v1/responses"
payload = {
"model": "dola-seed-2-1-turbo-260628",
"input": "Introduce yourself in one sentence"
}
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: 'dola-seed-2-1-turbo-260628',
input: 'Introduce yourself in one sentence'
})
};
fetch('https://api.apiyi.com/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://api.apiyi.com/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' => 'dola-seed-2-1-turbo-260628',
'input' => 'Introduce yourself in one sentence'
]),
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://api.apiyi.com/v1/responses"
payload := strings.NewReader("{\n \"model\": \"dola-seed-2-1-turbo-260628\",\n \"input\": \"Introduce yourself in one sentence\"\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://api.apiyi.com/v1/responses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"dola-seed-2-1-turbo-260628\",\n \"input\": \"Introduce yourself in one sentence\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apiyi.com/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\": \"dola-seed-2-1-turbo-260628\",\n \"input\": \"Introduce yourself in one sentence\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "<string>",
"output": [
{}
],
"usage": {},
"caching": {}
}Bearer sk-your-api-key を入れ、input を入力して送信します。レスポンスの output 配列では、type: "reasoning" 項目が推論サマリーで、type: "message" が実際の回答です。id(resp_ プレフィックス)を次回呼び出しの previous_response_id として渡してください。履歴を再送する必要はありません。明示的なキャッシュと推論制御については、Seed 2.1 Turbo 概要 で説明しています。- 小さな
max_output_tokensは推論に消費され、status: "incomplete"は空のテキストで返ってきます — 1500 から始めてください - 明示的なキャッシュ
caching: {"type": "enabled"}は、連結でprevious_response_id経由した場合にのみヒットします。同じプレフィックスを繰り返してもヒットせず、暗黙のプレフィックスキャッシュも無効になります
パラメータのクイックリファレンス
| パラメータ | 型 | 必須 | デフォルト | 備考 |
|---|---|---|---|---|
model | string | ✓ | — | 固定: dola-seed-2-1-turbo-260628 |
input | string / array | ✓ | — | 文字列またはメッセージ配列(function_call_output アイテムを含む) |
max_output_tokens | int | — | thinking を含む出力予算。1500以上を推奨します | |
reasoning.effort | string | — | low / medium / high; 約371(低)対約1317(高)の reasoning token を測定 | |
previous_response_id | string | — | ネイティブなマルチターン用の前回レスポンスID。フルコンテキストの明示的なキャッシュヒットを有効にします | |
caching.type | string | disabled | enabled で明示的キャッシュを有効化します(連鎖が必要です) | |
store | bool | true | このレスポンスを後で参照できるように保存します | |
stream | bool | false | SSE イベントストリーム(response.created → response.completed) | |
text.format | object | — | 構造化出力、json_schema + strict に対応 | |
tools | array | — | Function calling ツール一覧(フラット形式) |
レスポンスのハイライト
statusがincompleteの場合は、incomplete_details.reasonを確認してください(通常はlength: 推論が予算を使い切っています)- 推論の消費量:
usage.output_tokens_details.reasoning_tokens - キャッシュヒット:
usage.input_tokens_details.cached_tokens(連続した2ターン目では、テストで直前までのコンテキスト全体にヒットし、レイテンシはおおむね半減しました) - レスポンスの
cachingフィールドには、実際に有効なキャッシュモードが反映されます
承認
API Key from the APIYI console
ボディ
Model ID, fixed to dola-seed-2-1-turbo-260628
dola-seed-2-1-turbo-260628 Input content. Either a string or a message array ([{role, content}, ...], including function_call_output items)
"Introduce yourself in one sentence"
Max output tokens (thinking included). Too small yields incomplete with empty text - use 1500+
Thinking depth control. Measured: effort low ~371, high ~1317 reasoning tokens
Show child attributes
Show child attributes
Previous response id (resp_ prefix) for native multi-turn; combine with caching.enabled for explicit cache hits
Explicit cache switch. enabled only hits when chained via previous_response_id
Show child attributes
Show child attributes
Whether to store this response for later previous_response_id reference
Stream via SSE (response.created → response.output_text.delta → response.completed)
Structured output. Supports {"format": {"type": "json_schema", name, strict, schema}}
Function-calling tool list (flat Responses format: {type, name, description, parameters})
レスポンス
Generation succeeded. The output array contains reasoning and message items
Response ID (resp_ prefix), usable as the next turn's previous_response_id
completed / incomplete (incomplete when thinking eats the token budget)
Output items: reasoning (thinking summary), message (text), function_call, etc.
Usage. output_tokens_details.reasoning_tokens = thinking spend; input_tokens_details.cached_tokens = cache hits
The cache mode actually in effect for this request
このページは役に立ちましたか?