Docs

Inference API

Use these APIs to run AI in your own products, services, bots, apps, whatever, for free. Tokens is OpenAI-compatible. Hold 10,000 $Tokens and chat on the site. A key is optional, only if you are calling from your own stack.

Overview

Creator fees on the coin fund a shared prepaid balance. 100% of those fees become AI credits. On this site, a wallet signature is enough. A Bearer key only exists so your own app can call the same gateway.

POST /v1/chat/completionsText chat models.
GET /v1/modelsLive catalog with treasury prices.
GET /v1/accessBalance, eligibility, and spend for a wallet or key.
GET /api/statePublic ledger. No key required.
GET /api/series?days=Daily activity; hourly when days=1.

Wire-compatible with OpenAI chat completions. Change the base URL and the key; change nothing else.

Fees

Creator fees are claimed on a schedule. 100% of claimed fees become AI credits.

Creator fees100% become AI credits

Authentication

The site itself never asks for a key. Sign with a wallet holding the threshold and chat. API requests from your own app use a Bearer key issued on the API keys page. Keys are hashed with SHA-256 before storage. A lost key is replaced, not recovered.

export TOKENS_KEY="sk-tok-..."

Chat Completions

Forwarded upstream almost unchanged. Streaming is server-sent events, byte for byte.

curl https://stalwart-clafoutis-15c03a.netlify.app/v1/chat/completions \
  -H "Authorization: Bearer $TOKENS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-sonnet-4",
    "messages": [{"role":"user","content":"Write a haiku about creator fees."}]
  }'

Vision

Any model whose card shows vision accepts image URLs or data URLs in content parts. The catalog is text models only, no image or video generators.

Models

Unauthenticated. The catalog is fetched live from upstream and cached for ten minutes.

curl https://stalwart-clafoutis-15c03a.netlify.app/v1/models

Access Checking

Cheap enough to poll. Pass a Bearer key or ?wallet=.

curl https://stalwart-clafoutis-15c03a.netlify.app/v1/access -H "Authorization: Bearer $TOKENS_KEY"
curl "https://stalwart-clafoutis-15c03a.netlify.app/v1/access?wallet=YOUR_WALLET"

Rate Limits

Unmetered does not mean unbounded. Limits protect the shared prepaid pool.

Any model10,000 requests / day / wallet

Errors

The envelope is OpenAI's. Upstream errors are relayed rather than reshaped.

401 invalid_api_keyUnknown or revoked key.
403 not_a_holderWallet is below the threshold.
403 not_launchedThe mint is not configured yet.
429 rate_limit_exceededA daily ceiling was hit.
429 daily_limit_reachedA daily ceiling was hit.
502 upstream_unreachableThe provider could not be reached.
503 upstream_unconfiguredNo OpenRouter key is set on this deployment.