Usage API Reference
Usage API Reference
Section titled “Usage API Reference”Use these endpoints to inspect the current month for one usage kind or for both make and ai together.
Get Usage
Section titled “Get Usage”Endpoint: GET /v1/usage
Query Parameters
Section titled “Query Parameters”| Parameter | Type | Description |
|---|---|---|
kind | string | "make" or "ai" (default: "make") |
Request
Section titled “Request”curl -H "Authorization: Bearer once_live_xxxxxxxxxxxxx" \ "https://api.onceonly.tech/v1/usage?kind=ai"Response
Section titled “Response”{ "plan": "starter", "month": "2026-03", "usage": 128, "limit": 100000, "requests_total_month": 410, "blocked_total_month": 7}Field Meaning
Section titled “Field Meaning”plan- Current plan for the API keymonth- Current UTC billing bucket inYYYY-MMusage- Current enforcement counter for that kindlimit- Monthly plan limit for that kindrequests_total_month- Raw traffic seen this monthblocked_total_month- Requests blocked after hitting the monthly limit
Important Semantics
Section titled “Important Semantics”In the current backend, usage is not the same thing as raw traffic:
- For
make,requests_total_monthcounts allcheck-lockrequests, whileusageis the counter used for plan enforcement. - For
ai,requests_total_monthcounts all lease/run attempts, whileusagetracks acquired work that counts against the AI limit.
If you want the broadest operational view, use requests_total_month together with blocked_total_month.
Get Usage For All Kinds
Section titled “Get Usage For All Kinds”Endpoint: GET /v1/usage/all
Request
Section titled “Request”curl -H "Authorization: Bearer once_live_xxxxxxxxxxxxx" \ "https://api.onceonly.tech/v1/usage/all"Response
Section titled “Response”{ "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 }}Response Headers
Section titled “Response Headers”GET /v1/usage/all also sets:
X-Request-IdX-OnceOnly-PlanX-OnceOnly-Month
Field Meaning
Section titled “Field Meaning”make.usage/ai.usage- Current enforcement countersrequests_total_month- Total requests observed for that kind this monthblocked_total_month- Requests blocked after plan limit enforcementcharged_total_month- AI requests that were newly acquired and chargedpolling_total_month- AI requests that attached to already running work
charged_total_month and polling_total_month are only meaningful for the ai section.
Errors
Section titled “Errors”401 - Missing Authorization
Section titled “401 - Missing Authorization”{ "detail": "Missing Authorization Bearer token"}403 - Invalid or Disabled API Key
Section titled “403 - Invalid or Disabled API Key”{ "detail": "Invalid API key"}429 - Rate Limited
Section titled “429 - Rate Limited”{ "detail": { "error": "rate_limited" }}See also: Free Plan | AI Run API | Runs & Events API