Chat

chat

Chat

Completions

chat.completions

Methods

List Available Chat Completion Models -> { items, object }
get/v5/chat/completions/models

Lists the models available for use with /v5/chat/completions.

Results are served directly from the stored inference-models catalog filtered to the chat-completion model type, not from a live provider probe, so availability reflects the catalog's recorded status. Pass the optional model_vendor query parameter to restrict results to a single vendor. Results are paginated, and each entry reports the model name, vendor, type, and availability. If the underlying catalog query fails the endpoint returns an empty list rather than raising an error.

Generate OpenAI Chat Completion From Messages -> |
post/v5/chat/completions

Generates a chat completion from an OpenAI-style messages array.

Use this endpoint for standard messages-based chat inference; use /v5/completions instead when you have a raw text prompt rather than messages, /v5/responses for the OpenAI Responses API contract, and /v5/inference when the payload does not follow any OpenAI schema. The request accepts the OpenAI Chat Completions parameters (extra fields are allowed and forwarded), and the model is selected from model given as vendor/name; most vendors are served through the litellm proxy gateway, while OpenAI may use a native gateway. When stream is set the response is delivered as server-sent events of chat.completion.chunk; otherwise a single chat.completion object is returned. Token usage is recorded for the account, and for streaming responses it is read from the final chunk.

Domain types

ChatCompletion = { id, choices, created, 5 more... }
ChatCompletionChunk = { id, choices, created, 5 more... }
ChatCompletionTokenLogprob = { token, logprob, top_logprobs, 1 more... }
ChoiceLogprobs = { content, refusal }

Log probability information for the choice.

CompletionCreateResponse = |
CompletionModelsResponse = { items, object }
InferenceModelVendor = "openai" | "cohere" | "vertex_ai" | 9 more...
ModelDefinition = { model_name, model_type, model_vendor, 1 more... }
SortOrder = "asc" | "desc"