Skip to content

Getting started

LunaRoute is an LLM gateway. You send OpenAI-, Anthropic-, or Responses-shaped requests to one endpoint and LunaRoute routes them to a model on our GPU fleet, or to your own provider key when you bring one.

There is no SDK to install for the basics — the API is HTTP.

Create one in the dashboard. Keys are prefixed lr_. Treat them as secrets; a key authenticates one organization (and, optionally, one project).

Terminal window
curl https://gw.lunaroute.com/v1/chat/completions \
-H "LUNAROUTE-API-KEY: $LUNAROUTE_API_KEY" \
-H "content-type: application/json" \
-d '{
"model": "glm-5.3",
"messages": [{"role": "user", "content": "Say hello in one sentence."}]
}'

See Authentication for the header variants, and First request for OpenAI, Anthropic, and streaming examples.

The @lunaroute/cli configures the coding agent you already use — Claude Code, opencode, pi, Copilot CLI, or any OpenAI-compatible client — against LunaRoute in one command:

Terminal window
npx @lunaroute/cli setup pi # or: claude-code | opencode | openclaw | hermes | copilot-cli | generic