For AI agents

Your agent can set itself up.

Paste one line into Claude Code, Codex, Cursor or any agent. It reads the instructions, asks you to approve a code, then stores its key and tests it. No keys pasted into chats.

Paste into your agent

Read https://quotax.sh/skill.md and set yourself up to use quotax.

Or run the installer

In your terminal
curl -fsSL https://quotax.sh/init | sh
For agents: two steps
curl -fsSL https://quotax.sh/init \
  | sh -s -- start
curl -fsSL https://quotax.sh/init \
  | sh -s -- wait

Some agents only see shell output when a command ends. They run start, show you the code, then run wait. Both need only sh and curl.

How it works

One approval, no pasted secrets.

  1. 1

    Your agent asks for a code

    It calls the device endpoint or runs the installer, then shows you a short code like BCDF-GHJK and a link.

  2. 2

    You approve it

    Open /activate while signed in, check the code and the agent name, pick Free or Pay as you go, and approve.

  3. 3

    The agent stores and tests its key

    It receives a qtx-… key once, saves it to a private file and makes a tiny test call. Only the key prefix is printed.

Per client

Set up your tool.

Each lane works with a key from the device flow or one you create in the dashboard. Model ids change, so pick one from Models instead of copying it from an old example.

The installer saves your key to ~/.config/quotax/env. Load it into any shell with:

Terminal
set -a; . "${QUOTAX_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/quotax}/env"; set +a

Claude Code speaks the Anthropic API, so the base URL is https://quotax.sh without /v1.

Terminal
export ANTHROPIC_BASE_URL=https://quotax.sh
export ANTHROPIC_AUTH_TOKEN=$QUOTAX_API_KEY
# pick an id from https://quotax.sh/models
export ANTHROPIC_MODEL=your-model-id
# Subagents and background tasks use these aliases
export ANTHROPIC_DEFAULT_OPUS_MODEL=your-model-id
export ANTHROPIC_DEFAULT_SONNET_MODEL=your-model-id
export ANTHROPIC_DEFAULT_HAIKU_MODEL=your-model-id

claude

Add the MCP server so Claude can list models, check your balance and test a model by itself:

MCP
claude mcp add --transport http quotax https://quotax.sh/mcp \
  --header "Authorization: Bearer $QUOTAX_API_KEY"

For machines

Everything an agent can read.

Plain text and JSON, built from the live catalog. Give an agent /skill.md and it finds the rest.

Troubleshooting

When something fails.

Common errors, their causes and fixes
401 authentication_error Cause The key is wrong, deleted or disabled, or it was sent in a header quotax does not read. Fix Send it as Authorization: Bearer qtx-… or x-api-key: qtx-…, and check it on API keys.
404 from Claude Code or an Anthropic SDK Cause The base URL ends in /v1, so requests go to /v1/v1/messages. Fix Use https://quotax.sh for Anthropic clients. Only OpenAI clients use https://quotax.sh/v1.
403 permission_error Cause A Free key called a model that is not free right now. Fix Pick a free model from Models, or approve a Pay as you go key.
402 Payment Required Cause The Pay as you go wallet is empty or too low for the request. Fix A human tops up with VietQR on Wallet & billing. Agents cannot pay.
429 rate limit Cause The key hit its per-minute, concurrency or daily limit. Fix Wait for retry-after. Daily limits reset at midnight Asia/Ho_Chi_Minh (GMT+7).
/v1/models is empty Cause The key is Free and no model is free right now. Fix Use a Pay as you go key, or check /api/public/catalog (no key needed) for promotions.
Code not accepted on /activate Cause Codes expire after 15 minutes and work once. Fix Ask the agent to start again for a new code.