Skip to main content
POST
/
messages
curl --request POST \
  --url https://ai.eu.corti.app/anthropic/v1/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'anthropic-version: <anthropic-version>' \
  --data '
{
  "model": "corti-s1",
  "max_tokens": 500,
  "messages": [
    {
      "role": "user",
      "content": "Count from 1 to 5"
    }
  ]
}
'
{
  "id": "<string>",
  "type": "message",
  "role": "assistant",
  "content": [
    {
      "type": "text",
      "text": "<string>"
    }
  ],
  "model": "<string>",
  "stop_reason": "end_turn",
  "usage": {
    "input_tokens": 123,
    "output_tokens": 123,
    "cache_creation_input_tokens": 123,
    "cache_read_input_tokens": 123
  }
}
{
"error": "<string>",
"detail": "<string>"
}
{
"error": "<string>",
"detail": "<string>"
}

Authorizations

Authorization
string
header
required

Use a Corti-issued bearer token.

Headers

anthropic-version
string
default:2023-06-01
required

Anthropic API version header.

Body

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

Maximum tokens to generate. Required by the Anthropic API.

Required range: x >= 1
messages
object[]
required

Conversation messages. Supported roles: user, assistant.

Minimum array length: 1
system
string | null

System prompt. Equivalent to a system message in chat completions.

stream
boolean
default:false

If true, returns SSE with typed events: message_start, content_block_start, content_block_delta, content_block_stop, message_delta, message_stop.

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

Response

Successful response. For non-streaming requests, returns a complete message object. For streaming requests, returns Server-Sent Events (SSE) with typed events: message_start, content_block_start, content_block_delta, content_block_stop, message_delta, message_stop.

id
string

Unique message ID (e.g. chatcmpl-3e537413-...).

type
enum<string>
Available options:
message
role
enum<string>
Available options:
assistant
content
object[]

Array of content blocks.

model
string

The model name used for this response.

stop_reason
enum<string>

Why generation stopped.

Available options:
end_turn
usage
object