Lovely Router documentation
One prepaid API key for Claude, GPT and Gemini through their native APIs, plus pay-per-result data tools and a browser agent your code can call.
Lovely Router is an API gateway. You keep the SDKs and tools you already use, point them at https://lovelyrouter.com, and pay for exactly what you use from a prepaid balance. There is nothing to install and no request format to learn.
Create a key and make your first request in about a minute.
Claude Code, Codex CLI, Gemini CLI, Cherry Studio and any OpenAI-compatible app.
What you can build#
Claude, GPT and Gemini through their native APIs. Streaming, tools, thinking and caching included.
70+ scrapers and search tools for Google Maps, LinkedIn, TikTok, Amazon and any web page.
Describe a task. An agent does it in a real browser and returns JSON.
Make a request#
Use the SDK you already have. Only the base URL and the key change.
curl https://lovelyrouter.com/v1/messages \
-H "x-api-key: $LOVELY_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{
"model": "claude-sonnet-5.5",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Hello, Claude"}]
}'How it works#
- Native APIs, passed through. Lovely Router never rewrites your request into another format: it goes to a channel that accepts the format you sent. Call each model in its own vendor's API and every feature of that API keeps working. How the gateway works
- Official prices, prepaid. Models are billed per token at the vendor's list price, from a balance you top up by card. When the balance reaches zero, requests stop. There are no surprise bills. Credits & billing
- Capacity that scales. Traffic is spread across pooled capacity. Bursts queue for a few seconds instead of failing, and failed calls are retried on another channel before you ever see an error. Rate limits & failover
- Cache-aware routing. Each conversation stays on the channel that holds its prompt cache, so cached input stays cheap across turns. Prompt caching
- Every call logged. Tokens, cost, latency and status for every request in your dashboard. Usage & logs
Base URLs#
| Interface | Base URL | Auth header |
|---|---|---|
| Anthropic SDK | https://lovelyrouter.com | x-api-key or Authorization: Bearer |
| OpenAI SDK | https://lovelyrouter.com/v1 | Authorization: Bearer |
| Gemini SDK | https://lovelyrouter.com | x-goog-api-key |
| Data tools and browser agent | https://lovelyrouter.com/v1 | Authorization: Bearer |
| MCP server | https://lovelyrouter.com/mcp | Authorization: Bearer |
Docs for your AI assistant
Every page is available as plain Markdown. Add .md to any docs URL, or give your agent /docs/llms.txt for the full index.
Get help#
Questions about a request, a charge or your account? Open a request from Support in the dashboard, with the x-lovely-request-id of the call if there is one. Service health is on the status page.