Back to GuidesDeveloper

Use Claude Code (and Anthropic-API Tools) With Any Model

6 min readUpdated June 2026

Why this works

Cloptima exposes an Anthropic-compatible endpoint and translates between protocols. So any tool that speaks the Anthropic Messages API — Claude Code, the Anthropic SDKs, editor agents — can drive non-Anthropic models through Cloptima without code changes, while you keep budgets, policy, and attribution.

Point Claude Code at Cloptima

Set the Anthropic base URL to Cloptima and use a Cloptima virtual key. Pick whatever model your policy approves — the upstream provider can be OpenAI, Gemini, or Bedrock.

export ANTHROPIC_BASE_URL="https://api.cloptima.ai"
export ANTHROPIC_API_KEY="clop_vk_dPXO67p…"   # Cloptima virtual key (sent as x-api-key)

# Run Claude Code as usual. Choose an approved model — e.g. a Gemini or GPT model —
# and Cloptima routes, governs, and records the usage under your team/app.
Great for letting developers use a familiar Anthropic-API workflow on cheaper or specialized models, without ungoverned provider keys on laptops.

Attribution without extra plumbing

When a tool can't easily set custom headers, bind the team and app to the virtual key itself. Policy and attribution use the key's principal, so usage is owned and budgeted even when the client only sends a model and a key.

It stays governed

Model allowlists, budgets, token/rate limits, and no-retention prompt policy all still apply. Spend shows up in the same explorer alongside your other AI usage.

Put This Guide Into Practice

Cloptima automates the strategies described in this guide.

No credit card required
5-minute setup
Free trial