Skip to main content
POST
/
completions
curl --request POST \
  --url https://ai.eu.corti.app/v1/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "corti-s1",
  "prompt": "The capital of France is",
  "max_tokens": 50
}
'
{
  "id": "<string>",
  "object": "text_completion",
  "created": 123,
  "model": "<string>",
  "choices": [
    {
      "index": 123,
      "text": "<string>",
      "logprobs": {},
      "prompt_logprobs": {},
      "prompt_token_ids": [
        123
      ],
      "token_ids": [
        123
      ],
      "routed_experts": [
        "<unknown>"
      ],
      "stop_reason": 123
    }
  ],
  "system_fingerprint": "<string>",
  "service_tier": "<string>",
  "kv_transfer_params": {},
  "usage": {
    "prompt_tokens": 123,
    "completion_tokens": 123,
    "total_tokens": 123,
    "prompt_tokens_details": {}
  }
}
{
"error": "<string>",
"detail": "<string>"
}
{
"error": "<string>",
"detail": "<string>"
}

Authorizations

Authorization
string
header
required

Use a Corti-issued bearer token.

Body

application/json
model
enum<string>
default:corti-s1
required
Available options:
corti-s1,
corti-s1-instant,
corti-s1-mini,
corti-s1-mini-instant
prompt
required

Single prompt string.

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
max_tokens
integer

Maximum tokens to generate.

Required range: x >= 1
logprobs
boolean
default:false
top_logprobs
integer
Required range: 0 <= x <= 20

Response

Successful response. For non-streaming requests, returns a complete text completion. For streaming requests, returns Server-Sent Events (SSE) with incremental text chunks. Terminates with data: [DONE].

id
string

Unique completion ID (e.g. cmpl-8acdd476-...).

object
enum<string>
Available options:
text_completion
created
integer

Unix timestamp (seconds).

model
string

The model name used for this response.

choices
object[]
system_fingerprint
string | null
service_tier
string | null
kv_transfer_params
object | null
usage
object