Skip to main content
POST
Use this endpoint when your application, SDK, or gateway expects the OpenAI Chat Completions request and response format. Send a standard Chat Completions payload with model and messages. Capriole AI resolves latest aliases to the selected provider model ID before upstream dispatch, forwards compatible fields such as messages, tools, tool_choice, response_format, and stream, and returns the upstream JSON or SSE stream unchanged. For streaming requests, Capriole AI sets stream_options.include_usage=true before forwarding so usage can be recorded. POST /v1/chat/completions accepts openai-latest, claude-latest, google-latest, and public concrete model IDs returned by GET /v1/models. Use a latest alias to let Capriole AI choose our recommended flagship model for that provider. Latest aliases are input shortcuts. Usage is recorded against the resolved model, while the response body keeps the model naming behavior of the selected compatible endpoint. For Capriole-native text generation, use POST /v1/chat. Use POST /v1/chat/completions when OpenAI-compatible wire behavior is required.

Authorizations

Authorization
string
header
required

Use an API key created in the Capriole AI page. Send it as Authorization: Bearer sk-....

Body

application/json
model
enum<string>
required

Public model identifier or latest alias returned by GET /v1/models

Available options:
openai-latest,
openai/gpt-5.6-terra,
openai/gpt-5.6-luna,
openai/gpt-5.5,
openai/gpt-5.4-mini,
claude-latest,
anthropic/claude-fable-5,
anthropic/claude-opus-4-8,
anthropic/claude-opus-4-7,
anthropic/claude-opus-4-6,
anthropic/claude-sonnet-4-6,
google-latest,
google/gemini-3.1-pro-preview,
google/gemini-3.5-flash,
xai/grok-4.5,
zai/glm-5.2
messages
object[]
required

OpenAI-compatible conversation messages.

tools
object[]

OpenAI-compatible tool definitions.

tool_choice

OpenAI-compatible tool choice.

response_format
object

OpenAI-compatible response format.

stream
boolean
default:false

Stream the response as OpenAI-compatible server-sent events.

stream_options
object

OpenAI-compatible stream options. For streaming requests, Capriole AI sets include_usage=true before upstream dispatch for usage accounting.

Response

OpenAI-compatible Chat Completions response or SSE stream. Response model fields follow the selected compatible endpoint and may differ from the input alias.

id
string
required
object
string
required
Example:

"chat.completion"

created
integer
required
model
string
required
choices
object[]
required
usage
object