Usage
Usage endpoints return spend data tracked by the platform.
Check usage with your API key
Section titled “Check usage with your API key”GET /v1/usageReturns 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.
Authentication
Section titled “Authentication”Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxExample
Section titled “Example”curl https://api.cheapestinference.com/v1/usage \ -H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxx"Response
Section titled “Response”{ "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" }}| Field | Description |
|---|---|
budget.spent | Total spend in USD for the current budget period |
budget.limit | Budget cap (null if unlimited) |
budget.duration | Budget reset interval (e.g. "30d") |
budget.resets_at | Next budget reset timestamp |
rate_limits.rpm | Requests per minute limit |
rate_limits.tpm | Tokens per minute limit |
plan.slug | Plan tier ("standard", "pro", or null for credit keys) |
plan.status | Subscription status ("active", "expired") |
plan.expires_at | Subscription expiration timestamp |
credits.balance | Account credit balance in USD |
key.name | Key label |
key.type | "subscription" or "credit" |
key.created_at | Key creation timestamp |
Error responses
Section titled “Error responses”| Status | Reason |
|---|---|
| 401 | Missing, invalid, or unrecognized API key |
| 403 | Key is deactivated |
| 404 | Key not found in the system |
| 429 | Rate limit exceeded |
| 502 | Usage data temporarily unavailable |
Dashboard endpoints
Section titled “Dashboard endpoints”The following endpoints use dashboard authentication (session token or management key) and are used by the web UI.
Get usage summary
Section titled “Get usage summary”GET /api/usageReturns aggregated usage across all your keys.
Query parameters
Section titled “Query parameters”| Parameter | Type | Description |
|---|---|---|
startDate | string | Start date (ISO 8601, e.g. 2026-01-01) |
endDate | string | End date (ISO 8601) |
Example
Section titled “Example”curl "https://api.cheapestinference.com/api/usage?startDate=2026-01-01&endDate=2026-02-01" \ -H "Authorization: Bearer YOUR_AUTH_TOKEN"Get usage per key
Section titled “Get usage per key”GET /api/usage/:keyIdReturns usage data for a specific key.
Example
Section titled “Example”curl https://api.cheapestinference.com/api/usage/clx1abc... \ -H "Authorization: Bearer YOUR_AUTH_TOKEN"Plans (public)
Section titled “Plans (public)”GET /api/plansReturns all available plans with rate limits and pricing. No authentication required.
Example
Section titled “Example”curl https://api.cheapestinference.com/api/plansResponse
Section titled “Response”[ { "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 } }]