AI API docs
Set up your key in Claude Code, Cursor, Cline, your own code and more. One key, every model, the OpenAI or the Anthropic API.
On this page
Introduction
One key for Claude, GPT, Gemini, DeepSeek, Grok, Qwen, GLM and Kimi, through the OpenAI and the Anthropic API.
Most AI apps, SDKs and coding tools let you set a base URL and an API key. Put ours in those two places and the tool talks to every model we carry, with no code to rewrite. A token pack gives you one key with that many tokens; every request takes tokens from it at the model's rate.
https://store.listinglab.my/v1https://store.listinglab.myOpenAI-compatible: https://store.listinglab.my/v1/chat/completions. Anthropic: https://store.listinglab.my/v1/messages. Both take the same key and use the same tokens; pick the one your tool speaks.
ListingLab is an independent reseller, not affiliated with Anthropic, OpenAI, Google or the other model makers. Model names belong to their owners.
Quick start
From buying a pack to your first answer, in five steps.
- Buy a token pack
Pick one on the AI API page and pay by DuitNow QR or from your balance. Packs start at RM 7.90.
- Get your key
It is made the moment you pay and sent to your Telegram chat. It is also on your order page and on My API keys, behind Show key.
- Check the key works
Listing the models uses no tokens, so it is the safest first call. A list of model ids means the key is good.
Terminalcurl https://store.listinglab.my/v1/models \ -H "Authorization: Bearer YOUR_KEY" - Ask a model something
This uses a few tokens. Any model id from the list works; see Models & token rates.
Terminalcurl https://store.listinglab.my/v1/chat/completions \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "claude-sonnet-4-6", "messages": [{"role": "user", "content": "Hello"}]}' - Plug it into your tool
Set the base URL and the key in Claude Code, Cursor, Cline, OpenCode or your own code.
Claude Code
Claude Code reads its address and key from environment variables, so two settings point it at us.
- Install it
Claude Code needs Node.js 18 or newer.
Terminalnpm install -g @anthropic-ai/claude-code - Start it on macOS or Linux
Set the two variables, then run
claudein your project folder. Add the two export lines to~/.zshrcor~/.bashrcto keep them.Terminalexport ANTHROPIC_BASE_URL="https://store.listinglab.my" export ANTHROPIC_API_KEY="YOUR_KEY" claude - Start it on Windows (PowerShell)
$env:sets them for this window; usesetxto keep them.PowerShell$env:ANTHROPIC_BASE_URL = "https://store.listinglab.my" $env:ANTHROPIC_API_KEY = "YOUR_KEY" claude - Or set it once in settings.json
Claude Code reads
~/.claude/settings.jsonwhen it starts, so nothing needs exporting.~/.claude/settings.json{ "env": { "ANTHROPIC_BASE_URL": "https://store.listinglab.my", "ANTHROPIC_API_KEY": "YOUR_KEY" }, "model": "claude-sonnet-4-6" } - Pick a model
Type
/modelinside Claude Code to switch, or set"model"above. Claude models suit it best.Claude Code/model claude-sonnet-4-6
On the first start Claude Code asks whether to use the key it found; choose Yes. If you are logged in to Claude Code with an Anthropic account, run /logout first, and do not also set ANTHROPIC_AUTH_TOKEN.
Cursor
Cursor takes a custom OpenAI key and base URL in its model settings.
- Open the model settings
Cursor Settings, then Models.
- Enter the key and base URL
Under API Keys, paste your key in OpenAI API Key, turn on Override OpenAI Base URL and enter
https://store.listinglab.my/v1. Then press Verify. - Add the models you want
Add each model by its exact id, such as
claude-sonnet-4-6, and turn it on. Pick it in the chat.
Your key is used for the models you add here. Some of Cursor’s own features, such as Tab completion, always run on Cursor’s models and do not use your key.
Cline / Roo Code
Both VS Code extensions take an OpenAI-compatible provider, with the same three fields.
- Choose the provider
Open the extension’s settings and set API Provider to OpenAI Compatible. The Anthropic provider has no base URL field, so it cannot reach us.
- Fill in the connection
The key goes in API Key; it is sent as a bearer token.
SettingsBase URL: https://store.listinglab.my/v1 API Key: YOUR_KEY Model ID: claude-sonnet-4-6
Kilo Code
Kilo Code connects through a custom OpenAI-compatible provider.
- Add a provider
Open Settings, add a custom provider, and choose the OpenAI Compatible type.
- Name it and connect it
The id is for Kilo; the display name is what the model picker shows.
SettingsProvider ID: listinglab Display name: ListingLab Base URL: https://store.listinglab.my/v1 API Key: YOUR_KEY - Add models
Add each model id exactly as the model list shows it, then pick one.
OpenCode
OpenCode keeps the key in its own credential store, so it never lands in your project.
- Install itTerminal
npm install -g opencode-ai - Add the provider
In
~/.config/opencode/opencode.json(every project) or anopencode.jsonin the project. There is no key in this file on purpose.opencode.json{ "$schema": "https://opencode.ai/config.json", "provider": { "listinglab": { "npm": "@ai-sdk/openai-compatible", "name": "ListingLab", "options": { "baseURL": "https://store.listinglab.my/v1" }, "models": { "claude-sonnet-4-6": { "name": "claude-sonnet-4-6" } } } } } - Store the key
Run OpenCode, type
/connect, choose listinglab and paste your key. Then/modelslists the models.Terminalopencode /connect
Python
The official OpenAI and Anthropic SDKs both work: change the base URL and the key.
OpenAI SDK
pip install openaifrom openai import OpenAI
client = OpenAI(
base_url="https://store.listinglab.my/v1",
api_key="YOUR_KEY",
)
reply = client.chat.completions.create(
model="claude-sonnet-4-6",
messages=[{"role": "user", "content": "Hello"}],
)
print(reply.choices[0].message.content)Streaming
The words arrive as they are written. A streamed answer uses the same tokens as a whole one.
stream = client.chat.completions.create(
model="claude-sonnet-4-6",
messages=[{"role": "user", "content": "Count to five"}],
stream=True,
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)Anthropic SDK
pip install anthropicimport anthropic
client = anthropic.Anthropic(
base_url="https://store.listinglab.my",
api_key="YOUR_KEY",
)
message = client.messages.create(
model="claude-sonnet-4-6",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello"}],
)
print(message.content[0].text)Read it from an environment variable, for example os.environ["LISTINGLAB_AI_KEY"], so it never ends up in a file you share or commit.
Node.js
The official OpenAI package, with our base URL.
npm install openaiimport OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://store.listinglab.my/v1',
apiKey: process.env.LISTINGLAB_AI_KEY,
});
const reply = await client.chat.completions.create({
model: 'claude-sonnet-4-6',
messages: [{ role: 'user', content: 'Hello' }],
});
console.log(reply.choices[0].message.content);Streaming
const stream = await client.chat.completions.create({
model: 'claude-sonnet-4-6',
messages: [{ role: 'user', content: 'Count to five' }],
stream: true,
});
for await (const chunk of stream) process.stdout.write(chunk.choices[0]?.delta?.content ?? '');cURL / HTTP
Both formats over plain HTTP.
OpenAI format
The key goes in Authorization: Bearer.
curl https://store.listinglab.my/v1/chat/completions \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "claude-sonnet-4-6", "messages": [{"role": "user", "content": "Hello"}]}'Anthropic format
The key goes in x-api-key, with the anthropic-version header.
curl https://store.listinglab.my/v1/messages \
-H "x-api-key: YOUR_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{"model": "claude-sonnet-4-6", "max_tokens": 1024, "messages": [{"role": "user", "content": "Hello"}]}'Streaming
Add "stream": true; the answer arrives as server-sent events and ends with data: [DONE].
curl -N https://store.listinglab.my/v1/chat/completions \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "claude-sonnet-4-6", "stream": true, "messages": [{"role": "user", "content": "Count to five"}]}'OpenAI-compatible mode
Any OpenAI client works against https://store.listinglab.my/v1.
Requests and answers follow the OpenAI chat completions shape: system messages, temperature, top_p, max_tokens, stop and streaming. Tool calling (tools and tool_choice) is passed to the model as it is, so it works where the model supports it. Pictures go in as image_url parts, to models that can see.
Use the Anthropic format (/v1/messages) for tools built around it, such as Claude Code, and the OpenAI format for nearly everything else. Both cost the same tokens.
The text is in choices[0].message.content. The usage object gives prompt_tokens and completion_tokens: the tokens read and written, before the model's rate is applied.
Models & token rates
Each model takes tokens from your key at its own rate.
A request uses the tokens it reads (your message, and the whole chat so far) plus the tokens it writes, times the model's rate. At 1.8×, a request of 2,000 tokens takes 3,600 from your key; at 0.7× it takes 1,400. Cached input, text the model has seen moments before, is charged at the lower cached rate. Requests that fail use nothing.
46 of 49 models answered at the last check, 2026-10-14 08:41:05. Every model is asked for one word every 30 minutes.
| Model | Token rate | Cached input | Status |
|---|---|---|---|
| claude-fable-5 | 2× | 0.9× | online |
| claude-fable-5-1 | not published | – | down |
| claude-fable-5.1 | not published | – | online |
| claude-haiku-4-5 | not published | – | online |
| claude-opus-4-6 | not published | – | online |
| claude-opus-4-7 | 1.6× | 0.7× | online |
| claude-opus-4-8 | 1.6× | 0.7× | online |
| claude-opus-5 | 1.8× | 0.8× | online |
| claude-opus-5-5 | not published | – | online |
| claude-sonnet-4-6 | 1.2× | 0.5× | online |
| claude-sonnet-5 | 1.4× | 0.6× | online |
| claude-sonnet-5-5 | not published | – | online |
| cursor-fable-5 | 2× | 0.9× | online |
| gpt-5.4-mini | not published | – | online |
| gpt-5.5 | 1.3× | 0.5× | online |
| gpt-5.6-luna | 1.3× | 0.5× | online |
| gpt-5.6-sol | 1.5× | 0.6× | online |
| gpt-5.6-terra | 0.8× | 0.35× | online |
| gpt-6-astra | not published | – | online |
| gpt-6-luna | not published | – | online |
| gpt-6-sol | not published | – | online |
| gpt-6.1-sol | not published | – | online |
| gemini-2.5-flash | not published | – | online |
| gemini-2.5-pro | not published | – | online |
| gemini-3.1-flash-lite | not published | – | online |
| gemini-3.1-pro | not published | – | online |
| gemini-3.5-flash | not published | – | online |
| gemini-3.5-flash-lite | not published | – | online |
| gemini-3.6-flash | not published | – | online |
| gemini-3.7-flash | not published | – | online |
| deepseek-v4-flash | 0.7× | 0.3× | down |
| deepseek-v4-pro | 0.9× | 0.4× | down |
| deepseek-v4.1-flash | not published | – | online |
| grok-4.3 | not published | – | online |
| grok-4.5 | 1.4× | 0.6× | online |
| grok-4.6 | not published | – | online |
| grok-4.7 | not published | – | online |
| qwen3.6-plus | 0.8× | 0.35× | online |
| qwen3.7-max | 0.9× | 0.4× | online |
| qwen3.7-plus | not published | – | online |
| qwen3.8-flash | not published | – | online |
| qwen3.8-max | not published | – | online |
| glm-5.1 | not published | – | online |
| glm-5.2 | 0.9× | 0.45× | online |
| glm-5.3 | 0.95× | 0.45× | online |
| kimi-k2.5 | not published | – | online |
| kimi-k2.6 | not published | – | online |
| kimi-k2.7-code | not published | – | online |
| kimi-k3 | 1× | 0.5× | online |
Use the model id exactly as shown. GET /v1/models with your key gives the same list and uses no tokens.
Your key & usage
Where your key is, what is left on it, and keeping it safe.
- Finding it. The key comes to your Telegram chat when you pay, and is on your order page. On My API keys, Show key reveals it again any time.
- Tokens left. My API keys shows each key's tokens left, tokens used and requests, with every request listed by model, tokens and time. It updates within a minute or two of each request.
- One pack, one key. Each pack you buy is a separate key with its own tokens. Keep one per project, or buy another pack when a key runs low.
- Expiry. No expiry date is set on the keys; the tokens stay until you use them.
- Keep it secret. Anyone with the key can spend its tokens. Never put it in a web page, an app you hand out, or a public repository; read it from an environment variable. In the Playground the key never leaves our server.
Errors
What a refused request means, and what to do.
| Code | Means | What to do |
|---|---|---|
| 401 / 403 | The key is missing, wrong or no longer valid. | Copy the whole key again from My API keys, and check the tool sends it (Bearer, or x-api-key for the Anthropic format). |
| 402 | The key has no tokens left, or too few for the request. | Buy another pack for a new key. |
| 404 | No such model, or a wrong URL. | Use a model id exactly as listed, and the base URL for the format you use. |
| 429 | Too many requests at once. | Wait a few seconds and send it again, more slowly. |
| 500 / 502 / 503 | The model's provider is down for now, for example upstream_circuit_open. | Try another model that is online, or again in a few minutes. Failed requests use no tokens. |
FAQ
What is a token?
A small piece of text, about three quarters of an English word or four letters. Malay text and code use a few more tokens per word. Both what you send and what the model writes back count.
How far does 1 million tokens go?
About 750,000 English words of text, at a rate of 1×. In everyday chat that is roughly 500 to 1,000 messages, fewer on the largest models and more on the small, fast ones. Coding tools such as Claude Code read a lot of your project with each step, so they use tokens much faster than chat.
Why does a long chat use more tokens with each message?
The model has no memory between requests, so every message sends the whole chat so far with it. Start a new chat when you change topic to keep requests small.
Can I add tokens to a key I have?
No. Each pack is its own key with its own tokens; buy another pack when one runs low.
Do you keep my prompts or answers?
We do not. Requests pass through our server and our supplier to the model provider, and all we keep is what usage needs: the model, the number of tokens and the time. Playground chats are not saved.
Which model should I use?
One that is online in the list. For everyday writing and questions, a model with a low rate goes furthest; for hard coding or reasoning, the larger Claude and GPT models do better and use tokens faster.
Is this the official OpenAI or Anthropic API?
No. ListingLab is an independent reseller. The models are the real ones, reached through our gateway with your key.