data: [DONE].
Request fields
Response
A non-streaming call returns achoices array, where each choice has an index, a message, and a finish_reason, plus a usage object with prompt_tokens, completion_tokens, and total_tokens.
Function calling
Describe your functions intools, let the model decide with tool_choice: "auto", run the function yourself, and send the result back in a tool message.
Behavior to know
- Cancelling the HTTP request cancels the upstream generation.
- This endpoint does not create asynchronous jobs, so callbacks and webhooks are not accepted.
- Possible errors are
400,401,403,404,413,429,502,503, and504. See errors and retries.

