Skip to main content

Create chat completion

POST 

/chat/completions

Sends a chat prompt to a deployed model and returns a completion. Supports both streaming (server-sent events) and non-streaming response modes. Use the model field to target a base model or a deployed fine-tuned model by its model_name. Optional sampling parameters include temperature, top_p, top_k, max_tokens, presence_penalty, and repetition_penalty. Total tokens (prompt + completion) must not exceed the model's context window.

Request

Responses