Create chat completion

Creates a model response for the given chat conversation using the same interface as the OpenAI Chat Completions API. Supports both streaming (when stream: true, response is text/event-stream Server-Sent Events) and non-streaming modes. Request and response formats follow the OpenAI Create chat completion API. Prefer the Responses API for new integrations; this endpoint is maintained for backward compatibility.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Request body follows the OpenAI Chat Completions API format.

Request format follows OpenAI Chat Completions API (create). Required fields: model, messages. All other OpenAI fields (e.g. tools, tool_choice, response_format) are passed through as-is.

string
required

Model ID in <provider>/<model> format. Use /api/v1/model/info to discover available models.

messages
array of objects
required
length ≥ 1

Chat conversation messages. See OpenAI API reference for the supported message structure (text, multimodal, tool calls, etc.).

messages*
boolean
Defaults to false

If true, response is sent as Server-Sent Events (text/event-stream).

number
0 to 2

Sampling temperature.

number
0 to 1

Nucleus sampling parameter.

integer
≥ 1

Maximum number of tokens to generate (legacy field; use max_completion_tokens for newer models).

integer
≥ 1

Maximum number of tokens to generate.

number
-2 to 2
number
-2 to 2
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
text/event-stream