Skip to content

Usage

Usage endpoints return spend data tracked by the platform.

GET /v1/usage

Returns budget, rate limits, plan info, credit balance, and key metadata for the authenticated key. Authenticate with your consumption key (sk_xxx) — no dashboard session required.

Authorization: Bearer sk_live_xxxxxxxxxxxxxxxx
Terminal window
curl https://api.cheapestinference.com/v1/usage \
-H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxx"
{
"budget": {
"spent": 1.23,
"limit": 10.0,
"duration": "30d",
"resets_at": "2026-02-15T10:00:00.000Z"
},
"rate_limits": {
"rpm": 60,
"tpm": 3333
},
"plan": {
"slug": "standard",
"status": "active",
"expires_at": "2026-02-15T10:00:00.000Z"
},
"credits": {
"balance": 5.0
},
"key": {
"name": "prod-key",
"type": "subscription",
"created_at": "2026-01-15T10:00:00.000Z"
}
}
FieldDescription
budget.spentTotal spend in USD for the current budget period
budget.limitBudget cap (null if unlimited)
budget.durationBudget reset interval (e.g. "30d")
budget.resets_atNext budget reset timestamp
rate_limits.rpmRequests per minute limit
rate_limits.tpmTokens per minute limit
plan.slugPlan tier ("standard", "pro", or null for credit keys)
plan.statusSubscription status ("active", "expired")
plan.expires_atSubscription expiration timestamp
credits.balanceAccount credit balance in USD
key.nameKey label
key.type"subscription" or "credit"
key.created_atKey creation timestamp
StatusReason
401Missing, invalid, or unrecognized API key
403Key is deactivated
404Key not found in the system
429Rate limit exceeded
502Usage data temporarily unavailable

The following endpoints use dashboard authentication (session token or management key) and are used by the web UI.

GET /api/usage

Returns aggregated usage across all your keys.

ParameterTypeDescription
startDatestringStart date (ISO 8601, e.g. 2026-01-01)
endDatestringEnd date (ISO 8601)
Terminal window
curl "https://api.cheapestinference.com/api/usage?startDate=2026-01-01&endDate=2026-02-01" \
-H "Authorization: Bearer YOUR_AUTH_TOKEN"

GET /api/usage/:keyId

Returns usage data for a specific key.

Terminal window
curl https://api.cheapestinference.com/api/usage/clx1abc... \
-H "Authorization: Bearer YOUR_AUTH_TOKEN"

GET /api/plans

Returns all available plans with rate limits and pricing. No authentication required.

Terminal window
curl https://api.cheapestinference.com/api/plans
[
{
"slug": "standard",
"name": "Standard",
"priceUsdc": "20",
"rateLimits": {
"tpm_limit": 3333,
"rpm_limit": 60
}
},
{
"slug": "pro",
"name": "Pro",
"priceUsdc": "60",
"rateLimits": {
"tpm_limit": 13333,
"rpm_limit": 200
}
}
]