API Reference
LLM API exposes an OpenAI/Anthropic-compatible HTTP API. If you already have code calling OpenAI or Anthropic directly, pointing it at LLM API is usually a one-line base-URL change — see Concepts for how requests are forwarded upstream.
Base URL
https://api.llmapi.ai/v1
Claude Code and other tools that speak Anthropic's native /v1/messages protocol append /v1/messages themselves, so they should be pointed at the base URL without the trailing /v1 — see the Claude Code note on the Configure Your AI Coding Tools page for the exact distinction and the 404 it causes if you get it wrong.
Authentication
Most account and inference requests need an Authorization header carrying
your API key as a bearer token. The health check and public model catalog can be
read without a key; all other routes should be authenticated:
curl https://api.llmapi.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $LLM_API_KEY" \
-d '{ "model": "gpt-4o", "messages": [{"role": "user", "content": "Hi"}] }'
Get a key from the dashboard. See API keys for how keys, IAM rules, and per-key policies work.
Headers
| Header | Required | Notes |
|---|
| `Authorization` | Most routes | `Bearer ` |
| `Content-Type` | For JSON bodies | `application/json` |
| `X-LLMAPI-Region` | Optional | `eu`, `us`, `ap`, or `global` for supported multi-region providers |
Every response also includes rate-limit headers (`X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`) — see [Rate limits](/resources).
Versioning
The base path is /v1. There's no publicly documented versioning/deprecation policy beyond that yet.