Kimi Code Integration
Install Kimi Code CLI on macOS, Linux, or Windows, then point it at Claude and GPT models through Halfbill. Provider setup in six steps.
Kimi Code CLI is an open-source, AI-powered coding agent developed by Moonshot AI designed to automate software development tasks directly within your terminal. It can read and edit code, execute shell commands, search files, and autonomously manage complex coding workflows.
Kimi Code features first-class support for the models.dev registry, a community-maintained model catalog. This allows Kimi Code to query and configure Halfbill dynamically — fetching the available models, capabilities (such as thinking or vision), and pricing without requiring manual TOML editing.
Using Halfbill Code? This integration also works with a Halfbill
Code plan key. Use the canonical model IDs from
the catalogue (for example claude-sonnet-5).
Prerequisites
- A Halfbill API key — sign up
Setup
Install Kimi Code CLI
If you haven't already, install Kimi Code CLI.
-
macOS or Linux:
curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash -
Homebrew (macOS/Linux):
brew install kimi-code -
Windows (PowerShell):
irm https://code.kimi.com/kimi-code/install.ps1 | iex
Confirm the installation:
kimi --versionLaunch Kimi Code and Open the Provider Manager
Start the interactive terminal in your project directory:
kimiOnce loaded, type the /provider command and press Enter. Select Known third-party provider to fetch the catalog from the registry:

Select Halfbill
Type llm to filter the providers and select Halfbill from the list:
Enter Your API Key
When prompted, paste your Halfbill API key and press Enter. Kimi Code will save it to your local configuration.
Your credentials are saved locally to ~/.kimi-code/config.toml.
Select a Model and Toggle Thinking
The Halfbill catalog is now loaded. Use the arrow keys to browse or type to search for your desired model. Select the llmgateway tab to view only Halfbill models.
You can also toggle the Thinking option (On/Off) at the bottom depending on the model's capabilities.
For example, type gpt-5.5 to find that model, select it, and press Enter.
Start Coding
All set! Kimi Code is now configured. Your requests are routed through Halfbill, and usage and cost statistics appear in your Halfbill dashboard.
Use /model in the terminal session at any time to switch models.
Manual Configuration (Advanced)
If you prefer to configure your environment manually without using the interactive provider manager, you can write settings directly to your configuration file at ~/.kimi-code/config.toml (or C:\Users\<YourUsername>\.kimi-code\config.toml on Windows).
Here is an example TOML configuration that registers GPT-5.5, Claude Sonnet 5, and Claude Opus 5 manually:
default_model = "llmgateway/gpt-5.5"
[providers.llmgateway]
type = "openai"
api_key = "llmgtwy_your_api_key_here"
base_url = "https://api.halfbill.uk/v1"
[models."llmgateway/gpt-5.5"]
provider = "llmgateway"
model = "gpt-5.5"
max_context_size = 400000
max_output_size = 128000
capabilities = [ "image_in", "thinking", "tool_use" ]
display_name = "GPT-5.5"
[models."llmgateway/claude-sonnet-5"]
provider = "llmgateway"
model = "claude-sonnet-5"
max_context_size = 200000
max_output_size = 32000
capabilities = [ "image_in", "thinking", "tool_use" ]
display_name = "Claude Sonnet 5"
[models."llmgateway/claude-opus-5"]
provider = "llmgateway"
model = "claude-opus-5"
max_context_size = 200000
max_output_size = 32000
capabilities = [ "image_in", "thinking", "tool_use" ]
display_name = "Claude Opus 5"Why Use Halfbill with Kimi Code CLI
- Claude and GPT — Anthropic and OpenAI models at half list price in a single CLI configuration.
- Unified cost tracking — Get a detailed breakdown of costs per prompt and session in your dashboard.
- Response caching — Automatically cache repeated requests (such as parsing or building commands) to save API costs.
View all available models on the models page.
Need help? Email support@halfbill.uk.
How is this guide?