View as /docs.md
Migrate

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.

ThingHeliconeAIgateway
Base URLhttps://oai.helicone.ai/v1https://api.aigateway.sh/v1
Auth headerHelicone-Auth: Bearer …Authorization: Bearer …
API key env varHELICONE_API_KEYAIGATEWAY_API_KEY
Property headerHelicone-Property-Featurex-aig-tag
Cache controlHelicone-Cache-EnabledOn by default; x-cache: skip to disable
Platform fee$79/mo+ flat5% per call, no monthly fee
ObservabilityLogs onlyLogs + cost-attribution tags + sub-accounts
CatalogWhatever OpenAI/Anthropic you bring900+ models across 14 modalities

Before / after — Python (OpenAI SDK)

BEFORE · Helicone
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"}],
)
AFTER · AIgateway
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

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