Crush Integration
Use GPT-5, Claude, Gemini, or any model with Charm's Crush coding agent. One provider entry, 200+ models, full cost tracking.
Crush is Charm's glamorous open-source AI coding agent for your terminal. Connecting it to OffRail takes a single provider entry in Crush's config — and gives you access to 200+ models from 40+ providers 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.
-
An OffRail API key — sign up and create one from your dashboard
Setup
Set Your API Key
Export your OffRail API key in your shell:
export OFFRAIL_API_KEY=your-api-key-hereAdd it to your shell profile (~/.zshrc or ~/.bashrc) to make it permanent.
Add OffRail 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": {
"offrail": {
"name": "OffRail",
"type": "openai-compat",
"base_url": "https://api.offrail.ai/v1",
"api_key": "$OFFRAIL_API_KEY"
}
}
}Crush auto-discovers all available models from OffRail's /v1/models endpoint, so there is no model list to maintain.
Start Coding
Launch Crush:
crushSelect "OffRail" from the provider list, pick a model, and start building. You can switch models at any time from within Crush.
Why Use OffRail with Crush
- 200+ models — GPT-5, Claude, Gemini, Kimi, GLM, and more from 40+ providers
- One API key — Stop juggling credentials for every provider
- Cost tracking — See what each coding session costs in your dashboard
- Automatic fallback — Requests route to a healthy provider if one is down
- Volume discounts — The more you use, the more you save
Locking to a Specific Provider
By default, OffRail automatically fails over to alternative providers if your chosen provider is experiencing downtime. If you want to lock into a specific provider/model mapping — for example to guarantee a fixed price or to always use a single provider — add the X-No-Fallback header to your provider entry:
{
"$schema": "https://charm.land/crush.json",
"providers": {
"offrail": {
"name": "OffRail",
"type": "openai-compat",
"base_url": "https://api.offrail.ai/v1",
"api_key": "$OFFRAIL_API_KEY",
"extra_headers": {
"X-No-Fallback": "true"
}
}
}
}Disabling fallback means requests will fail if the chosen provider is down. See the routing docs for details.
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 OFFRAIL_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.offrail.ai/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? Join our Discord community for support and troubleshooting assistance.
How is this guide?
Continue CLI Integration
Point Continue CLI at Kimi K3, GPT-5, Claude, or 200+ models through OffRail. One config file, unified billing, full cost tracking.
Cursor Integration
Point Cursor's plan and agent modes at Kimi K3, GPT-5, Claude, or 200+ models through OffRail. One base URL override, plus what stays on Cursor's backend.