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.
- Your key stays visible in the console, so you can copy it again later. That makes your account login the real secret — and each key can be locked to the IP addresses you allow.
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 |
| LM Studio | https://apiclan.us/v1 |
| Cursor, Cline, Roo Code | 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.
LM Studio
LM Studio can talk to a remote OpenAI-compatible endpoint instead of a local model. Open Settings → Model Provider, add a custom provider, then fill in:
| Field | Value |
|---|---|
| Base URL | https://apiclan.us/v1 |
| API Key | your sk-… key |
| Model | gpt-5.6-terra, claude-sonnet-5, or any ID from the table below |
Keep the /v1 in the base URL. LM Studio sends requests to the path exactly
as you type it and does not append /v1 for you.
Local models keep working. Adding a remote provider does not disable the ones you run on your own machine — you pick per conversation which to use.
Cursor, Cline and Roo Code
All three accept a custom OpenAI-compatible endpoint. The base URL is
https://apiclan.us/v1 in each of them.
- Cursor — Settings → Models → enable Override OpenAI Base URL, paste the base URL and key, then add the model IDs you want by hand.
- Cline and Roo Code — pick OpenAI Compatible as the provider, then fill in base URL, key and model ID.
Cursor checks the endpoint when you save. It sends a probe request with whatever model ID is currently selected. If that ID is not one your key can reach, the check fails even though the endpoint is fine. Add a model ID from the table below first, select it, then save.
Using Claude Fable 5.1
claude-fable-5-1 is Anthropic’s long-horizon model — built for agent loops
that run for hours, multi-file refactors and multistep research. It is available here on the
Claude CC Max group. Three things about it will break code written for other Claude models:
- Forced tool use is gone.
tool_choiceset to{"type":"any"}or{"type":"tool"}returns a 400. Thinking is always on for this model, and a forced call would skip it. Keeptool_choice: {"type":"auto"}and say in the prompt when the tool applies. - Cache reads cost a quarter of what they do elsewhere.
$0.25per million tokens — 0.025× base input, against 0.1× on every other Claude model. In a long agent loop most of your input is cache reads, so the model that looks expensive per token can end up cheaper per session. - One million tokens of context, at standard per-token pricing across the whole window, with 128k max output.
It also declines non-default temperature, top_p and
top_k with a 400, and prefilling the assistant response is not supported.
Those apply to claude-fable-5 too.
Generating images
Image generation draws on the same balance, through the standard OpenAI-compatible endpoint — with a key from an image group (see the note below):
curl https://apiclan.us/v1/images/generations \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-image-2.5","prompt":"a red maple leaf on white paper",
"size":"1024x1024","n":1,"response_format":"b64_json"}'
Every image comes back at about 1.6 megapixels and is billed at the 1K price. Keep the
long edge of size at 1024 and set the shape you want: 1024x1024
(1:1), 1024x576 (16:9), 576x1024 (9:16). A larger size does not
give you a larger image — it only moves the request into a higher billing tier.
Models: gpt-image-2.5, gpt-image-2.5-flare,
gpt-image-2.5-sunburst and gpt-image-2. There is also a page in the dashboard — AI Image in the
sidebar — if you would rather type a prompt than write a request.
An image key belongs to an image group. A key belongs to exactly one group, so a key made for text models is refused here. Create a separate key and pick an image group for it.
Prefer response_format: "b64_json" over url. The URL form points
at temporary storage that expires, while the base64 form hands you the file directly.
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-6-astra gpt-5.6-sol gpt-5.6-terra gpt-5.6-luna gpt-5.5 |
| Claude | claude-fable-5-1 claude-fable-5 claude-opus-5 claude-opus-4.8 claude-sonnet-5 |
| Grok | grok-4.6 |
| Image | gpt-image-2 gpt-image-2.5 gpt-image-2.5-flare gpt-image-2.5-sunburst |
Per-model deep dives, each built from real invoices on this account — what a model actually costs on a working day, how much of that is cache reads, and when a cheaper model in the same family does the same job: GPT-6 Astra, GPT-5.6 Sol, GPT-5.6 Terra, Claude Fable 5.1, Claude Opus 5, Claude Sonnet 5, GPT Image 2.5.
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.