Claude Code with any model: GPT, Gemini, DeepSeek and Kimi on one key

Set two environment variables and Claude Code runs on any model in the CompanyFabric library, with prompt caching intact on Claude and a budget cap on every key.

Claude Code running on any model through CompanyFabric

Claude Code is the best coding agent I've used, and it's built to talk to one API: Anthropic's Messages API. CompanyFabric serves that same API at /v1/messages. Point Claude Code at it and the agent you already know runs on any model in our library, from Claude Sonnet 5.5 to GPT-5.5, DeepSeek V4.1 Flash or Kimi K3.1 Pro.

This guide takes about two minutes.

1. Point Claude Code at CompanyFabric

Create a key in your dashboard [blocked], then set two variables. They apply to the terminal you set them in, so your normal setup is untouched everywhere else.

bash

2. Pick a model

Claude models keep their usual names. Everything else takes its catalog id:

bash

Claude Code asks once whether to use the API key. Answer yes. From then on every turn shows up in your dashboard with its exact cost.

[Image blocked: Claude Sonnet 5.5 on CompanyFabric]

What happens to each request

  • Claude models pass straight through. We send them to Anthropic exactly as Claude Code wrote them, cache markers included. Prompt caching keeps working: the first turn writes Claude Code's large system prompt to the cache, and every later turn reads it back at Anthropic's cache rate.
  • Every other model is translated. Messages, tool calls and tool results are converted both ways, so file edits, shell commands and search all work on GPT, Gemini, DeepSeek and Kimi too.
  • companyfabric/auto picks for you. The router sends each turn to the cheapest model that fits it.

Which model for what

TaskModelWhy
Day-to-day codingclaude-sonnet-5-5Near-Opus quality, fast, cached prompt keeps it cheap
Long refactors, hard bugsclaude-opus-5-5Fable-class agentic coding at $4 / $20
Bulk edits, tests, docsdeepseek/deepseek-v4-1-flashA fraction of the price for routine work
A second opinionopenai/gpt-5.5Different training, different blind spots
EU-only codebasesmoonshotai/kimi-k3.1-proRuns in Germany with your own Verda key [blocked]

Cap what it spends

Agents can loop. Set a monthly budget on the key in the dashboard and requests stop at the cap, instead of surprising you on the invoice. Give each teammate or CI job its own key and you'll see exactly who spent what.

Bonus: the CompanyFabric MCP server

Add our MCP server and Claude Code can search the model library, quote prices, search the web and check your spend without leaving the terminal:

bash

Then just ask: "Which model is cheapest for a 300K-token refactor, and what will it cost?"

Common questions

I'm also logged in to a Claude subscription. Which one pays? With ANTHROPIC_API_KEY set and approved, the key does, and Claude Code shows "API Usage Billing". Open a new terminal without the variables to go back to your subscription.

Claude Code says my model "isn't recognized". That's expected. Claude Code only knows Anthropic's model names, so for a model like openai/gpt-5.5 it assumes a 200K context and compacts before that. Everything else works normally.

The full setup, with recommended models, is on the Claude Code integration page [blocked].

  • Claude Code
  • Claude
  • Coding agents
  • MCP
  • Prompt caching

Every model in this post is behind one key and one balance. Free starter credits on signup.

Get API Key