Limits and credit terms

Two discovery endpoints, both unauthenticated, each published from the configuration the service actually enforces. Read them instead of inferring a cap or a price.

GET /v1/limits - service limits

Base URL https://api.nanotoll.dev. Served by the compress service, from the same configuration the compress handler enforces.

{
  "modes": {
    "deterministic": {
      "max_input_chars": 200000,
      "price_per_call_usd": "0",
      "available": true
    },
    "extractive": {
      "max_input_tokens": 12500,
      "max_input_chars": 40000,
      "tokenizer": "xlm-roberta",
      "price_per_call_usd": "0.0008",
      "available": true
    },
    "verified": {
      "max_input_tokens": 7000,
      "max_input_chars": 20000,
      "tokenizer": "xlm-roberta",
      "price_per_call_usd": "0.0015",
      "available": true
    }
  },
  "request_timeout_seconds": 35,
  "max_inflight_model": 8,
  "account_endpoint": "https://api.nanotoll.dev/api/v1/account",
  "receipt_verification": {
    "endpoint": "/v1/receipts/verify",
    "public_keys": "/.well-known/nanotoll-verify.json"
  }
}
fieldmeaning
modes.<mode>.price_per_call_usdflat fee per call, decimal string (never a float)
modes.<mode>.max_input_tokenscap in tokenizer tokens; authoritative for the model modes
modes.<mode>.max_input_charscharacter bound; the enforced number for deterministic
modes.<mode>.availablefalse when a model the mode needs is not loaded
request_timeout_secondsthe service's request budget
max_inflight_modelconcurrent model requests the service admits
account_endpointwhere per-key state (tier, balance, expiry) lives
receipt_verificationserver-side receipt check and the public key set

A payload over the published cap is refused with HTTP 413 before billing. Model modes are capped in tokens because model work tracks tokens, not characters; the two bounds can disagree, and the token bound wins.

GET /api/v1/limits - credit terms

Base URL https://api.nanotoll.dev. Served by the account service, from the same configuration the deposit watcher enforces and the trial issuer grants.

{
  "min_deposit_usd": "0.01",
  "free_trial": {
    "grant_usd": "0.5",
    "expiry_days": 30
  }
}
  • Minimum credited deposit: $0.01 USDC. Smaller deposits are logged but not credited.
  • Free trial grant: $0.50 of credit, valid for 30 days, issued through POST /api/v1/trial and POST /api/v1/trial/verify (account endpoints).

Money is a decimal string in both endpoints. The two amounts above are rewritten from this endpoint by scripts/gen_pricing_copy.py, and the matching numbers in the served legal text are checked against it before a deploy, so neither can drift from behaviour.

Errors

Both endpoints are static reads of loaded configuration: 200 on success, 500 on an unexpected server failure. No authentication, no billing, and calls here do not consume credit.