All pages

GET /api/v1/usage

Usage and status

What is left, when it renews, and what has been spent on what. Free, and outside the quota.

Two calls that are not moderation. Neither is billed, and neither is behind the quota check, which is the point of them: an account with no credits left is exactly the one that needs to ask how many are left and when they come back.

GET /api/v1/ping

Is the key good, is the service up. Nothing else. Point a deploy check or a monitor at it and it will never appear on an invoice.

curl https://toxicfilter.com/api/v1/ping \
  -H "Authorization: Bearer tf_live_..."
{
  "ok": true,
  "version": "v1",
  "mode": "live",
  "time": "2026-08-31T09:14:22+00:00"
}

mode is the environment the key belongs to. It is there because a test key pasted into production config is the misconfiguration that hides longest: everything answers 200, nothing is billed, and nobody notices until the month's figures are inexplicably low.

GET /api/v1/usage

curl https://toxicfilter.com/api/v1/usage \
  -H "Authorization: Bearer tf_live_..."
{
  "plan": { "handle": "pro", "name": "pro", "allowance": 150000 },
  "credits": {
    "remaining": 54771,
    "allowance": 150000,
    "renews_at": "2026-09-20T00:00:00+00:00"
  },
  "windows": {
    "monthly": { "allowance": 150000, "used": 95229, "remaining": 54771, "unlimited": false,
                 "started_at": "2026-08-20T00:00:00+00:00", "ends_at": "2026-09-20T00:00:00+00:00" }
  },
  "prices": {
    "moderate": 1,
    "models": { "gpt-5.6-luna": { "input": 2000, "output": 12000, "per": 1000000 } },
    "typical": { "text": 8, "image": 10 }
  },
  "calls": {
    "since": "2026-08-01T00:00:00+00:00",
    "total": 8114,
    "by_decision": { "allow": 7902, "review": 168, "block": 44 },
    "by_kind": { "text": 7801, "image": 210, "email": 103 },
    "used_ai": 611,
    "cached": 1204
  },
  "key": { "prefix": "tf_live_a1b2c3", "mode": "live", "last_used_at": "2026-08-31T09:12:00+00:00" }
}

One window: the month

Your plan's credits are measured over a month, and nothing narrower. A spike, a spam wave or a backfill of old content can spend them as fast as it needs to: the only limit between you and your whole allowance is the per minute rate limit, which answers 429 and means "slow down", never "you are out".

The month starts from your account's first call and repeats from there. It is not tied to the day you are billed, and that is deliberate: a yearly subscription still gets its credits every month, which it could not if the allowance followed the invoice. renews_at says exactly when yours comes back.

windows is an object rather than a single figure so that reading it does not break if another window is ever added. credits.remaining is always the number that decides whether the next call goes through.

Prices

Read from the same tables that do the billing, so a client can work out what a call will cost instead of hard-coding figures that may move. moderate is the check every call pays. models is what each model's tokens are billed at, in credits per per tokens, in and out, rounded up to the next credit on every call. typical is what an ordinary comment and a picture come to, check included, which is also the estimate such a call is let through on.

The cached figure

calls.cached is how many of those calls were answered from a verdict this service had already reached. They are billed as one check whatever they originally cost, so a bill smaller than the call count is not a mistake, and this is where the difference went. See the response for the per-call cached flag.

Limits

Limit
/ping and /usage120 per minute, per account
QuotaNot checked. Both work at zero credits.
CostNothing.

Their own bucket, separate from the 600 a minute the moderation endpoints get, so a health check polling every few seconds never eats the capacity real traffic needs.

What a check costs

One credit is one check, and most checks are settled by the instant detectors alone. The model is the only part of this with a marginal cost, so when it reads a check you pay for the tokens it used, rounded up to the next credit:

CreditsFor
1Settled by the pattern detectors, in single milliseconds. Also what a repeat costs, whatever it cost the first time.
about 8A comment the model read as well, check included. Longer text costs more, a short one less.
about 10An image the model looked at, check included.
0/v1/ping, /v1/usage, the review queue and its feedback. Reading back something already paid for must not cost again.

Allowances are in credits and never in calls, and that is not pedantry: Pro's allowance is 150,000 instant checks, about 18,750 comments read by the model or about 15,000 images. Sold as "calls", the number would be untrue for anybody using the model.

Send "ai": false and a call can only ever cost 1. Whether the model reads something is the caller's decision, on the call, and never ours.