> ## Documentation Index
> Fetch the complete documentation index at: https://lava.so/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenRouter

> OpenRouter is an OpenAI-compatible aggregator in front of hundreds of models.

OpenRouter offers 2 models through Lava's AI Gateway, supporting Chat Completions. Authentication uses `Authorization: Bearer`. See the [OpenRouter API docs](https://openrouter.ai/docs/api-reference/overview) for provider-specific parameters.

> [!NOTE]
>
> Supports both **managed** (Lava's API keys) and **unmanaged** (bring your own credentials) mode.

## Quick Start

```typescript theme={null}
const response = await fetch('https://api.lava.so/v1/forward?u=https%3A%2F%2Fopenrouter.ai%2Fapi%2Fv1%2Fchat%2Fcompletions', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: `Bearer ${forwardToken}`,
  },
  body: JSON.stringify({
    model: 'lava-adaptive',
    messages: [{ role: "user", content: "Hello!" }],
  }),
});
```

## Chat Completions

**Target URL:** `https://openrouter.ai/api/v1/chat/completions`

| | |
| - | - |
| **Content Type** | `application/json` |
| **Streaming** | Yes (set `stream: true` in request body) |

| Model | Input / 1M tokens | Output / 1M tokens |
| - | - | - |
| lava-adaptive | \$0.75 | \$3.75 |
| openrouter-mercury-3 | \$0.20 | \$0.70 |

## Next Steps

> **[All Providers](/docs/gateway/supported-providers.md)**
>
> Browse all supported AI providers

> **[Forward Proxy](/docs/gateway/forward-proxy.md)**
>
> Learn how to construct proxy URLs and authenticate requests


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.