Skip to main content
POST
/
chat
/
completions
curl --request POST \
  --url https://ai.eu.corti.app/v1/chat/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "corti-s1",
  "messages": [
    {
      "role": "user",
      "content": "Count from 1 to 5"
    }
  ],
  "max_tokens": 500
}
'
{
  "id": "<string>",
  "object": "chat.completion",
  "created": 123,
  "model": "<string>",
  "choices": [
    {
      "index": 123,
      "message": {
        "role": "assistant",
        "content": "<string>",
        "reasoning": "<string>",
        "refusal": "<string>",
        "annotations": [
          "<unknown>"
        ],
        "audio": {},
        "function_call": {},
        "tool_calls": [
          {
            "id": "<string>",
            "type": "function",
            "function": {
              "name": "<string>",
              "arguments": "<string>"
            }
          }
        ]
      },
      "logprobs": {},
      "stop_reason": 123,
      "token_ids": [
        123
      ],
      "routed_experts": [
        "<unknown>"
      ]
    }
  ],
  "system_fingerprint": "<string>",
  "usage": {
    "prompt_tokens": 123,
    "completion_tokens": 123,
    "total_tokens": 123,
    "prompt_tokens_details": {}
  },
  "service_tier": "<string>",
  "prompt_logprobs": {},
  "prompt_token_ids": [
    123
  ],
  "prompt_text": "<string>",
  "kv_transfer_params": {}
}

Authorizations

Authorization
string
header
required

Use a Corti-issued bearer token. The token is a Base64-encoded client credential string in the format base:client_credentials:<client_id>:<client_secret>.

Body

application/json
model
enum<string>
default:corti-s1
required
Available options:
corti-s1,
corti-s1-instant,
corti-s1-mini,
corti-s1-mini-instant
messages
(User Message · object | System Message · object | Assistant Message · object | Tool Message · object)[]
required

Conversation messages. Supported roles: user, assistant, tool, and system.

Minimum array length: 1
stream
boolean
default:false

If true, returns SSE with data: {chunk} lines. Terminates with data: [DONE].

temperature
number<float>
default:1
Required range: 0 <= x <= 1
top_p
number<float>
default:0.95
Required range: 0.01 <= x <= 1
max_tokens
integer

Maximum tokens to generate.

Required range: x >= 1
tools
object[]

Function tools the model may call. Max 128.

tool_choice
enum<string>
default:auto
Available options:
auto
response_format
object
logprobs
boolean
default:false
top_logprobs
integer
Required range: 0 <= x <= 20

Response

Successful response. For non-streaming requests, returns a complete chat completion. For streaming requests, returns Server-Sent Events (SSE) with incremental chunks.

id
string
object
enum<string>
Available options:
chat.completion
created
integer
model
string

The model name used for this response.

choices
object[]
system_fingerprint
string | null
usage
object
service_tier
string | null
prompt_logprobs
object | null
prompt_token_ids
integer[] | null
prompt_text
string | null
kv_transfer_params
object | null