Coding tools
Each tool on this page reads its base URL and its key from its settings or from environment variables. Point both at Mubit, and the tool's calls go through Mubit with your Mubit key.
Use the base URL your console's Connect page shows.
The examples read the key from MUBIT_API_KEY. To create a key and set it, follow step 1 of the Quickstart.
Send your Mubit key. Subscription sign-ins (Claude Pro or Max, ChatGPT) can't be used: Mubit refuses sign-in tokens with a 401, and never stores them. The settings below make each tool send your Mubit key instead of a sign-in.
Claude Code
Claude Code reads Mubit's base URL and your Mubit key from environment variables. Use Claude Code with Mubit shows the whole set-up: your Anthropic key under Provider keys, a Mubit key, the variables to set, and a first call to check it works.
Codex
A ChatGPT sign-in can't be used: Mubit refuses sign-in tokens, including ChatGPT and Codex logins. The provider below makes Codex send the key in MUBIT_API_KEY instead.
Add a provider for Mubit to ~/.codex/config.toml, and make it the default. Put the first two lines at the top of the file, before any [section]:
model = "gpt-6-luna"
model_provider = "mubit"
[model_providers.mubit]
name = "Mubit"
base_url = "https://api.mubit.ai/openai/v1"
env_key = "MUBIT_API_KEY"
wire_api = "responses"
requires_openai_auth = falsebase_urlis the OpenAI base URL, which ends in/v1.env_keynames the environment variable that holds your Mubit key.wire_api = "responses": Codex calls the Responses API, which Mubit takes on the same base URL.requires_openai_auth = false: Codex doesn't ask for an OpenAI sign-in for this provider.
Then start Codex with codex in a shell where MUBIT_API_KEY is set.
Codex also connects to OpenAI and GitHub directly, for example for its own metrics and update checks. Those connections don't go through Mubit.
Tested with Codex 0.163.0.
Gemini CLI
If the console doesn't list Gemini under the starter credit, add your Gemini key under Provider keys first, as the Provider keys page shows. On the starter credit, token counting gets 403 starter_credit_route and Google Search gets 400 starter_credit_tools.
A Google sign-in can't be used: Mubit refuses Google OAuth tokens. Choose the Gemini API key sign-in, as below.
In ~/.gemini/settings.json, choose the Gemini API key sign-in. It's the Use Gemini API Key choice of Gemini CLI's sign-in menu:
{
"security": {
"auth": {
"selectedType": "gemini-api-key"
}
}
}Then set these in the shell where you start Gemini CLI, and start it:
export GOOGLE_GEMINI_BASE_URL=https://api.mubit.ai/gemini
export GEMINI_API_KEY="$MUBIT_API_KEY"
geminiGOOGLE_GEMINI_BASE_URL is the Gemini base URL. Leave the version path off the end.
Gemini CLI also makes short calls of its own around your prompt, for example to pick a model for it. They show in Requests too.
Gemini CLI also sends usage statistics to Google directly. To turn them off, add "privacy": { "usageStatisticsEnabled": false } to ~/.gemini/settings.json.
Tested with Gemini CLI 0.65.0.
Aider
Aider calls Mubit as an OpenAI-compatible API. Set these in the shell where you start Aider, then start it with your model ID after openai/:
export OPENAI_API_BASE=https://api.mubit.ai/openai/v1
export OPENAI_API_KEY="$MUBIT_API_KEY"
aider --model openai/gpt-6-lunaThe openai/ prefix tells Aider to call the API at OPENAI_API_BASE. Mubit gets the model ID without the prefix.
To use an OpenAI-compatible service such as OpenRouter, set OPENAI_API_BASE to the service's base URL from OpenAI-compatible services, and put the service's model ID after openai/.
If Aider warns that it doesn't know the model's context window or costs, it still sends the call.
Aider loads .env files from your home folder, repo root and current folder, and their values win over the shell's. Check that none sets OPENAI_API_BASE or OPENAI_API_KEY.
Tested with Aider 0.86.2.
Check the set-up
Start the tool and send one prompt. Then open Requests in the console: the call is at the top, and Model asked shows the model ID the tool sent.
If a call fails
The error names its code. Troubleshooting lists the codes and what to do.