Built for agents

Your agents are the user

Machines call us more than people do. The catalogue, the prices, the limits and the setup are endpoints an agent reads — and skills it installs.

The loop, end to end

Discover, price, call, account — then stop at the cap we enforce.

Agent one tt- key GET /v1/models ids · context · source label GET /v1/pricing unit prices · rate_version POST /v1/cost/estimate cost before the spend POST /v1/chat/completions or /v1/messages Enforced per key model allowlist · spend cap RPM · TPM · expiry GET /v1/usage tokens · cost · request id 402 / 429 hard stop, never mid-stream

The cap is on the key, not in the agent's prompt. A loop that misbehaves runs out of allowance; it does not run up a bill.

Install a skill

Claude Code / Claude Agent SDK

curl -fsSL https://tokentoken.ai/\
skills/tokentoken.zip -o s.zip
unzip s.zip -d ~/.claude/skills/

Teaches the agent the base URL, the model ids, how to read the price list, and how to keep itself inside a spend cap.

MCP server

{
  "tokentoken": {
    "command": "npx",
    "args": ["-y","@tokentoken/mcp"],
    "env": {"TT_API_KEY":"tt-..."}
  }
}

Tools for catalogue lookup, cost estimation, usage queries and key rotation.

Site index for crawlers

GET /llms.txt
GET /llms-full.txt
GET /.well-known/ai-plugin.json

Every page in this site has a plain-text equivalent, so an agent reading our docs does not have to parse HTML.

Skill bundles and the MCP package ship alongside the API. Ask support@cflabs.ai for a format we do not publish yet.

Endpoints an agent actually needs

EndpointWhy an agent wants it
GET /v1/modelsExactly the models this key may call, with context length, modality and source label
GET /v1/pricingCurrent prices and the rate multiplier, with a version string to pin against
POST /v1/cost/estimateWhat a call will cost before making it — for planning inside a budget
GET /v1/usageSpend and token counts by key, model and day
GET /v1/balanceRemaining credits and the amount currently held by in-flight reservations
POST /v1/chat/completionsOpenAI-compatible, streaming and tool calls
POST /v1/messagesAnthropic Messages, same key

Guardrails for autonomous spend

Limits an agent cannot talk its way around, because we enforce them.

  • Per-key spend ceiling, with a hard stop rather than an overdraft
  • Model allowlist per key, so an agent cannot wander onto an expensive route
  • RPM, TPM and concurrency caps, returned as 429 with Retry-After
  • Expiry dates, so a key handed to an experiment stops working on its own
  • 402 before the upstream call when the balance is short, never half way through a stream
  • Every response carries a request id that ties the call to its line on the invoice
# One key per agent, scoped and capped
POST /v1/keys
{
  "name": "research-agent",
  "models": ["tt/glm-5.3"],
  "quota_usd": 25,
  "rpm": 120,
  "expires_at": "2026-12-01"
}

# Shown once, stored as a hash
{ "key": "tt-live-...", "prefix": "tt-...a91f" }