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.
The conversation.
role: system, developer, user, assistant or tool. content: text, or an array of parts (text, image_url, …).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.
