curl --request POST \
--url https://ai.{environment}.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": {},
"finish_reason": "stop",
"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": {
"cached_tokens": 123,
"multimodal_tokens": {
"image": 123
}
}
},
"service_tier": "<string>",
"prompt_logprobs": {},
"prompt_token_ids": [
123
],
"prompt_text": "<string>",
"kv_transfer_params": {}
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}Chat
Create chat completion
Creates a model response for the given conversation. This is the OpenAI-compatible Chat Completions API. Some models return chain-of-thought reasoning in the reasoning field of the response message. The -instant model variants do not produce reasoning on this endpoint.
POST
/
v1
/
chat
/
completions
curl --request POST \
--url https://ai.{environment}.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": {},
"finish_reason": "stop",
"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": {
"cached_tokens": 123,
"multimodal_tokens": {
"image": 123
}
}
},
"service_tier": "<string>",
"prompt_logprobs": {},
"prompt_token_ids": [
123
],
"prompt_text": "<string>",
"kv_transfer_params": {}
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}Body
application/json
Response
Successful response. For non-streaming requests, returns a complete chat completion. For streaming requests, returns Server-Sent Events (SSE) with incremental chunks.
Was this page helpful?