Setup guides

Every guide is the same two changes: the base URL and the key. Model ids come straight from the catalog.

Anthropic format
https://api.halfbill.uk
OpenAI format
https://api.halfbill.uk/v1
Key
dashboard → API key

Claude Code

Two environment variables. Switch models with /model.

Anthropic API format

  1. 01Copy your Halfbill key from the dashboard.
  2. 02Export ANTHROPIC_BASE_URL=https://api.halfbill.uk and ANTHROPIC_AUTH_TOKEN=<key> in your shell profile.
  3. 03Optionally pin a default with ANTHROPIC_MODEL=claude-sonnet-5; ANTHROPIC_SMALL_FAST_MODEL=claude-haiku-4-5 keeps the helper model cheap.
  4. 04Run claude. Prompt caching keeps working — Claude Code manages its own cache markers.
bash
export ANTHROPIC_BASE_URL=https://api.halfbill.uk
export ANTHROPIC_AUTH_TOKEN=<your Halfbill key>
export ANTHROPIC_MODEL=claude-sonnet-5
claude

Cursor

Override the OpenAI base URL in Cursor's model settings.

OpenAI API format

  1. 01Open Cursor Settings → Models.
  2. 02Paste your Halfbill key in the OpenAI API key field.
  3. 03Enable “Override OpenAI base URL” and set it to https://api.halfbill.uk/v1.
  4. 04Add a custom model named claude-sonnet-5 or gpt-6-astra, then pick it in Chat or Agent mode. Tab autocomplete stays on Cursor's own backend.
bash
cursor .

Codex CLI

Add a provider block to ~/.codex/config.toml.

OpenAI API format

  1. 01Export HALFBILL_API_KEY=<key> in your shell profile.
  2. 02Add the provider block above to ~/.codex/config.toml.
  3. 03Run codex. Use /model to switch between gpt-6-astra, gpt-5.5 and the Claude models.
bash
export HALFBILL_API_KEY=<your Halfbill key>
codex
~/.codex/config.toml
model = "gpt-6-astra"
model_provider = "halfbill"

[model_providers.halfbill]
name = "Halfbill"
base_url = "https://api.halfbill.uk/v1"
env_key = "HALFBILL_API_KEY"
wire_api = "responses"

Cline

Pick the OpenAI Compatible provider in Cline's settings.

OpenAI API format

  1. 01Open the Cline settings panel in VS Code.
  2. 02Set API Provider to “OpenAI Compatible”.
  3. 03Base URL: https://api.halfbill.uk/v1 · API key: your Halfbill key · Model ID: claude-sonnet-5.
  4. 04Enable prompt caching in Cline's provider settings if it is offered — Claude models support it.
bash
cline

Continue

One model block in config.yaml.

OpenAI API format

  1. 01Open ~/.continue/config.yaml (or the Continue settings UI).
  2. 02Add the model block above with your Halfbill key.
  3. 03Duplicate the block for any other catalog model you want in the picker.
~/.continue/config.yaml
models:
  - name: Claude Sonnet 5 (Halfbill)
    provider: openai
    model: claude-sonnet-5
    apiBase: https://api.halfbill.uk/v1
    apiKey: <your Halfbill key>
    roles: [chat, edit, apply]

OpenCode

Add Halfbill as a custom provider in opencode.json.

OpenAI API format

  1. 01Export HALFBILL_API_KEY=<key> in your shell profile.
  2. 02Add the provider block above to your OpenCode config.
  3. 03Run opencode and pick a Halfbill model with /models.
bash
export HALFBILL_API_KEY=<your Halfbill key>
opencode
~/.config/opencode/opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "halfbill": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Halfbill",
      "options": {
        "baseURL": "https://api.halfbill.uk/v1",
        "apiKey": "{env:HALFBILL_API_KEY}"
      },
      "models": {
        "claude-sonnet-5": {
          "name": "Claude Sonnet 5"
        },
        "gpt-6-astra": {
          "name": "GPT-6 Astra"
        }
      }
    }
  }
}

OpenAI & Anthropic SDKs

Any SDK: change the base URL and the key.

OpenAI API format

  1. 01OpenAI-format clients: base URL https://api.halfbill.uk/v1 (/chat/completions and /responses).
  2. 02Anthropic-format clients: base URL https://api.halfbill.uk (/v1/messages).
  3. 03Use catalog model ids as-is; streaming, tool calls, vision and structured outputs pass through unchanged.
bash
export OPENAI_BASE_URL=https://api.halfbill.uk/v1
export OPENAI_API_KEY=<your Halfbill key>
curl https://api.halfbill.uk/v1/chat/completions -H "Authorization: Bearer $OPENAI_API_KEY" -d '{"model":"gpt-5.5","messages":[{"role":"user","content":"hi"}]}'

Need the full API reference (endpoints, rate limits, caching)? Halfbill Docs