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
| Setting | Value |
|---|---|
base_url / ANTHROPIC_BASE_URL | https://api.apione.ai |
api_key / ANTHROPIC_AUTH_TOKEN | YOUR_APIONE_KEY |
| Header | x-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
| Item | OpenAI protocol | Anthropic protocol |
|---|---|---|
| Path | /v1/chat/completions | /v1/messages |
| System prompt | A system role inside messages | Top-level system field |
max_tokens | Optional | Required |
| Response body | choices[0].message.content | content[] array of blocks |
| Stream events | data: 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.
Supportsupport@apione.ai
WeCom
Telegram
Communityhttps://t.me/apione
Support tickets
Billing & accountConsole › Feedback