Developer documentation
Build with luoluoAI
Connect existing OpenAI or Anthropic SDKs to one developer gateway and access configured GPT, Claude and Grok models. Create a key, change the base URL, and start making requests.
https://api.luoluocoder.com/v1Keep API keys private and only send them to this HTTPS origin.
Quickstart
Three steps are enough for a first request.
Sign in to the console and confirm your available balance.
Open API Keys and create a separate key for each application.
Query /v1/models for the live list, then make a request.
Compatible endpoints
Use the protocol already supported by your application. GPT and Grok models use the OpenAI-compatible route; Claude models can use the Anthropic-compatible route.
POST /v1/chat/completionsPOST /v1/messagesGET /v1/modelsOpenAI SDK
Install the official SDK and override its base URL.
npm install openai
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.LUOLUO_API_KEY,
baseURL: "https://api.luoluocoder.com/v1",
});
const response = await client.chat.completions.create({
model: "gpt-5.4-mini",
messages: [{ role: "user", content: "Hello" }],
});
console.log(response.choices[0].message.content);Python
pip install openai
from openai import OpenAI
import os
client = OpenAI(
api_key=os.environ["LUOLUO_API_KEY"],
base_url="https://api.luoluocoder.com/v1",
)
response = client.chat.completions.create(
model="gpt-5.4-mini",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)Grok with the OpenAI SDK
Configured Grok text models use the same OpenAI-compatible client and base URL. Select a Grok model returned by /v1/models.
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.LUOLUO_API_KEY,
baseURL: "https://api.luoluocoder.com/v1",
});
const response = await client.chat.completions.create({
model: "grok-4.5",
messages: [{ role: "user", content: "Explain this code." }],
});
console.log(response.choices[0].message.content);Grok availability depends on upstream capacity. Query the live model list before deploying a fixed model name.
Anthropic SDK
Use the Anthropic SDK with luoluoAI's compatible endpoint.
npm install @anthropic-ai/sdk
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
apiKey: process.env.LUOLUO_API_KEY,
baseURL: "https://api.luoluocoder.com",
});
const message = await client.messages.create({
model: "claude-sonnet-4-5",
max_tokens: 1024,
messages: [{ role: "user", content: "Hello" }],
});
console.log(message.content);SDK behavior may vary by version. If an SDK automatically appends /v1, use https://api.luoluocoder.com as shown above.
cURL examples
OpenAI-compatible request
curl https://api.luoluocoder.com/v1/chat/completions \
-H "Authorization: Bearer $LUOLUO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.4-mini",
"messages": [{"role":"user","content":"Hello"}]
}'Anthropic-compatible request
curl https://api.luoluocoder.com/v1/messages \
-H "x-api-key: $LUOLUO_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-5",
"max_tokens": 1024,
"messages": [{"role":"user","content":"Hello"}]
}'Models and pricing
Model availability can change with upstream capacity. Always query the live endpoint before relying on a model in production.
curl https://api.luoluocoder.com/v1/models \
-H "Authorization: Bearer $LUOLUO_API_KEY"See configured models and token pricing in the Model Plaza. Prices are listed per one million tokens where applicable.
Balance and top-up
| Payment | Account credit |
|---|---|
| $5 | $50 |
| $10 | $110 |
| $20 | $220 |
| $50 | $600 |
| $100 | $1,300 |
Online payment is currently unavailable. Contact an administrator through Discord to purchase a redeem code. Credit is applied after administrator confirmation. The minimum top-up is $5.
Common errors
| Status | Meaning | Action |
|---|---|---|
| 401 | Missing or invalid API key | Check the authorization header and key status. |
| 402 / 403 | Balance or access restriction | Check balance, model access, and account status. |
| 429 | Rate or concurrency limit | Retry with exponential backoff. |
| 5xx | Temporary gateway or upstream failure | Retry later and include the request ID in support messages. |
Security basics
- Store keys in environment variables, never in browser code or public repositories.
- Create separate keys for development and production.
- Rotate a key immediately if it is exposed.
- Never share API keys, passwords, or payment details in public Discord channels.
Support
For integration help, model issues, redeem codes, or account questions, join the luoluoAI Discord community. Include the endpoint, model, timestamp, HTTP status, and request ID. Do not include your full API key.
Is luoluoAI affiliated with OpenAI, Anthropic or xAI?
No. luoluoAI is an independent developer API gateway. Compatibility does not imply affiliation or endorsement.
Do all configured models remain available at all times?
No. Availability depends on upstream capacity and account routing. Use /v1/models for the current list.
Where can I see my usage?
Sign in to the console and open Usage Records to review requests and charges.