kind: text из GET /v1/models.
Chat Completions
tools, tool_choice, response_format, logprobs, seed, stop и остальные. Учитывает ли модель поле, решает сама модель.
string
обязательно
id модели, например deepseek/deepseek-v4-flash.object[]
обязательно
История диалога.
role: system, developer, user, assistant или tool. content: текст или массив частей (text, image_url, …).integer
Лимит выходных токенов, включая рассуждения.
boolean
по умолчанию:"false"
number
От 0 до 2.
string
minimal, low, medium или high.object[]
string | object
none, auto, required или выбор конкретного инструмента.chat.completion с choices (message, finish_reason: stop, length, tool_calls, content_filter) и usage. completion_tokens включает скрытые токены рассуждений.
Вызов инструментов
Responses
client.responses.create. Обязательные поля — model и input (строка или массив сообщений); также instructions, max_output_tokens, temperature, tools, stream.
Потоковый вывод
Передайте"stream": true, чтобы получать ответ через Server-Sent Events. Поток заканчивается data: [DONE].
- Chat Completions —
stream_options.include_usageвключён всегда, последний чанк содержитusage. - Responses — события
response.output_text.delta, …,response.completed;usage— вresponse.completed.
data: {"error": {…}} и затем data: [DONE] — считайте полученное неполным ответом.
