Skip to main content
POST
Responses API with Seed 2.1 Turbo (native multi-turn / explicit cache)
Используйте Playground справа: поместите 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; простое повторение того же префикса никогда не дает попадания в кэш (и также отключает неявный кэш префикса)

Краткая справка по параметрам

Основные моменты ответа

  • Когда status = incomplete, проверьте incomplete_details.reason (обычно length: рассуждение съело бюджет)
  • Расход на рассуждение: usage.output_tokens_details.reasoning_tokens
  • Попадания в кэш: usage.input_tokens_details.cached_tokens (в наших тестах на второй связанной реплике был полный доступ к предыдущему контексту, что примерно вдвое снизило задержку)
  • Поле response caching отражает режим кэширования, который фактически был включен

Авторизации

Authorization
string
header
обязательно

API Key from the APIYI console

Тело

application/json
model
enum<string>
по умолчанию:dola-seed-2-1-turbo-260628
обязательно

Model ID, fixed to dola-seed-2-1-turbo-260628

Доступные опции:
dola-seed-2-1-turbo-260628
input
string
обязательно

Input content. Either a string or a message array ([{role, content}, ...], including function_call_output items)

Пример:

"Introduce yourself in one sentence"

max_output_tokens
integer
по умолчанию:1500

Max output tokens (thinking included). Too small yields incomplete with empty text - use 1500+

reasoning
object

Thinking depth control. Measured: effort low ~371, high ~1317 reasoning tokens

previous_response_id
string

Previous response id (resp_ prefix) for native multi-turn; combine with caching.enabled for explicit cache hits

caching
object

Explicit cache switch. enabled only hits when chained via previous_response_id

store
boolean

Whether to store this response for later previous_response_id reference

stream
boolean
по умолчанию:false

Stream via SSE (response.created → response.output_text.delta → response.completed)

text
object

Structured output. Supports {"format": {"type": "json_schema", name, strict, schema}}

tools
object[]

Function-calling tool list (flat Responses format: {type, name, description, parameters})

Ответ

Generation succeeded. The output array contains reasoning and message items

id
string

Response ID (resp_ prefix), usable as the next turn's previous_response_id

status
string

completed / incomplete (incomplete when thinking eats the token budget)

output
object[]

Output items: reasoning (thinking summary), message (text), function_call, etc.

usage
object

Usage. output_tokens_details.reasoning_tokens = thinking spend; input_tokens_details.cached_tokens = cache hits

caching
object

The cache mode actually in effect for this request