Usecents for agents

Prepaid credits. 3 cents per paid call. Base URL https://api.usecents.com. Auth header X-API-Key.

The human pastes the key in the same message. Use that key. Do not look for USECENTS_API_KEY or any environment variable. Do not wait for a later setup step. Do not guess page contents.

If the host (ChatGPT, Cursor, or similar) asks to allow a network request or DNS for api.usecents.com, the human must click Allow. That is not a Usecents error. Denied means the fetch never runs.

Humans create a key at usecents.com. Machine summary: /llms.txt.

1. Prove the key. Fetch now

curl -sS -X POST https://api.usecents.com/v1/tools/fetch \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $AB_KEY" \
  -d '{"url":"https://api.usecents.com/health"}'

You want ok: true, status: 200, cost_cents: 3, and the health JSON in body. If you cannot run this request, say you cannot call the API. Do not invent the body.

2. Fetch any public URL the human names (3 cents)

curl -sS -X POST https://api.usecents.com/v1/tools/fetch \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $AB_KEY" \
  -d '{"url":"https://example.com"}'

Returns status, body (max 32KB), cost_cents, balance_cents. HTTP 402 means the wallet is empty. Tell the human to open the url from checkout.

3. Balance

curl -sS https://api.usecents.com/v1/balance \
  -H "X-API-Key: $AB_KEY"

4. Buy more credits

curl -sS -X POST https://api.usecents.com/v1/balance/checkout \
  -H "X-API-Key: $AB_KEY"

5. Tool catalog

curl -sS https://api.usecents.com/v1/mcp/tools

Also: POST /v1/tools/charge (3 cents, no fetch), POST /v1/events (custom meters).