Skip to content

Usage API Reference

Use these endpoints to inspect the current month for one usage kind or for both make and ai together.


Endpoint: GET /v1/usage

ParameterTypeDescription
kindstring"make" or "ai" (default: "make")
Terminal window
curl -H "Authorization: Bearer once_live_xxxxxxxxxxxxx" \
"https://api.onceonly.tech/v1/usage?kind=ai"
{
"plan": "starter",
"month": "2026-03",
"usage": 128,
"limit": 100000,
"requests_total_month": 410,
"blocked_total_month": 7
}
  • plan - Current plan for the API key
  • month - Current UTC billing bucket in YYYY-MM
  • usage - Current enforcement counter for that kind
  • limit - Monthly plan limit for that kind
  • requests_total_month - Raw traffic seen this month
  • blocked_total_month - Requests blocked after hitting the monthly limit

In the current backend, usage is not the same thing as raw traffic:

  • For make, requests_total_month counts all check-lock requests, while usage is the counter used for plan enforcement.
  • For ai, requests_total_month counts all lease/run attempts, while usage tracks acquired work that counts against the AI limit.

If you want the broadest operational view, use requests_total_month together with blocked_total_month.


Endpoint: GET /v1/usage/all

Terminal window
curl -H "Authorization: Bearer once_live_xxxxxxxxxxxxx" \
"https://api.onceonly.tech/v1/usage/all"
{
"plan": "starter",
"month": "2026-03",
"make": {
"usage": 42,
"limit": 20000,
"requests_total_month": 314,
"blocked_total_month": 3,
"charged_total_month": 0,
"polling_total_month": 0
},
"ai": {
"usage": 128,
"limit": 100000,
"requests_total_month": 410,
"blocked_total_month": 7,
"charged_total_month": 128,
"polling_total_month": 61
}
}

GET /v1/usage/all also sets:

  • X-Request-Id
  • X-OnceOnly-Plan
  • X-OnceOnly-Month
  • make.usage / ai.usage - Current enforcement counters
  • requests_total_month - Total requests observed for that kind this month
  • blocked_total_month - Requests blocked after plan limit enforcement
  • charged_total_month - AI requests that were newly acquired and charged
  • polling_total_month - AI requests that attached to already running work

charged_total_month and polling_total_month are only meaningful for the ai section.


{
"detail": "Missing Authorization Bearer token"
}
{
"detail": "Invalid API key"
}
{
"detail": {
"error": "rate_limited"
}
}

See also: Free Plan | AI Run API | Runs & Events API