API reference

Messages

Anthropic's Messages API. Send any request you would send to Anthropic; Sovereign answers it on the right model.

POSThttps://sov.solibra.ai/v1/messages

Request

The body is Anthropic's Messages API request: model, messages, max_tokens, system, tools, stream and the rest.

Header
x-api-key or Authorization: Bearer Your Sovereign key.
anthropic-version Passed through; 2023-06-01 if you send none.
anthropic-beta Passed through.
x-session-id Optional. Groups requests into one conversation.
curl https://sov.solibra.ai/v1/messages \
  -H "x-api-key: $SOV_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-5-5",
    "max_tokens": 512,
    "messages": [{"role": "user", "content": "What is a gateway?"}]
  }'

Response

A Messages API response, or a stream of its events with "stream": true. The x-sov-model header names the model that answered.

What Sovereign adjusts

So that every model can serve the request, Sovereign adjusts a few fields on the way through:

Field When What happens
model always Set to the model chosen for the request.
output_config.effort the chosen model reasons Set to the effort the request needs.
cache_control a Claude model, and you marked none Added, so the conversation is cached.
temperature, top_p, top_k a Claude model Removed: current Claude models only take their defaults.
thinking a Claude model, with a token budget or turned off Set to adaptive thinking: current Claude models decide how much to think.
tool_choice a Claude model, forcing a tool Set to auto.