Migrate from Helicone
Replace Helicone's observability proxy with AIgateway. Same edge-level logging, no $79/mo flat fee, and you get routing + caching + every modality on top.
CLI automation for Helicone is shipping: `aig migrate helicone` walks the working tree and rewrites every match.
TL;DR — three lines
# 1. set your AIgateway key export AIGATEWAY_API_KEY="sk-aig-..." # 2. change the base URL base_url="https://api.aigateway.sh/v1" # was https://oai.helicone.ai/v1 # 3. aig migrate helicone # or rewrite by hand
Automated: aig migrate helicone
Walks the current directory tree (ignoring node_modules, build outputs, lockfiles), shows you a preview of every change, and applies them after a y/N confirmation. Leaves *.aig-migrate.bak backups alongside each rewritten file unless you pass --no-backup.
# install once npm i -g aigateway-cli # preview without writing aig migrate helicone --dry-run # apply (with backups) aig migrate helicone # CI-friendly: skip the prompt aig migrate helicone --yes --no-backup
What changes, line-by-line
The table below is what aig migrate helicone rewrites. If you're doing it by hand, do these in order.
| Thing | Helicone | AIgateway |
|---|---|---|
| Base URL | https://oai.helicone.ai/v1 | https://api.aigateway.sh/v1 |
| Auth header | Helicone-Auth: Bearer … | Authorization: Bearer … |
| API key env var | HELICONE_API_KEY | AIGATEWAY_API_KEY |
| Property header | Helicone-Property-Feature | x-aig-tag |
| Cache control | Helicone-Cache-Enabled | On by default; x-cache: skip to disable |
| Platform fee | $79/mo+ flat | 5% per call, no monthly fee |
| Observability | Logs only | Logs + cost-attribution tags + sub-accounts |
| Catalog | Whatever OpenAI/Anthropic you bring | 900+ models across 14 modalities |
Before / after — Python (OpenAI SDK)
from openai import OpenAI
client = OpenAI(
base_url="https://oai.helicone.ai/v1",
api_key=os.environ["HELICONE_API_KEY"],
)
r = client.chat.completions.create(
model="anthropic/claude-opus-4.7",
messages=[{"role": "user", "content": "Hi"}],
)from openai import OpenAI
client = OpenAI(
base_url="https://api.aigateway.sh/v1",
api_key=os.environ["AIGATEWAY_API_KEY"],
)
r = client.chat.completions.create(
model="anthropic/claude-opus-4.7",
messages=[{"role": "user", "content": "Hi"}],
)Behavioral notes
- Helicone proxies your OpenAI/Anthropic keys; AIgateway gives you both routes — managed (we pay) or BYOK (you pay, no markup).
- Property tags map to AIgateway tags. You also get cost-aggregation and budget caps per tag for free.
- If you used Helicone's caching layer, AIgateway caches by default with a 50% discount on hits (vs Helicone's flat caching pricing).
Credit match
Email your last invoice from Helicone to switch@aigateway.sh and we match the credit up to $1,000 (24-hour turnaround). Or read the full pitch at /switch/helicone.
What to read next
- BYOK — bring your existing Helicone provider keys; pay 0% on those routes.
- Sub-accounts — per-customer keys with spend caps; the closest analogue to workspace-isolated keys.
- All migration guides — same docs for OpenRouter, Portkey, Helicone, LiteLLM, Together, Replicate, Fireworks, Requesty.