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)
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 →

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 →

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 → Providers → Custom provider
Provider API: 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 →

OpenCode

Open opencode.jsonc and set baseURL to the API address shown in the example. Paste your API key into apiKey. Set modelID to the model ID shown in the example.

{
  "$schema": "https://opencode.ai/config.json",
  "model": "cheaptokens/coder",
  "providers": {
    "cheaptokens": {
      "name": "CheapTokens",
      "package": "@opencode/ai/providers/openai-compatible",
      "settings": {
        "baseURL": "https://api.cheaptokens.dev/v1",
        "apiKey": "YOUR_CHEAPTOKENS_KEY"
      },
      "models": {
        "coder": {
          "name": "zai-org/GLM-5.3-Flash",
          "modelID": "zai-org/GLM-5.3-Flash"
        }
      }
    }
  }
}
Continue

Open ~/.continue/config.yaml and set apiBase to the API address shown in the example. Paste your API key into apiKey. Set model to the model ID shown in the example.

name: CheapTokens
version: 1.0.0
schema: v1
models:
  - name: CheapTokens
    provider: openai
    model: zai-org/GLM-5.3-Flash
    apiBase: https://api.cheaptokens.dev/v1
    apiKey: YOUR_CHEAPTOKENS_KEY
    useResponsesApi: false
    roles: [chat, edit, apply]
Zed

Open agent: open settings → LLM Providers → Add Provider and set API URL to the API address shown in the example. Paste your API key into API Key. Set Model ID to the model ID shown in the example.

Provider:       OpenAI Compatible
Provider name:  CheapTokens
API URL:        https://api.cheaptokens.dev/v1
API Key:        YOUR_CHEAPTOKENS_KEY
Model ID:       zai-org/GLM-5.3-Flash
Context window: 390000
Hermes Agent

Open ~/.hermes/config.yaml and set base_url to the API address shown in the example. Paste your API key into api_key. Set default to the model ID shown in the example.

model:
  provider: custom
  base_url: https://api.cheaptokens.dev/v1
  api_key: YOUR_CHEAPTOKENS_KEY
  default: zai-org/GLM-5.3-Flash
  context_length: 390000
Goose

Open goose configure → Custom Providers → Add A Custom Provider and set API URL to the API address shown in the example. Paste your API key into Static API key. Set Available Models to the model ID shown in the example.

API Type:                OpenAI Compatible
Name:                    CheapTokens
API URL:                 https://api.cheaptokens.dev/v1/chat/completions
Authentication Required: Yes
Static API key:          YOUR_CHEAPTOKENS_KEY
Available Models:        zai-org/GLM-5.3-Flash
Streaming Support:       Yes
OpenHands

Open Settings → LLM → Advanced and set Base URL to the API address shown in the example. Paste your API key into API Key. Set Custom Model to the model ID shown in the example.

Advanced:     On
Custom Model: openai/zai-org/GLM-5.3-Flash
Base URL:     https://api.cheaptokens.dev/v1
API Key:      YOUR_CHEAPTOKENS_KEY
Crush

Open ~/.config/crush/crushrc and set --base-url to the API address shown in the example. Paste your API key into --api-key. Set model add to the model ID shown in the example.

provider add cheaptokens --type completions \
  --base-url "https://api.cheaptokens.dev/v1" \
  --api-key "YOUR_CHEAPTOKENS_KEY"
model add cheaptokens/zai-org/GLM-5.3-Flash \
  --name "CheapTokens" \
  --context-window 390000 \
  --default-max-tokens 4096

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