Integrate in five minutes
OpenLux speaks the OpenAI protocol. Point base_url at OpenLux, swap in your key, and keep using the SDKs and code you already have.
1. Create an API key
Sign in and open the console to create a key under API keys. The full key is shown once at creation — store it securely.
2. Make a request
cURL
curl https://openlux.lol/v1/chat/completions \
-H "Authorization: Bearer $OPENLUX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.6-sol",
"messages": [{"role": "user", "content": "Hello, introduce yourself"}]
}'Python (OpenAI SDK)
from openai import OpenAI
client = OpenAI(
api_key="sk-openlux-...",
base_url="https://openlux.lol/v1",
)
resp = client.chat.completions.create(
model="gpt-5.6-sol",
messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)3. Supported endpoints
/v1/chat/completions— chat and multimodal input/v1/images/generations— image generation and edits/v1/embeddings— embeddings and retrieval/v1/models— available models
4. Billing and usage
Usage is metered pay-as-you-go. Rates are published on the model catalog, and balances plus spend details are visible in real time, with budget alerts available. Forecast a workload with the LLM API cost calculator, then replace its assumptions with request-log data.
Need a client or framework example? Follow the step-by-step guides for OpenCode, Roo Code, Kilo Code or the Vercel AI SDK.
Comparing gateway operating models? Read LiteLLM vs OpenRouter. Optimizing repeated context? Read the LLM prompt caching guide.
Evaluating a free endpoint before production? Use the free LLM API guide to compare limits and data terms. Building automation on top of the API? Follow the AI code review workflow for Python and GitHub Actions. Handling 429 responses? Read the LLM API rate-limit guide. Planning a backup route? Use the LLM API fallback and failover guide. Diagnosing slow or stalled responses? Read the LLM API timeout guide. See what to capture in request logs with the LLM API observability guide. Browse the complete English guide library.
5. Error codes
| HTTP | Meaning | What to do |
|---|---|---|
| 401 | Invalid or disabled API key | Rotate the key in the console |
| 402 | Insufficient balance | Top up, or retry with a cheaper model |
| 429 | Rate limited | Lower concurrency or retry with backoff |
| 5xx | Upstream or routing error | Retry automatically; contact support if it persists |
For limit dimensions, Retry-After handling, backoff and safe fallback, see the LLM API rate-limits and 429 recovery guide. For retryable errors, model compatibility and side-effect safety, read the LLM API fallback and failover guide. For staged deadlines and stalled streams, see the LLM API timeout guide. To understand request metadata, metrics and alerts, read the LLM API observability guide.
6. Getting help
Open a ticket from the contact page or email support@openlux.lol — support engineers are available 24/7.
7. Frequently asked questions
How do I migrate existing OpenAI code to OpenLux?
Change two values: set base_url to https://openlux.lol/v1 and replace your OpenAI key with an OpenLux key. Request and response shapes stay the same, so the official OpenAI SDKs and existing application logic keep working.
Does OpenLux support streaming, tool calling and multimodal input?
Yes. /v1/chat/completions supports streamed responses, tool and function calling, and multimodal input on models that accept images, so the same endpoint covers chat, agents and vision workloads.
What happens if a request fails?
Failures return standard HTTP codes: 401 for an invalid key, 402 for insufficient balance, 429 for rate limits and 5xx for upstream or routing errors. Every request is traceable in the console logs, and support is available 24/7.