Back to dashboard

API Reference Overview

Claude API reference — endpoints, headers, request format. Anthropic-compatible and OpenAI-compatible modes.

LLMsRelay is an independently operated API gateway. It is not affiliated with or endorsed by Anthropic, PBC. Product and model names are used only to describe compatibility.

Base URL: https://api.llmsrelay.com. Anthropic endpoint: POST /v1/messages. OpenAI endpoint: POST /v1/chat/completions. Streaming: SSE on both endpoints. Auth: sk-cs4-* keys.

Base URL

https://api.llmsrelay.com

Endpoints

MethodPathDescription
POST/v1/messagesSend a message (Anthropic format)
POST/v1/chat/completionsSend a message (OpenAI format)
GET/v1/modelsList available models
GET/healthHealth check endpoint

Required Headers

HeaderRequired ForValue
x-api-keyAnthropic formatYour API key
anthropic-versionAnthropic format2023-06-01
AuthorizationOpenAI formatBearer YOUR_API_KEY
content-typeAll POST requestsapplication/json

Recommended Model IDs

Use these stable model IDs in your requests:

  • claude-opus-5-5, claude-fable-5-1 — newest high-capability models
  • claude-opus-4.8, claude-opus-4.7, claude-opus-4.6
  • claude-sonnet-5, claude-sonnet-4.6 — lower-cost daily workloads
  • claude-haiku-4.5 — fast, lower-cost automation

Or use short aliases that always point to the latest version of each tier:

  • opus → claude-opus-5-5
  • sonnet → claude-sonnet-4.6
  • haiku → claude-haiku-4.5

Smoke-test the gateway

Validate gateway access

Before sending real requests, run two cheap checks: a health probe and a models list. They confirm the base URL, your network, and (for /v1/models) your API key — without spending any credits.

1. Liveness probe — /healthz

Public, unauthenticated. Returns 200 and a JSON status payload when the gateway is up. Use it from CI, monitoring, or any shell.

curl -sS -o /dev/null -w "HTTP %{http_code}\n" \
  https://api.llmsrelay.com/healthz

2. Auth + catalogue — /v1/models

Returns the list of model IDs you can use with the messages API. Requires a valid x-api-key. If this works, your key, base URL, and headers are all correct.

curl -sS https://api.llmsrelay.com/v1/models \
  -H "x-api-key: $ANTHROPIC_API_KEY" | jq '.data[].id'

Ready to start?

Create a key and configure a compatible API route in under 2 minutes.

View Plans