/v1/usage🔑 API KeyGet current plan details, credit usage, and rate limit status.
Response
Success (200)
{
"plan": "pro",
"billing_period": {
"start": "2026-07-01T00:00:00Z",
"end": "2026-08-01T00:00:00Z"
},
"credits": {
"total": 1000,
"used": 342,
"remaining": 658
},
"rate_limit": {
"limit": 20,
"remaining": 15,
"reset": "2026-07-20T14:31:00Z"
},
"api_calls_today": 47
}
| Field | Type | Description |
|-------|------|-------------|
| plan | string | Your current plan: free, pro, business, agency |
| billing_period.start | datetime | Start of current billing period |
| billing_period.end | datetime | End of current billing period |
| credits.total | integer | Total credits this period |
| credits.used | integer | Credits used this period |
| credits.remaining | integer | Credits remaining |
| rate_limit.limit | integer | Requests per minute allowed |
| rate_limit.remaining | integer | Requests remaining in current window |
| rate_limit.reset | datetime | When the rate limit window resets |
| api_calls_today | integer | Total API calls made today |
Best Practices
Poll this endpoint before starting a bulk operation to ensure you have enough credits:
const usage = await client.getUsage();
if (usage.creditsRemaining < imagesToProcess.length) {
console.warn(
`Only ${usage.creditsRemaining} credits left. Need ${imagesToProcess.length}.`
);
// Either: process what you can, prompt upgrade, or wait for reset
}
Caching
Credit usage updates after each /v1/alt-text call, but may lag by up
to 5 seconds. For the most accurate count, use the credits_remaining
field returned in the alt-text response.