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": {}
}Справочник по Responses API для Seed 2.1 Turbo
Справочник по Responses API для Seed 2.1 Turbo (dola-seed-2-1-turbo-260628) и интерактивная песочница: нативный многоходовый 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 в Authorization, заполните 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; простое повторение того же префикса никогда не дает попадания в кэш (и также отключает неявный кэш префикса)
Краткая справка по параметрам
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
model | string | ✓ | — | Фиксировано: dola-seed-2-1-turbo-260628 |
input | string / array | ✓ | — | Строка или массив сообщений (включая элементы function_call_output) |
max_output_tokens | int | — | Бюджет вывода, включая рассуждение; рекомендуется 1500+ | |
reasoning.effort | string | — | low / medium / high; измерено примерно 371 (низкий) против примерно 1317 (высокий) reasoning tokens | |
previous_response_id | string | — | Идентификатор предыдущего ответа для нативного многотурового режима; обеспечивает явные попадания в кэш при полном контексте | |
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(в наших тестах на второй связанной реплике был полный доступ к предыдущему контексту, что примерно вдвое снизило задержку) - Поле response
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
Была ли эта страница полезной?