API / Endpoints
Anthropic Messages
POST /v1/messages and POST /v1/messages/count_tokens — Aurora's native Anthropic ingress for the Anthropic SDK.
Browse docs
When ENABLE_ANTHROPIC_INGRESS=true, Aurora exposes Anthropic's native wire format at /v1/messages and /v1/messages/count_tokens. Point the official Anthropic SDK at Aurora and your existing Claude code works without translation.
Activate
ENABLE_ANTHROPIC_INGRESS=true
ANTHROPIC_API_KEY=sk-ant-...Restart Aurora. The ingress is now live at http://your-aurora-host/v1/messages.
POST /v1/messages
POST /v1/messages
Authorization: Bearer <master or managed key>
anthropic-version: 2023-06-01
Content-Type: application/json
{
"model": "anthropic/claude-sonnet-4-5",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Hello from Aurora"}
]
}The request body is the standard Anthropic Messages API body. Aurora forwards the request to the configured Anthropic provider and returns the standard Anthropic response, including:
contentblocks:text,image,tool_use,tool_result,thinking(extended thinking)stop_reasonandstop_sequenceusage.input_tokens,usage.output_tokens,usage.cache_creation_input_tokens,usage.cache_read_input_tokens
Streaming is supported ("stream": true). Aurora returns the standard Anthropic SSE event sequence.
Required headers
Authorization: Bearer <key>— your Aurora master or managed keyanthropic-version: 2023-06-01— Aurora requires this headerContent-Type: application/json
POST /v1/messages/count_tokens
POST /v1/messages/count_tokens
Authorization: Bearer <master or managed key>
anthropic-version: 2023-06-01
Content-Type: application/json
{
"model": "anthropic/claude-sonnet-4-5",
"messages": [
{"role": "user", "content": "Hello from Aurora"}
]
}Response:
{
"input_tokens": 12
}Useful for pre-flight cost estimation without making a full request.
Using the official Anthropic SDK
from anthropic import Anthropic
client = Anthropic(
base_url="http://localhost:8080", # /v1/messages is appended automatically
api_key="sk-aurora-...",
)
msg = client.messages.create(
model="anthropic/claude-sonnet-4-5",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello from Aurora"}],
)
print(msg.content[0].text)import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
baseURL: "http://localhost:8080",
apiKey: "sk-aurora-...",
});
const msg = await client.messages.create({
model: "anthropic/claude-sonnet-4-5",
max_tokens: 1024,
messages: [{ role: "user", content: "Hello from Aurora" }],
});
console.log(msg.content[0].text);Tool use and extended thinking
Both are passed through with no translation:
- Tool use —
tools,tool_choice,tool_useandtool_resultblocks all work end-to-end. - Extended thinking — set
"thinking": {"type": "enabled", "budget_tokens": 4096}and Aurora forwards it. Thinking blocks appear in the response content astype: "thinking"and are preserved across multi-turn conversations. - Prompt caching —
cache_control: {type: "ephemeral"}on messages or system content is forwarded. Aurora reportscache_creation_input_tokensandcache_read_input_tokensin the response usage and in the dashboard.
System prompt
The Anthropic Messages API takes a top-level system field. Aurora's guardrail system prompt transforms target this exact field:
inject— appends to the system promptoverride— replaces the system promptdecorate— wraps the system prompt with prefix and suffix
Gotchas
- Anthropic-version header — required. Aurora rejects requests without it.
- Model string format —
provider/modelfor Aurora, e.g.anthropic/claude-sonnet-4-5. If you have multiple Anthropic providers (anthropic-prod,anthropic-staging), use those names. - Max tokens — Claude requires
max_tokens. Aurora injects a default if you forget. - Stop reason — Aurora preserves the upstream
stop_reason. The OpenAI chat-completions translation has a slightly different shape; use the Anthropic SDK if you need the canonical Claude behavior. - No passthrough needed — unlike
/v1/audio/*or fine-tune endpoints,/v1/messagesis fully implemented in Aurora. You do not need/p/anthropic/v1/messages.
Related
- Anthropic provider guide
- Anthropic SDK integration
- Chat Completions — OpenAI-format translation path
- Guardrails — system prompt transforms