Create a Chat Completion

Generate a conversational response with the OpenAI-compatible Chat Completions API.

Create a model response from a list of messages. Existing OpenAI-compatible clients can use this endpoint by changing the base URL and API key.

POST/openai/v1/chat/completions

Request Body

FieldTypeRequiredDescription
modelstringYesModel identifier available to the API key's tenant.
messagesarrayYesOrdered conversation messages with role and content.
streambooleanNoStream incremental response events when true.
temperaturenumberNoSampling temperature supported by the selected model.

Response

The response preserves the OpenAI-compatible chat.completion shape, including choices, the assistant message, and the finish reason.

Compatibility Alias

The gateway still accepts /v1/chat/completions for compatible existing clients. Use /openai/v1/chat/completions for new integrations so the protocol namespace is explicit.