Connect a coding CLI
Most coding tools let you override the API base URL and API key. Point them at merido and they "just work" — merido accepts the major wire formats and routes each request to a real provider.
The two things every tool needs:
- Base URL:
http://127.0.0.1:8788/v1 - API key: a merido client (gateway) key —
merido keys create.
Wire formats
merido speaks several formats on the same data plane, so a tool can talk in whatever dialect it already uses:
- OpenAI —
POST /v1/chat/completions(and/v1/responses,/v1/embeddings,/v1/images/generations,/v1/audio/*). - Anthropic —
POST /v1/messages(and/v1/messages/count_tokens). - Gemini — Google's generate-content format is accepted and translated.
Every format is translated through one canonical representation, so you can, e.g., send Anthropic requests and have them served by an OpenAI-family model (or a virtual model).
Examples
Claude Code
Claude Code speaks the Anthropic format. Point its base URL at merido and use your merido key:
export ANTHROPIC_BASE_URL="http://127.0.0.1:8788"
export ANTHROPIC_API_KEY="<your-merido-key>"Requests land on /v1/messages and are routed by merido.
Codex / OpenAI-style tools
Set the OpenAI base URL and key:
export OPENAI_BASE_URL="http://127.0.0.1:8788/v1"
export OPENAI_API_KEY="<your-merido-key>"Cursor and other clients
Anywhere a tool exposes an "OpenAI-compatible base URL" / "custom endpoint" setting, use http://127.0.0.1:8788/v1 and your merido key. The model you select can be a provider/model string or a virtual-model name you've defined.
Tools that hardcode their host (MITM)
Some clients ignore base-URL settings and dial a provider host directly. For those, merido has an optional MITM interception mode: it runs a local TLS proxy that intercepts known coding-CLI hosts and rewrites their traffic to this gateway's /v1 API.
Enable it with MERIDO_MITM_ENABLED=true (it binds MERIDO_MITM_PORT, default 8443). Because it terminates TLS for intercepted hosts, the client must trust merido's generated root CA; MERIDO_MITM_INSTALL_CA=true installs it into the OS trust store, and MERIDO_MITM_MANAGE_HOSTS=true maps the intercepted hosts to merido in your hosts file. Reach for this only when overriding the base URL isn't possible.
Migrating from Helicone
If you already configured a tool for Helicone, merido accepts Helicone-* request headers on /v1/* and rewrites them to its native equivalents, so a Helicone-configured client works pointed at merido. You can also bulk-import provider connections from a Helicone export:
cargo run -p merido -- import helicone --file ./helicone-export.json