The gateway proxies more than chat. Every endpoint uses the same key and the same host. Only the path changes.

## Endpoints

| Endpoint | Purpose |
|---|---|
| `POST /v1/chat/completions` | Chat completions (OpenAI compatible) |
| `POST /v1/responses` | OpenAI Responses API |
| `POST /v1/messages` | Anthropic-native Messages |
| `POST /v1beta/models/{model}:generateContent` | Gemini-native |
| `POST /v1/embeddings` | Text embeddings (OpenAI compatible) |
| `POST /v1/images/generations` | Image generation |
| `POST /v1/rerank` | Reranking (Jina-style) |
| `GET /v1/models` | List the models your key can call |

The base URL is `https://api.lune.io`. Use `/v1` for everything except Gemini, which uses `/v1beta`.

## Authentication

Send your key as a bearer token:

```bash
curl https://api.lune.io/v1/models \
  -H "Authorization: Bearer $API_KEY"
```

SDKs that use their own header also work. `x-api-key` (Anthropic) and `x-goog-api-key` (Gemini) accept the same `sk-` key.

A key works only while it is enabled, unexpired, and owned by a current member of the organization. Otherwise the request gets a `401`, the same as for a key that does not exist. You can also restrict a key to certain models or source IPs. See [API keys](/docs/api-keys).

## Model ids

A model id is `vendor/slug`, for example `deepseek/deepseek-v4-pro` or `anthropic/claude-sonnet-4-6`. The full list, with prices, is on [Models](/models). `GET /v1/models` returns the list for your key.

Append `@tag` to pin a quality variant, for example `deepseek/deepseek-v4-pro@exacto`. Omit it to get the default.

> **Private models.** A model marked private is hidden from the public catalog. If your organization has access to one, it appears in `GET /v1/models` and works like any other model. Without access, calling it returns the same error as calling a model that does not exist.

## What changes from the upstream SDK

Only the base URL and the key. Request and response bodies follow the upstream API, and unsupported parameters are rejected rather than silently ignored (see [Errors & rate limits](/docs/errors)).

Every endpoint also accepts an optional [`provider` object](/docs/provider-routing) that steers routing and enforces a [data policy](/docs/data-policy). The gateway removes it before the request goes upstream.
