v1

latestOpenAPI 3.1.02026-07-261216083.9 KB
Chat

Create Chat Completion (v1)

Generate a model response for a given chat conversation. Supports streaming and non-streaming responses.

post/v1/chat/completions

Headers

x-api-keystring

Request body

modelstring required
temperaturenumber nullable
top_pnumber nullable
streamboolean nullable
max_tokensinteger nullable
max_completion_tokensinteger nullable
presence_penaltynumber nullable
frequency_penaltynumber nullable
logit_biasobject
reasoning_effort'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh'

Response

Successful Response

idstring required

A unique identifier for the chat completion.

object'chat.completion'

The object type, which is always chat.completion.

createdinteger required

The Unix timestamp (in seconds) of when the chat completion was created.

modelstring required

The model used for the chat completion.

system_fingerprintstring nullable

This fingerprint represents the backend configuration that the model runs with.