API reference
Request and response format for chat completions.
The chat completions endpoint accepts a JSON body with model, messages and optional parameters such as temperature, max_tokens and stream.
Responses follow the OpenAI chat completions schema. Choices contain the generated message, finish reason and usage statistics.
See the examples page for complete cURL, Python and JavaScript snippets.
