Crush Integration
Use Claude and GPT models with Charm's Crush coding agent. One provider entry, full cost tracking.
Crush is Charm's glamorous open-source AI coding agent for your terminal. Connecting it to Halfbill takes a single provider entry in Crush's config — and gives you Claude and GPT models through one API key, with every request tracked in your dashboard.
Prerequisites
-
Crush installed:
# Homebrew brew install charmbracelet/tap/crush # NPM npm install -g @charmland/crushSee the Crush README for Windows, Arch, Nix, and FreeBSD instructions.
-
A Halfbill API key — sign up and create one from your dashboard
Setup
Set Your API Key
Export your Halfbill API key in your shell:
export HALFBILL_API_KEY=your-api-key-hereAdd it to your shell profile (~/.zshrc or ~/.bashrc) to make it permanent.
Add Halfbill as a Provider
Create a crush.json in your project directory (or ~/.config/crush/crush.json for a global setup):
{
"$schema": "https://charm.land/crush.json",
"providers": {
"halfbill": {
"name": "Halfbill",
"type": "openai-compat",
"base_url": "https://api.halfbill.uk/v1",
"api_key": "$HALFBILL_API_KEY"
}
}
}Crush auto-discovers all available models from Halfbill's /v1/models endpoint, so there is no model list to maintain.
Start Coding
Launch Crush:
crushSelect "Halfbill" from the provider list, pick a model, and start building. You can switch models at any time from within Crush.
Why Use Halfbill with Crush
- Claude and GPT — Anthropic and OpenAI models at half list price
- One API key — No separate provider accounts to manage
- Cost tracking — See what each coding session costs in your dashboard
Switching Models
Use Crush's model picker to switch between any of the discovered models.
View all available models on the models page.
Troubleshooting
401 Unauthorized
Verify HALFBILL_API_KEY is exported in the shell where you launch Crush and that the key is active in your dashboard.
404 Not Found
Verify your base_url is set to https://api.halfbill.uk/v1 (note the /v1 at the end).
Models not showing up
Model discovery runs when Crush starts — restart Crush after adding or changing the provider config.
Need help? Email support@halfbill.uk.
How is this guide?