caft/docs
Dashboard

Quickstart

One OpenAI-compatible endpoint for many models. Pay per token from prepaid credits, or buy a monthly plan.

1. Get a key

  1. Create an account.
  2. Add credits in Billing, by card or USDC. See Pricing and credits.
  3. In API Keys, select Create API key and copy it. It is shown once.

Use one key per app or environment; all keys share your credits. See API keys and account.

2. Add the connection

SettingValue
API formatOpenAI Chat Completions
Base URLhttps://api.caft.dev/v1
API keyYour caft API key
Model IDglm-5.3-flash, or any ID from the Models page

Connecting directly, your app uses caft's endpoint and key. Through a router, your app uses the router's endpoint and key, and the router uses yours.

3. Send a test request

Put the key in CAFT_API_KEY and run this. The answer streams back token by token; the cost is taken from your credits and shows in Usage.

cURL
curl https://api.caft.dev/v1/chat/completions \
  --header "Authorization: Bearer $CAFT_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "glm-5.3-flash",
  "messages": [{ "role": "user", "content": "Hello" }],
  "max_tokens": 64,
  "stream": true
}'

Any OpenAI SDK works the same way: set the base URL and key, and keep the rest of your code. See SDK examples for Python and TypeScript. A 401 means the key is missing or wrong, and a 403 usually means you are out of credit; Troubleshooting lists every error code.

4. Pick a guide