llmrelay
// docs

Start here.

llmrelay speaks the OpenAI HTTP protocol. If your code already talks to OpenAI, Anthropic, Google or a compatible SDK — you'll be running in two lines.

One key, all models

A single API key can call every model llmrelay supports. There is no per-model key, no plan tier to pick, and no dropdown to "switch to Fable" in the dashboard. The model is chosen on every request through the model field in the request body, and billing is applied automatically at that model's rate (see pricing).

The Group field you see when creating a key is a user-tier discount slot (currently default = 1×, i.e. no discount). Leave it as default.

Available models

Pass any of these as the model field. Prices below are per 1M tokens (input / output).

Family Model id Input Output
Claude Opusclaude-opus-4-6, -4-7, -4-8$2.50$12.50
Claude Fableclaude-fable-5$5.00$25.00
Claude Sonnetclaude-sonnet-5$1.00$6.00
GPT-5.5gpt-5.5, gpt-5.6-sol$2.50$15.00
GPT-5.6 Terragpt-5.6-terra$1.25$7.50
GPT-5.6 Lunagpt-5.6-luna$0.50$3.00

Gemini and additional OpenAI variants are supported at the API layer but pricing is still being verified — /pricing is the source of truth for what you'll be billed. Call GET /v1/models for the full runtime list including reasoning variants (-high, -max, -thinking) and embeddings.

Switching models

Change the model parameter — nothing else needs to change. Same base URL, same key.

# Default coding workhorse — Claude Opus 4.7
client.chat.completions.create(model="claude-opus-4-7", ...)

# Long-context / creative — Claude Fable 5
client.chat.completions.create(model="claude-fable-5", ...)

# Fast & cheap — Claude Sonnet 5
client.chat.completions.create(model="claude-sonnet-5", ...)

# OpenAI GPT-5
client.chat.completions.create(model="gpt-5", ...)

Client hint: in Claude Code, OpenCode, Cursor, Zed and similar IDEs, look for a "model" or "default model" field in your provider settings — that's where the model id goes. The key stays the same across all of them.

Endpoint

POST https://api.llmrelay.dev/v1/chat/completions
Authorization: Bearer llm_your_api_key
Content-Type: application/json

All OpenAI-compatible routes are supported: /v1/chat/completions, /v1/completions, /v1/embeddings, /v1/models.

Python

from openai import OpenAI

client = OpenAI(
    base_url="https://api.llmrelay.dev/v1",
    api_key="llm_...",
)

resp = client.chat.completions.create(
    model="claude-opus-4-7",
    messages=[{"role": "user", "content": "Hello"}],
)

Node.js

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.llmrelay.dev/v1",
  apiKey: "llm_...",
});

const resp = await client.chat.completions.create({
  model: "claude-opus-4-7",
  messages: [{ role: "user", content: "Hello" }],
});

curl

curl https://api.llmrelay.dev/v1/chat/completions \
  -H "Authorization: Bearer llm_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-opus-4-7",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

More endpoints

Full reference coming with the public launch. For early access questions: [email protected].