moth docs
Reference Usage

Usage

Returns the account's balance and its last 30 days of calls, tokens and spend, by day and by model.

GEThttps://api.runmoth.si/v1/usage

Only settled calls are counted, and the figures are the whole account's, whichever key asks. Days run oldest first and models by spend, highest first.

Errors

401authentication_errorThe key is missing, revoked or expired
429rate_limit_errorToo many reads from the key, so wait for retry-after
curl https://api.runmoth.si/v1/usage \
  -H "Authorization: Bearer $MOTH_API_KEY"
Response
{
  "balance_usd": "12.418306",
  "requests": 214,
  "prompt_tokens": 181220,
  "completion_tokens": 40415,
  "spent_usd": "0.581694",
  "daily": [
    {
      "date": "2026-10-30",
      "requests": 31,
      "spent_usd": "0.074120"
    }
  ],
  "by_model": [
    {
      "model": "gemini-3.8-flash",
      "requests": 160,
      "prompt_tokens": 150300,
      "completion_tokens": 33010,
      "units": 0,
      "spent_usd": "0.118261"
    }
  ]
}