Skip to main content
Same story as OpenAI: keep the official anthropic package and change two lines in client construction. System prompts, tool use, streaming events, and cache_control blocks all pass through the gateway verbatim.
Base URL — host root, no /v1. The Anthropic SDK appends /v1/messages itself, so the base URL is https://api.aireserve.com — unlike OpenAI-flavored clients, which need the /v1 suffix.
The AI Reserve SDKs speak the Anthropic format natively too (v0.5.0 in all five languages) — same messages.create / count_tokens convention, one dependency for every wire format:
Claude Code and the Claude Agent SDK migrate without touching this section at all — they are configured entirely through ANTHROPIC_BASE_URL / ANTHROPIC_AUTH_TOKEN environment variables. See the Claude Code recipe.
What carries over verbatim. System prompts, tool use (tool_use / tool_result blocks), streaming events (message_startmessage_stop), and prompt cachingcache_control markers are forwarded to Anthropic unchanged, with the same minimums and 5-minute lifetime. What changes: the key and its environment variable, the base URL, and the model namespace — /v1/messages answers for every gateway model, not just Claude.