Use Claude Code with OmniaKey
Point Claude Code at OmniaKey's Anthropic-native endpoint — two environment variables, Claude models that are never silently swapped, billing per token with no monthly plan.
Claude Code speaks exactly one protocol: Anthropic's Messages API. That is by design, and it is why pointing it at OmniaKey takes two environment variables and changes nothing else — OmniaKey serves the same protocol natively. What you gain is one key and one balance shared across every tool you run, per-token billing with no monthly plan, and a guarantee that the model id you ask for is the one that runs.
Setup
Create a key in the dashboard, set two variables, and launch:
export ANTHROPIC_BASE_URL="https://api.omniakey.com"
export ANTHROPIC_AUTH_TOKEN="your-omniakey-api-key"
claude
Streaming, tool use, and long context all pass through unchanged — Claude Code still thinks it is talking to Anthropic directly.
Don't add /v1 to the base URL. Claude Code appends /v1/messages itself, so https://api.omniakey.com/v1 turns into /v1/v1/messages and returns 404. Use the bare host.
Pick a model
Switch models inside the session with /model:
/model claude-sonnet-5
Claude ids on OmniaKey include claude-fable-5 (hardest long-running work, 1M context), claude-opus-5 (complex work, 1M), claude-sonnet-5 (daily balance, 1M), and claude-haiku-4-5 (fast, 200K). The id you pass is the id that runs — OmniaKey never silently swaps, quantizes, or distills it. The Claude Code model-selection guide maps each one to a task and subagent role.
GPT and Gemini: a protocol boundary, not a limit
Claude Code drives Claude only. That is the Anthropic protocol talking, not OmniaKey — no gateway can make Claude Code run GPT, Gemini, or Grok without breaking the tool. To use those families in an agent, point an OpenAI-compatible tool (Cursor, Cline, aider, Codex, OpenClaw) at OmniaKey's OpenAI-compatible endpoint — the /v1 one below — where only the model id changes: gpt-5.5, gemini-3.1-pro-preview, and grok-4.5 run exactly like a Claude id.
OmniaKey exposes all three surfaces from one key. Coding tools use the OpenAI-compatible /v1; the Gemini-native /v1beta is there for Google's own Gemini SDK. The coding agents guide has the per-tool setup.
Why predictability matters in an agent
A gateway that silently reroutes to a "cheaper equivalent" under load is especially dangerous in a coding agent: a different model formats tool calls differently and reasons about your codebase differently, so a mid-task swap can corrupt a multi-file edit. With OmniaKey, if an upstream is unavailable you get the error and pick another model yourself — never a substitution behind your back.
Still deciding which agent should own that workflow? Read the Claude Code vs Codex comparison before configuring either tool.
If the billing question comes first, the Claude Code API without a subscription guide separates subscription OAuth from legitimate pay-as-you-go API access and explains which credential actually pays for a request.