Skip to main content
POST
/
v1
/
chat
/
completions
curl --request POST \
  --url https://api.caprioletech.com/v1/chat/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "openai/gpt-5.5",
  "messages": [
    {
      "role": "user",
      "content": "Hello World!"
    }
  ]
}
'
{
  "id": "<string>",
  "object": "chat.completion",
  "created": 123,
  "model": "<string>",
  "choices": [
    {}
  ],
  "usage": {}
}
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 rewrites the model value to the selected provider model ID, 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. 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 returned by GET /v1/models

Available options:
openai/gpt-5.5,
openai/gpt-5.4-mini,
anthropic/claude-opus-4-8,
anthropic/claude-opus-4-7,
google/gemini-3.1-pro-preview,
google/gemini-3.5-flash
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

id
string
required
object
string
required
Example:

"chat.completion"

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