Tool setup guides

OpenClaw Integration

Use Claude and GPT models with OpenClaw across Discord, WhatsApp, Telegram, and more

OpenClaw is a self-hosted gateway that connects your favorite chat apps—WhatsApp, Telegram, Discord, iMessage, and more—to AI coding agents. With Halfbill as a custom provider, you can route all your OpenClaw traffic through a single API, use Claude and GPT models, and keep full visibility into usage and costs.

Using Halfbill Code? This integration also works with a Halfbill Code plan key. Keep the halfbill/ prefix in your OpenClaw config — it names OpenClaw's local provider entry (e.g. halfbill/gpt-5.5). The model ID after it must be a canonical Halfbill model ID from the catalogue.

Setup

Sign Up for Halfbill

Sign up, then create an API key in the dashboard and copy it when shown.

Set Your API Key

export HALFBILL_API_KEY=llmgtwy_your_api_key_here

Configure OpenClaw

Add Halfbill as a custom provider in your ~/.openclaw/openclaw.json:

{
	"models": {
		"mode": "merge",
		"providers": {
			"halfbill": {
				"baseUrl": "https://api.halfbill.uk/v1",
				"apiKey": "${HALFBILL_API_KEY}",
				"api": "openai-completions",
				"models": [
					{
						"id": "gpt-5.5",
						"name": "GPT-5.5",
						"contextWindow": 400000,
						"maxTokens": 128000
					},
					{
						"id": "claude-opus-5",
						"name": "Claude Opus 5",
						"contextWindow": 200000,
						"maxTokens": 32000
					},
					{
						"id": "claude-haiku-4-5",
						"name": "Claude Haiku 4.5",
						"contextWindow": 200000,
						"maxTokens": 32000
					}
				]
			}
		}
	},
	"agents": {
		"defaults": {
			"model": {
				"primary": "halfbill/gpt-5.5"
			}
		}
	}
}

Start Chatting

Launch OpenClaw and start chatting across your connected channels. All requests will be routed through Halfbill.

Why Use Halfbill with OpenClaw

  • Model flexibility — Switch between GPT-5.5, Claude Opus 5, Claude Haiku 4.5, or any other Halfbill model
  • Cost tracking — Monitor exactly how much your chat agents cost to run
  • Single bill — No need to manage multiple API provider accounts
  • Response caching — Repeated queries hit cache, reducing costs

Switching Models

Change the primary model in your config to switch between any model:

{
	"agents": {
		"defaults": {
			"model": { "primary": "halfbill/claude-opus-5" }
		}
	}
}

Model Fallback Chain

OpenClaw supports fallback models. If the primary model is unavailable, it automatically falls back:

{
	"agents": {
		"defaults": {
			"model": {
				"primary": "halfbill/gpt-5.5",
				"fallbacks": ["halfbill/claude-opus-5"]
			}
		}
	}
}

Available Models

Halfbill uses canonical model IDs. You can use any model from the models page. Flagship models include:

ModelBest For
gpt-5.5OpenAI flagship, strong general tasks
claude-opus-5Anthropic's most capable model
claude-sonnet-5Fast reasoning with extended thinking
claude-haiku-4-5Cost-effective, quick responses
gpt-5.6-terraLatest GPT generation, balanced cost
gpt-6-astraMost capable GPT model for complex tasks

View all available models on the models page.

Tips for Chat Agents

Optimize Costs

  1. Use smaller models for simple tasks — Claude Haiku 4.5 handles basic Q&A well
  2. Enable caching — Halfbill caches identical requests automatically
  3. Set token limits — Configure max tokens to prevent runaway costs

Improve Response Quality

  1. Choose the right model — Claude Opus excels at nuanced conversation, GPT-5.5 at general tasks
  2. Use system prompts — Configure your agent's personality and capabilities
  3. Test multiple models — Halfbill makes it easy to A/B test Claude against GPT

Need help? Email support@halfbill.uk.

How is this guide?

On this page