Credits, Usage & Status

Four endpoints for running against the gateway rather than calling it: what is left, where it went, and whether anything is broken.

GET /credits

Your balance right now. Reachable even when you are out of credit — it sits above the check that returns 402, because the user who has run out is exactly the one who needs to read this.

Bash
curl https://mume.ai/api/v1/credits \ -H "Authorization: Bearer $MUME_API_KEY"
JSON
{ "object": "credits", "balance": 4.82, "allowance": 0.31, "purchased": 4.51, "currency": "USD", "lots": [ { "remaining": 1.20, "source": "promo", "expires_at": 1786924800 }, { "remaining": 3.31, "source": "purchase", "expires_at": 1809216000 } ] }

Two pools, and only one of them survives

balance is what you can spend and is the sum of the other two. They are reported separately because they behave differently:

  • allowance is the plan allowance. It resets — daily, or at a subscription renewal — and it is the pool an overdraft lands on, so it is routinely zero or negative.
  • purchased is credit you bought. It does not reset, and it expires a year after purchase.

lots is soonest-expiring first, so the grant about to lapse is at the top. expires_at is Unix seconds.

Never cached. A balance you are about to act on has to be the current one, so the response carries cache-control: no-store.

GET /usage

Daily requests, tokens and spend. Defaults to the last 30 days.

Bash
curl "https://mume.ai/api/v1/usage?start_date=2026-07-01&end_date=2026-07-31" \ -H "Authorization: Bearer $MUME_API_KEY"
JSON
{ "object": "usage", "start_date": "2026-07-01", "end_date": "2026-07-31", "data": [ { "date": "2026-07-01", "requests": 412, "prompt_tokens": 1840221, "completion_tokens": 96410, "total_tokens": 1936631, "cost_usd": 1.94 } ], "totals": { "requests": 9120, "prompt_tokens": 41902118, "completion_tokens": 2210984, "total_tokens": 44113102, "cost_usd": 44.02 } }
ParameterNotes
start_dateYYYY-MM-DD, UTC. Defaults to 29 days before end_date.
end_dateYYYY-MM-DD, UTC. Defaults to today.

92 days is the longest span one call will report, and a wider range is a 400 rather than a truncation. Page it if you need more.

Days with no activity come back as zeroes rather than being omitted, so a chart built from data is a continuous series and you do not have to fill the gaps yourself.

GET /health

Liveness, unauthenticated, for an uptime probe.

Bash
curl https://mume.ai/api/v1/health
JSON
{ "status": "ok" }

GET /status

Per-provider health and any route the circuit breaker has opened. Also unauthenticated, because what polls it is a monitor.

JSON
{ "object": "status", "instance": "…", "uptimeSeconds": 84213, "scope": "instance", "providers": [ { "name": "openrouter", "configured": true, "role": "primary", "status": "ok", "degradedModels": [] } ], "degradedRoutes": [] }

Read scope before you page someone

scope: "instance" is not decoration. This reports the instance that answered your request, not the fleet — so a single degraded response does not mean the gateway is down, and a healthy one does not prove it is up. Poll it a few times before drawing a conclusion.

status: "unconfigured" is also not a fault. A provider with no key is one we were never asked to use, and reporting it as unhealthy would make a normal deployment look broken.

Related

  • Authentication — creating and rotating the key these need.
  • Error Handling — including what a 402 looks like when the balance above reaches zero.
  • Pricing — what the numbers in cost_usd are denominated in.