1.3M+ free tokens on signup

Quickstart

From key to first request in under a minute. If your tool speaks the OpenAI or Anthropic API, it works here — just change the base URL.

1. Get your key

  1. Sign up — new accounts get 1.3M+ free tokens.
  2. Top up your USD balance when you need more.
  3. Your API key appears in the dashboard as soon as there is a balance — copy it right away, it is shown once.

2. Make a request

base_urlhttps://api.cheaptokens.dev/v1
curl
curl https://api.cheaptokens.dev/v1/chat/completions \
  -H "Authorization: Bearer $CHEAPTOKENS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "zai-org/GLM-5.3-Flash",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

OpenAI-compatible clients use the /v1 suffix; Anthropic clients use the root URL.

Tool names are trademarks of their owners. Not affiliated with or endorsed by them.

All examples

Ready-to-copy snippets for GLM-5.3-Flash. To switch the model or insert your key, use the configurator above.

curl
curl https://api.cheaptokens.dev/v1/chat/completions \
  -H "Authorization: Bearer $CHEAPTOKENS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "zai-org/GLM-5.3-Flash",
    "messages": [{"role": "user", "content": "Hello"}]
  }'
Python · OpenAI
from openai import OpenAI

client = OpenAI(
    base_url="https://api.cheaptokens.dev/v1",
    api_key="YOUR_CHEAPTOKENS_KEY",
)
resp = client.chat.completions.create(
    model="zai-org/GLM-5.3-Flash",
    messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)
Node · OpenAI
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.cheaptokens.dev/v1",
  apiKey: process.env.CHEAPTOKENS_API_KEY,
});
const resp = await client.chat.completions.create({
  model: "zai-org/GLM-5.3-Flash",
  messages: [{ role: "user", content: "Hello" }],
});
console.log(resp.choices[0].message.content);
Python · Anthropic
from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.cheaptokens.dev",
    api_key="YOUR_CHEAPTOKENS_KEY",
)
msg = client.messages.create(
    model="zai-org/GLM-5.3-Flash",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello"}],
)
print(msg.content[0].text)
Claude Code

Claude Code — export the variables below (the address has no /v1) and run claude.

# Claude Code → cheaptokens (Anthropic-compatible)
export ANTHROPIC_BASE_URL="https://api.cheaptokens.dev"
export ANTHROPIC_API_KEY="YOUR_CHEAPTOKENS_KEY"
export ANTHROPIC_MODEL="zai-org/GLM-5.3-Flash"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="zai-org/GLM-5.3-Flash"

Step-by-step guide →

Cursor

Cursor — in Cursor Settings → Models, paste your key into OpenAI API Key, turn on Override OpenAI Base URL and add the model ID as a custom model. Per Cursor's documentation, own keys work with chat models only; Tab completion keeps using Cursor's models.

# Cursor Settings → Models → API Keys
OpenAI API Key:           YOUR_CHEAPTOKENS_KEY
Override OpenAI Base URL: https://api.cheaptokens.dev/v1
# Models list → add this ID as a custom model:
Model: zai-org/GLM-5.3-Flash

Step-by-step guide →

Cline

Cline — choose an OpenAI-compatible provider, set base URL and key.

# Cline → Settings → API Provider: OpenAI Compatible
Base URL: https://api.cheaptokens.dev/v1
API Key:  YOUR_CHEAPTOKENS_KEY
Model ID: zai-org/GLM-5.3-Flash

Step-by-step guide →

Aider

Aider — pass --openai-api-base and --openai-api-key (or env vars).

export OPENAI_API_BASE="https://api.cheaptokens.dev/v1"
export OPENAI_API_KEY="YOUR_CHEAPTOKENS_KEY"
aider --model openai/zai-org/GLM-5.3-Flash

Step-by-step guide →

OpenClaw

OpenClaw — add the provider entry below to ~/.openclaw/openclaw.json. On a fresh install, openclaw onboard with the Custom provider choice writes the same entry.

// ~/.openclaw/openclaw.json — add cheaptokens as a provider
{
  models: {
    providers: {
      cheaptokens: {
        baseUrl: "https://api.cheaptokens.dev/v1",
        apiKey: "YOUR_CHEAPTOKENS_KEY",
        api: "openai-completions",
        models: [{ id: "zai-org/GLM-5.3-Flash", name: "GLM-5.3-Flash" }],
      },
    },
  },
  agents: {
    defaults: { model: { primary: "cheaptokens/zai-org/GLM-5.3-Flash" } },
  },
}
// Anthropic-style requests instead? In the provider entry use:
//   api: "anthropic-messages", baseUrl: "https://api.cheaptokens.dev"

Step-by-step guide →

Kilo Code

Kilo Code — choose the OpenAI-compatible provider, set base URL, key, and model id.

# Kilo Code → Settings → API Provider: OpenAI Compatible
Base URL: https://api.cheaptokens.dev/v1
API Key:  YOUR_CHEAPTOKENS_KEY
Model ID: zai-org/GLM-5.3-Flash

Step-by-step guide →

Endpoints

Capabilities and limits

Supported for every model in the catalog: tool_calling, streaming, json_mode, structured_outputs

Model Context Max output per answer Default max_tokens (non-streaming)
GLM-5.3-Flash
zai-org/GLM-5.3-Flash
390K 8,192 3,000
DeepSeek-V4-Flash
deepseek-ai/DeepSeek-V4-Flash-0731
380K 32,768 1,500
MiniMax-M2.7
MiniMaxAI/MiniMax-M2.7
180K 8,192 1,500

Without max_tokens, a non-streaming answer stops at the default above. Set max_tokens for longer answers, up to the model's maximum.

Rate limit: 120 requests per minute per API key. Request body: up to 16 MB.

Also available: /v1/responses, /v1/completions, /v1/models/{model}, /v1/capabilities

Guides

Limits & errors

390K context. Errors follow the standard OpenAI/Anthropic JSON shape. A 402 means the balance is used up or the request carries no API key — top up or add the key.

Ready to build?

Get your key and swap the base URL.

Get started