Create Chat Completion

POST/v1/chat/completions
Create a model response using the OpenAI-compatible Chat Completions format.

Request Body

application/json
messages:requiredobject

Messages that make up the conversation.

Example[{"role":"developer","content":"You are a helpful assistant."},{"role":"user","content":"Hello!"}]
model:requiredstring

Model identifier used for this request.

Allowedgpt-5.5
Examplegpt-5.5
max_completion_tokens:requirednumber

Maximum number of tokens allowed in the completion.

Allowed1024
reasoning_effort:requiredstring

Controls the amount of reasoning performed by supported models.

Allowednoneminimallowmediumhighxhighmax
Examplemedium
temperature:requirednumber

Sampling temperature used to control response randomness.

Response

200

A successful request returns a JSON response. The complete example is shown in the code panel.

Compatibility References

Use these external references to review additional parameters supported by compatible provider formats.