Anthropic-compatible API

Documentation

Lumosel speaks the Anthropic Messages API. Point any Claude-compatible client at one base URL, use your key, and you're live — Claude Code, cURL, the official SDKs, or any tool that reads the Anthropic environment variables.

Introduction

Everything routes through a single base URL:

Do not append /v1/messages to the base URL — every client adds the path itself. The base URL is just the host.

Authentication

Create a key on the API keys page. It starts with lumo_live_. Send it one of two equivalent ways:

  • x-api-key: YOUR_API_KEY — the standard Anthropic header (SDKs use this).
  • Authorization: Bearer YOUR_API_KEY— used by Claude Code's ANTHROPIC_AUTH_TOKEN.
Treat your key like a password — anyone with it can spend your balance. Rotate it from the dashboard if it leaks.

Quickstart

Pick how you want to connect:

~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.lumosel.vip",
    "ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
    "ANTHROPIC_MODEL": "claude-opus-4-8",
    "ANTHROPIC_SMALL_FAST_MODEL": "claude-haiku-4.5"
  }
}

Pin both models so Claude Code never auto-selects one the gateway doesn't serve. Then just run `claude`.

Replace YOUR_API_KEY with your key and claude-opus-4-8 with any model from the table below.

Models

Live list of models the gateway currently serves. Prices are in USD per 1M tokens; you're billed only for what you use, per request.

Model IDTierInputOutput
claude-opus-4-8Most capable$15$75
claude-opus-4.5Most capable$15$75
claude-sonnet-4.5Balanced$3$15
claude-haiku-4.5Fastest$1$5
gpt-5.5Most capable$10$30

Use the exact Model ID as the model field in your request.

Endpoints

All endpoints are relative to the base URL and mirror the Anthropic API.

POST/v1/messagesCreate a message. Set "stream": true for server-sent events.
POST/v1/messages/count_tokensCount tokens for a request without running it. Not billed.
GET/v1/modelsList the models available to your key.

Errors

The gateway returns standard HTTP status codes with an Anthropic-shaped error body.

401Missing, malformed, or invalid API key.
404Unknown model — check the model ID against the table above.
429Usage window exhausted and balance is empty. Top up or wait for the window to reset.
503Gateway is offline, in maintenance, or the model is temporarily disabled.
502Upstream provider is unreachable. Retries usually recover automatically.

Ready to build?

Grab a key and make your first request in under a minute.

Create an API key