Use Kilo Code with a 5abeer API key: custom provider setup
Add 5abeer to Kilo Code as an OpenAI Compatible custom provider, paste your API key and run Claude, GPT or Gemini models from your balance.
To use Kilo Code with 5abeer, open Settings, go to the Providers tab and add a Custom provider. Set Provider API to OpenAI Compatible, the Base URL to https://api.5abeer.ai/v1, paste your 5abeer API key, and add a model id such as claude-sonnet-5.5. Every request is then paid from your 5abeer balance.
What you need#
- Kilo Code in VS Code, or the Kilo CLI in a terminal. Both read the same provider settings.
- A 5abeer API key for the provider of the model you will use. A key works with one provider's models only, so a Claude key runs Claude models (create a key).
- Some balance on your account (how to pay).
A 5abeer subscription key will not work here. Plans are for the supported apps, and Kilo Code is not one of them. To use the models from Kilo Code, create an API key that is paid from your balance.
Which Kilo Code API provider to choose#
Kilo Code's custom provider dialog has a Provider API setting with three protocols: OpenAI Compatible, OpenAI Responses and Anthropic Messages. Choose OpenAI Compatible. 5abeer serves the OpenAI Chat Completions format at /v1 for Claude, GPT and Gemini models, so this one setting covers every model, as long as the key matches the model's provider.
The built-in Anthropic and OpenAI entries in Kilo's provider list are for keys from those companies. Their setup pages ask only for an API key, so use a custom provider for 5abeer instead.
https://api.5abeer.ai/v1Authorization: Bearer <KEY>https://api.5abeer.aix-api-key: <KEY>https://api.5abeer.ai/v1betax-goog-api-key: <KEY>Set up the Kilo Code API key in VS Code#
Create a 5abeer API key#
In the dashboard, open API → Keys, choose New key and pick the provider. For the example below, pick Claude. Copy the key when it appears.
Open the custom provider dialog#
In Kilo Code, open Settings (the gear icon) and go to the Providers tab. Scroll to the bottom and click Custom provider.
Fill in the fields#
- Provider ID: a short lowercase id, for example
khabeer. Kilo uses it in theprovider_id/model_idformat. - Display name: the name you want to see in the model picker, for example 5abeer.
- Provider API: OpenAI Compatible.
- Base URL:
https://api.5abeer.ai/v1 - API key: your 5abeer key.
- Models: add
claude-sonnet-5.5. Type the id exactly as it appears on the models list. If Kilo fetches a list for you, check each id against the models list before you add it. - Headers: leave empty. Kilo sends the key for you.
- Provider ID: a short lowercase id, for example
Save and pick the model#
Click Submit. The provider's models appear in the model picker. Pick the 5abeer model and send a short request. If a reply comes back, the setup works.
Kilo's docs say token limits and other per-model options live in its kilo.jsonc config file. If you set the context window or max output there, take the values from the model's page, for example claude-sonnet-5.5, instead of guessing.
Use the Kilo CLI with the same key#
The Kilo CLI installs with npm install -g @kilocode/cli and reads kilo.json or kilo.jsonc from ~/.config/kilo/ or from your project folder. Define 5abeer in the global file in ~/.config/kilo/ and keep the key in an environment variable. Kilo resolves {env:...} keys only in the global config, not in a project file:
{
"model": "khabeer/claude-sonnet-5.5",
"provider": {
"khabeer": {
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "https://api.5abeer.ai/v1",
"apiKey": "{env:KHABEER_API_KEY}"
},
"models": {
"claude-sonnet-5.5": {}
}
}
}
}Set KHABEER_API_KEY in the terminal you start kilo from. The model value uses the provider_id/model_id format. You can add name and limit to the model entry; take the limits from the model's page.
Which model to pick in Kilo Code#
Start with claude-sonnet-5.5 for everyday coding. Move to claude-opus-5.5 for long, hard tasks where the extra cost pays off. These are the current Claude models:
Claude Sonnet 5.5DefaultInput$0.60Output$3Context1M
Claude Opus 5.5Input$1.20Output$6Context1M
Claude Fable 5.1Input$3Output$15Context—
Official price from the provider's page, checked October 19, 2026.
All models and pricesThe official price next to ours, with the date it was read:
Official price from the provider's page, checked October 19, 2026.
For GPT or Gemini models, you need a key for that provider, and their ids are on the models list. See the next section.
Claude and GPT in Kilo Code: one key per provider#
Each 5abeer key works with one provider's models. If you call a GPT model with a Claude key, the request returns MODEL_PLATFORM_NOT_ALLOWED.
To use both in Kilo Code, create a second key for GPT and add a second custom provider, for example khabeer-gpt, with the same Provider API and the same Base URL. Add GPT model ids to it. Both providers then show up in the model picker, and both keys draw on the same balance. The same pattern works for Gemini.
Keep Kilo Code API costs under control#
Each request is paid from your balance by the tokens it uses, at the model's 5abeer price (pricing and balance). An agent can send many requests in one task, so set limits on the key itself. You can control every key: a spend limit, an expiry date and an IP allow-list (key controls). A separate key for Kilo Code also keeps its usage apart from your other tools in the dashboard.
Kilo also sells its own hosted access. Its pricing page describes the Kilo Gateway as "Pay-as-you-go hosted AI inference with no subscription" at "exact provider rates with no markup", with a 5% processing fee on credit purchases, and it also supports bringing your own provider keys (kilo.ai/pricing, checked 2026-11-01). With the setup above, Kilo sends requests straight to 5abeer and they are paid from your 5abeer balance.
Common errors and fixes#
INVALID_API_KEYor a 401: the key is wrong or was revoked. Paste it again in the provider dialog. In the CLI, check thatKHABEER_API_KEYis set in that terminal.MODEL_PLATFORM_NOT_ALLOWED: the model belongs to another provider than the key. Use the matching key, or add a second provider.- Wrong base URL: for OpenAI Compatible, use
https://api.5abeer.ai/v1, with/v1and nothing after it. - Model not found: the model id has a typo or a different spelling. Copy it from the models list.
INSUFFICIENT_BALANCE: your balance doesn't cover the request. Top up and retry.
Every code and what it means is in Errors and fixes.
Questions#
Can I use my 5abeer subscription in Kilo Code?#
No. Plans run only the supported apps, and Kilo Code is not one of them. Create an API key and pay for Kilo Code usage from your balance.
Is the built-in Anthropic provider the right choice for a 5abeer Claude key?#
No. Kilo's Anthropic setup page asks for an API key from Anthropic and shows no base URL field. Add 5abeer as a custom provider with OpenAI Compatible instead; Claude models work through it with a Claude key.
Why do I need two keys for Claude and GPT?#
A 5abeer key works with one provider's models only. Create one key per provider, add one custom provider per key, and both use the same balance.
Can Kilo Code fetch the 5abeer model list?#
Kilo tries to fetch models when you enter a Base URL and key, and you can click Fetch models to retry. Whatever the list shows, check each id against the 5abeer models list, or type the id yourself.
Do I need Kilo credits to use my own key?#
Not for this setup. Kilo's pricing page lists bring-your-own-key use next to its own gateway. With 5abeer as a custom provider, requests are paid from your 5abeer balance.
Is the Kilo CLI set up the same way?#
Yes, with a config file instead of the dialog. Add the provider under provider in kilo.jsonc, with options.baseURL, options.apiKey and at least one model.
Sources#
Checked on 2026-11-01:
- Kilo Code docs: Using OpenAI Compatible providers, Custom models, Anthropic and CLI
- Kilo docs source on GitHub: Kilo-Org/kilocode
- Kilo pricing: kilo.ai/pricing
- 5abeer docs: API keys, Base URLs and Errors and fixes
Related guides
- Cline API key: use Claude and GPT in Cline with 5abeerConnect Cline to 5abeer with the OpenAI Compatible provider, paste your API key and run Claude, GPT or Gemini models from your balance.
- Use Roo Code with a 5abeer API key: provider and profilesConnect Roo Code to 5abeer with the OpenAI Compatible provider, paste your API key and pick a model for each mode with configuration profiles.
- AI subscription vs API: the difference and which you needAn AI subscription runs the provider's own apps for a fixed price. An API bills your own code by usage. How they differ and how to choose.
Ready to start?
Pick a plan that runs the official apps, or create an API key to use from your own code.