Endpoints & models
Docs · API

Endpoints & models

Every endpoint the gateway proxies, how requests authenticate, and how model ids are written.

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

Endpoints#

EndpointPurpose
POST /v1/chat/completionsChat completions (OpenAI compatible)
POST /v1/responsesOpenAI Responses API
POST /v1/messagesAnthropic-native Messages
POST /v1beta/models/{model}:generateContentGemini-native
POST /v1/embeddingsText embeddings (OpenAI compatible)
POST /v1/images/generationsImage generation
POST /v1/rerankReranking (Jina-style)
GET /v1/modelsList 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.

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. 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.

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).

Every endpoint also accepts an optional provider object that steers routing and enforces a data policy. The gateway removes it before the request goes upstream.