---
title: Lovely Router documentation
description: 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.

:::cards
- :bolt: [Quickstart](/docs/quickstart) Create a key and make your first request in about a minute.
- :plug: [Use with your tools](/docs/integrations) Claude Code, Codex CLI, Gemini CLI, Cherry Studio and any OpenAI-compatible app.
:::

## What you can build

:::cards 3
- :model: [Models API](/docs/models) Claude, GPT and Gemini through their native APIs. Streaming, tools, thinking and caching included.
- :tool: [Data tools](/docs/tools) 70+ scrapers and search tools for Google Maps, LinkedIn, TikTok, Amazon and any web page.
- :browser: [Browser agent](/docs/browser-agent) 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.

```bash title="cURL"
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"}]
  }'
```

```python title="Python"
import anthropic

client = anthropic.Anthropic(
    base_url="https://lovelyrouter.com",
    api_key="lr-...",  # your Lovely Router key
)
message = client.messages.create(
    model="claude-sonnet-5.5",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello, Claude"}],
)
print(message.content[0].text)
```

```js title="Node.js"
import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic({
  baseURL: 'https://lovelyrouter.com',
  apiKey: process.env.LOVELY_API_KEY,
});
const message = await client.messages.create({
  model: 'claude-sonnet-5.5',
  max_tokens: 1024,
  messages: [{ role: 'user', content: 'Hello, Claude' }],
});
console.log(message.content[0].text);
```

## 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](/docs/models)
- **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](/docs/account/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](/docs/models/rate-limits)
- **Cache-aware routing.** Each conversation stays on the channel that holds its prompt cache, so cached input stays cheap across turns. [Prompt caching](/docs/models/caching)
- **Every call logged.** Tokens, cost, latency and status for every request in your [dashboard](/app/logs). [Usage & logs](/docs/account/usage)

## 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` |

> [!TIP] Docs for your AI assistant
> Every page is available as plain Markdown. Add `.md` to any docs URL, or give your agent [/llms.txt](/llms.txt) for the full index.

## Get help {#get-help}

Questions about a request, a charge or your account? Open a request from [Support](/app/support) in the dashboard, with the `x-lovely-request-id` of the call if there is one. Service health is on the [status page](/status).
