API Reference›Chat›Chat Completions

Chat Completions

POSThttps://api.routing.run/v1/chat/completions

Create a chat completion using the OpenAI-compatible format. routing.run routes your request to the best available provider with automatic fallback.

Body

modelstringrequired

Model ID from the routing.run catalog (e.g. kimi-k2.6).

messagesarrayrequired

A list of messages comprising the conversation so far.

max_tokensinteger

Maximum number of tokens to generate in the completion.

temperaturenumber

Sampling temperature between 0 and 2.

streamboolean

If true, partial message deltas are sent as server-sent events.