kind: text from GET /v1/models.
Chat Completions
tools, tool_choice, response_format, logprobs, seed, stop and the rest. Whether a model honours a field is up to the model.
string
required
A model
id, for example deepseek/deepseek-v4-flash.object[]
required
The conversation.
role: system, developer, user, assistant or tool. content: text, or an array of parts (text, image_url, …).integer
Cap on output tokens, reasoning included.
boolean
default:"false"
number
From 0 to 2.
string
minimal, low, medium or high.object[]
string | object
none, auto, required, or a specific tool.chat.completion object with choices (message, finish_reason: stop, length, tool_calls, content_filter) and usage. completion_tokens includes hidden reasoning tokens.
Tool calling
Responses
client.responses.create. Required fields are model and input (a string or an array of messages); also instructions, max_output_tokens, temperature, tools, stream.
Streaming
Set"stream": true to receive Server-Sent Events. The stream ends with data: [DONE].
- Chat Completions —
stream_options.include_usageis always forced on; the final chunk carriesusage. - Responses — events
response.output_text.delta, …,response.completed;usageis inresponse.completed.
data: {"error": {…}} followed by data: [DONE] — treat what arrived as a partial answer.
