Send your first request
The API is OpenAI-compatible. Point your existing code at this base URL and keep everything else.
Anthropic-style clients are the one exception — see Base URL below.
Try it with curl
# replace YOUR_KEY with the key from your dashboard
curl https://apiclan.us/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_KEY" \
-d '{
"model": "gpt-5.6-sol",
"messages": [{"role": "user", "content": "Say hello in five words."}]
}'
A JSON response means you are done. Anything else — read Something went wrong, it covers every case we have seen.
Get an API key
- Sign in, open API Keys in the dashboard, and create a key.
- A key belongs to one group. The group decides which models it can reach and at what rate, so a key created for one plan will not work on another.
- Keys are shown once. Store it somewhere safe — we cannot recover it, only replace it.
Use it like a password. Anyone holding the key can spend your credits. Keep it out of client-side code, public repositories and screenshots. If a key leaks, delete it in the dashboard and create a new one — that takes effect immediately.
Base URL
Every request has to arrive at a path starting with /v1. Whether you put
/v1 in the base URL depends on your client, because some of them append it
for you and some do not.
| Client | Base URL to enter |
|---|---|
| OpenAI SDK (Python, Node, Go…) | https://apiclan.us/v1 |
| Codex | https://apiclan.us/v1 |
| Cherry Studio, Chatbox, LobeChat | https://apiclan.us/v1 |
| Anything else OpenAI-compatible | https://apiclan.us/v1 |
| Claude Code | https://apiclan.us — no /v1 |
| Anthropic SDK | https://apiclan.us — no /v1 |
If you get HTML back instead of JSON, this is why. A URL that misses
/v1 — or doubles it into /v1/v1 — does not return a clean
404. It returns our website, and your client then fails while trying to parse a web
page as JSON.
The error you see will say something like Unexpected token < or
invalid JSON response, which points nowhere near the real cause. Check
the base URL first — it is the answer more often than not.
Code samples
Python — OpenAI SDK
from openai import OpenAI
client = OpenAI(
api_key="YOUR_KEY",
base_url="https://apiclan.us/v1", # the only line that changes
)
resp = client.chat.completions.create(
model="gpt-5.6-sol",
messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)
Node — OpenAI SDK
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "YOUR_KEY",
baseURL: "https://apiclan.us/v1",
});
const r = await client.chat.completions.create({
model: "claude-opus-5",
messages: [{ role: "user", content: "Hello" }],
});
console.log(r.choices[0].message.content);
Streaming
Streaming works exactly as it does upstream — pass stream: true. We do not
buffer responses, so tokens reach you as they are produced.
Long non-streaming requests. A request that streams can run as long as it
needs. A request with stream: false that takes over 100 seconds to
produce its first byte may be cut off. If you hit that with heavy reasoning
workloads, either turn streaming on or switch your base URL to
https://api.apiclan.us/v1, which has no such limit.
Desktop & CLI tools
Claude Code
Set two environment variables. Note the base URL carries no
/v1 — Claude Code adds /v1/messages itself.
export ANTHROPIC_BASE_URL="https://apiclan.us"
export ANTHROPIC_AUTH_TOKEN="YOUR_KEY"
Codex
Add a custom provider in ~/.codex/config.toml and select it:
model_provider = "apiclan"
model = "gpt-5.6-sol"
[model_providers.apiclan]
name = "APICLAN"
base_url = "https://apiclan.us/v1"
env_key = "APICLAN_API_KEY"
Then put your key in the APICLAN_API_KEY environment variable.
Cherry Studio, Chatbox, LobeChat and similar
Add a provider of type OpenAI, paste https://apiclan.us/v1
as the API host and your key as the API key, then add the model names you want from
the list below. These apps do not discover models automatically.
Models
Use these exact strings as the model value. Current prices are on the
homepage — we keep them there rather than here so you always see live numbers.
| Family | Model IDs |
|---|---|
| GPT | gpt-5.6-sol gpt-5.6-terra gpt-5.6-luna gpt-5.5 |
| Claude | claude-fable-5 claude-opus-5 claude-opus-4.8 claude-sonnet-5 |
| Grok | grok-4.6 |
You can also fetch the list your key can reach:
curl https://apiclan.us/v1/models -H "Authorization: Bearer YOUR_KEY"
Credits & top-ups
- Pay as you go. No subscription, no monthly minimum, no commitment.
- Top up with USDT — 1 USDT gives you 2 credits of API balance.
- Prices are per million tokens, charged separately for input and output.
Redeem codes
Fixed amounts are also sold as redeem codes at /buy. No account is needed to buy one, the code works on any APICLAN account, and you can pass it on. Redeem it in the dashboard under Redeem code.
Anyone holding a redeem code can use it. Treat it like cash — we cannot reissue a code that has been spent.
Something went wrong
| What you see | What it means |
|---|---|
Unexpected token <invalid JSON |
Your base URL is missing /v1, or has it twice. You are receiving
our website instead of the API. See Base URL. |
401 INVALID_API_KEY |
The key is wrong, was deleted, or has a stray space or newline. Copy it again from the dashboard. |
404 on a path you believe exists |
Usually the wrong HTTP method — /v1/chat/completions only answers
POST. A GET returns 404 by design. |
| Model not found | The model string does not match, or your key's group does not include it.
Run the /v1/models call above to see what the key can reach. |
| Insufficient balance | Top up, or redeem a code. Usage is billed per token, so a large context can cost more than expected. |
524 or a timeout on a long request |
A non-streaming request took more than 100 seconds to start responding.
Enable streaming, or use https://api.apiclan.us/v1. |
Still stuck? Open your usage log in the dashboard first. If the failing request is not listed there, it never reached us — which almost always means the base URL is wrong. That one check resolves most reports.