Documentation / Introduction
Introduction
Build applications with the LLMFlux API — one gateway that routes a single API key to many supported AI models over OpenAI- and Anthropic-compatible endpoints.
Overview
LLMFlux is a hosted inference gateway. Instead of managing a separate key, SDK base URL, and rate-limit contract for every provider, you send one credential to api.llmflux.dev. The gateway authenticates the key, resolves the model you asked for, forwards the request to an enabled upstream provider, meters token usage, and returns a response in the format you expect — OpenAI Chat Completions, OpenAI Responses, or Anthropic Messages.
Quickstart
The fastest path to a first request: create an API key in the dashboard, pick an enabled model ID, and call the gateway. The full walkthrough — including streaming, Responses, and Messages examples in three languages — is in the Quickstart guide.
export LLMFLUX_API_KEY="YOUR_GATEWAY_KEY"
curl https://api.llmflux.dev/v1/chat/completions \
-H "Authorization: Bearer $LLMFLUX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"YOUR_MODEL_ID","messages":[{"role":"user","content":"Hello"}]}'Set LLMFLUX_API_KEY to your issued key and YOUR_MODEL_ID to an ID from the catalogue. Never ship the key in browser code.
API base URLs
Point the SDK you already use at the matching base URL. The OpenAI base includes /v1; the Anthropic SDK adds it itself.
| Client | Base URL | Endpoint |
|---|---|---|
| OpenAI SDK | https://api.llmflux.dev/v1 | /v1/chat/completions, /v1/responses |
| Anthropic SDK / Claude Code | https://api.llmflux.dev | /v1/messages |
See Base URLs for local-development values and a connection check.
Authentication
Every inference request sends your key in the Authorization: Bearer header (or x-api-key). Keys are hashed at rest, shown only once at creation, and can be revoked from the dashboard or an admin without touching the account. Requests without a valid key receive 401 missing_api_key or invalid_api_key — no inference runs. See Authentication for header examples and error handling.