Claude Opus 5 API Access via the Proxy: Routing ID, Claude Code Setup and Selection Guide
claude-opus-5 Route Overview
The claude-opus-5 route on our gateway targets complex code generation, long-horizon agents, deep reasoning, and high-value knowledge work. It is exposed through an OpenAI-compatible Chat Completions endpoint and supports Claude Code through standard environment configuration.
One clarification first: claude-opus-5 is the routing ID in our model catalog. At the time of writing, the public Anthropic model lineup includes claude-fable-5, claude-opus-4-8, claude-sonnet-5, and claude-haiku-4-5-20251001, and does not list an official model under the name claude-opus-5. This guide documents our compatible route and access pattern only, not an Anthropic release announcement. Treat capability claims as directory annotations and verify with small requests before production use. See our /model-pricing page for current rates.
| Item | Current Route Info |
|---|---|
| Routing ID | claude-opus-5 |
| Context window | 1M (catalog annotation) |
| Image understanding | Supported (catalog annotation) |
| Recommended workloads | Complex code, architecture planning, code review, long-running agents, rigorous reports |
| API format | OpenAI-compatible Chat Completions; Claude Code compatible |
| Official naming status | Not listed under this name in Anthropic's public catalog |
How to Call the Claude Opus 5 API
Send requests to our /v1/chat/completions endpoint. Minimal example with curl:
curl https://your-gateway.example.com/v1/chat/completions \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"claude-opus-5","messages":[{"role":"user","content":"Review this refactor plan and list architectural risks, validation steps, and rollback conditions."}]}'
With the OpenAI Python SDK, only swap the base URL, API key, and model ID:
from openai import OpenAI client = OpenAI(api_key="YOUR_API_KEY", base_url="https://your-gateway.example.com/v1") resp = client.chat.completions.create(model="claude-opus-5", messages=[{"role":"user","content":"Draft a phased migration plan with acceptance criteria for each stage."}]) print(resp.choices[0].message.content)
Send a short request first and log the status code, request ID, latency, and actual charge. Treat tool use, long context, image input, and structured output as independent test cases. Capabilities on one Claude route do not automatically transfer from any specific official model.
Using claude-opus-5 with Claude Code
Claude Code accepts model selection via --model, ANTHROPIC_MODEL, and the in-app model picker. When routing through a gateway, the model name must match a route the gateway accepts. Session-level configuration:
export ANTHROPIC_AUTH_TOKEN="YOUR_API_KEY" export ANTHROPIC_BASE_URL="https://your-gateway.example.com" export ANTHROPIC_MODEL="claude-opus-5" claude --model claude-opus-5
After setup, run a read-only task first, such as summarizing a directory or explaining a test file. Only enable file writes, command execution, or deployment once the model, auth, and responses look correct.
Tasks well suited to claude-opus-5 in Claude Code
- Cross-module architecture mapping and migration planning
- Risk-prioritized review of large diffs
- Agent tasks that chain search, edit, test, and retriage
- Evidence gathering, hypothesis elimination, and root-cause analysis for hard bugs
- High-stakes documentation, technical designs, and launch checklists
Tasks that should default elsewhere
- Short Q&A, classification, field extraction, and format conversion
- High-frequency, low-risk code completion
- Bulk work that cheaper models complete reliably
- Autonomous execution with no acceptance criteria, permission boundaries, or rollback plan
Reserve a premium route for architecture decisions, hard debugging, critical reviews, and long-horizon agent phases. Let cheaper models handle retrieval, classification, and simple edits.
How Pricing Works
Our gateway charges per million tokens at a multiplier on the base rate. Cost depends on the current rate shown on /model-pricing; the formula is:
Reference cost = billable tokens / 1,000,000 × unit price
For agent work, account for repeated tool results returned into context, failed retries, compacted context, and final output, not just the first user prompt.
Before committing, sample 20 to 50 real tasks and record:
- First-pass completion and acceptance pass rates
- Input, output, and cache-related token counts
- Time to first token and total latency
- Tool call failures, retries, and interruptions
- Engineer rework time
- Final total cost per passing task
Choosing Between claude-opus-5 and Other Claude Models
The table compares evaluation paths, not a performance ranking:
| Route or official model | Worth testing first for | Confirm before selecting |
|---|---|---|
claude-opus-5 (our route) | High-value code, review, planning, agent workflows | Live price, route capabilities, target client compatibility |
claude-opus-4-8 (official) | Complex agentic coding and enterprise work | Anthropic specs, pricing, regional availability |
claude-fable-5 (official) | Long-running agents needing top available capability | Refusal or fallback behavior, official price, safety classifier behavior |
claude-sonnet-5 (official) | Everyday agent and coding work balancing speed and cost | Current promotional pricing window and post-promo rate |
Compare routes with identical tasks, prompts, tools, permissions, and acceptance criteria, not by inferring behavior from the name.
Pre-Launch Checklist for Agents
- Copy
claude-opus-5from the model list verbatim. - Verify API key, base URL, model name, status codes, and response shape with short prompts.
- In Claude Code, run read-only tasks first, then expand to writes and commands.
- Set explicit permission boundaries for files, databases, payments, publishing, and servers.
- Add timeouts, retry caps, idempotency keys, and human takeover conditions to tool calls.
- Fix the eval repo, starting commit, dependencies, and acceptance tests so results are reproducible.
- Cap tokens per request, set daily budget alerts, and define a cheaper fallback route.
- Recheck live pricing before launch; treat any snapshot as outdated.
FAQ
What is the model ID?
Use claude-opus-5. This is our route ID; Anthropic's public catalog does not list a model under that name at the time of writing.
How is the API priced?
See /model-pricing for the current rate per million tokens. Actual billing reflects your account dashboard and any caching rules.
Does it work with Claude Code?
Yes, via our compatible gateway. Set ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, and ANTHROPIC_MODEL=claude-opus-5, then validate with a read-only task.
Is this an official Anthropic model?
No. We provide a compatible route under the name claude-opus-5; Anthropic's public catalog does not list it.
Which tasks should I test first?
Start with tasks that have clear acceptance criteria: complex code review, cross-module refactor planning, hard bug analysis, and long-running agent flows. Keep simple, high-frequency work on cheaper models.