API reference

Messages

The Anthropic Messages format. Anthropic SDKs and Claude Code append /v1/messages to the origin themselves, so the base URL you configure must not contain /v1.

POST/v1/messages
Base URLhttps://api.overagent.cc

Request body

FieldTypeDescription
modelrequiredstringA model id from the catalog.
max_tokensrequiredintegerRequired by the Anthropic spec. Defaults to 4096 if omitted. Enforced as a real ceiling.
messagesrequiredarrayUser and assistant turns. Tool use and tool result blocks are accepted.
systemstring | arraySystem prompt, as a string or an array of text blocks.
toolsarrayAnthropic tool definitions, using name and input_schema.
streambooleanEmit Anthropic SSE events. See Streaming.
thinkingobjectExtended thinking, e.g. { "type": "enabled" }.
fallbacks"default" | arrayRetry on a classifier refusal. Send [] to disable. See Models.

Examples

curl https://api.overagent.cc/v1/messages \
  -H "x-api-key: $OVERAGENT_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-5",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Hello"}]
  }'

Fallback handoffs

When a fallback model answers instead of the one you asked for, the response says so rather than hiding it: model names the model that replied, an extra fallback content block records the handoff, and usage.iterations counts the attempts.