Docs/API access

Anthropic compatibility

The same key can call Anthropic's /v1/messages endpoint, so tools like Claude Code connect directly.

On this page

If your code is built on the Anthropic SDK — or your tooling (Claude Code, for instance) only speaks the Anthropic protocol — set the base URL to https://api.apione.ai. Note there is no /v1: the SDK appends /v1/messages itself.

Configuration

SettingValue
base_url / ANTHROPIC_BASE_URLhttps://api.apione.ai
api_key / ANTHROPIC_AUTH_TOKENYOUR_APIONE_KEY
Headerx-api-key or Authorization: Bearer — send only one
python
import anthropic

client = anthropic.Anthropic(
    base_url="https://api.apione.ai",
    api_key="YOUR_APIONE_KEY",
)

msg = client.messages.create(
    model="claude-opus-4-7",
    max_tokens=1024,
    system="You are a rigorous code reviewer.",
    messages=[{"role": "user", "content": "Review the edge cases in this function"}],
)
print(msg.content[0].text)
bash
curl https://api.apione.ai/v1/messages \
  -H "x-api-key: $APIONE_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-opus-4-7",
    "max_tokens": 1024,
    "messages": [{ "role": "user", "content": "Hello" }]
  }'

Differences from the OpenAI protocol

ItemOpenAI protocolAnthropic protocol
Path/v1/chat/completions/v1/messages
System promptA system role inside messagesTop-level system field
max_tokensOptionalRequired
Response bodychoices[0].message.contentcontent[] array of blocks
Stream eventsdata: chunks + [DONE]Named events (content_block_delta, …)
Note

The Anthropic protocol can also call non-Anthropic models: set model to gpt-5.6-sol and the gateway translates. Where semantics have no counterpart (Anthropic thinking blocks, say), only what the target model supports is kept.

Related

Contact us

Something unclear, or need a human? Pick the channel that fits your question.