Account

Get usage for the authenticated API key

Scope is this API key: tasks created by other keys on the same account, and generations started directly in the web console (which use no API key), are not included. For an account-wide view, use the console's usage page. Hidden historical tasks of this key are included. Other keys and workspaces cannot be selected. Unknown or repeated query parameters are rejected. Dates form a UTC half-open interval [from,to), up to 92 days. The default to is tomorrow in UTC; omitted from is seven days before to. Calls are attributed to task creation time. Spend sums only settled actual charges for those tasks, never pending holds. Late settlement can change a previous day's spend. These are task usage totals, not a statement of cash movements or remaining API-key budget. An additional account-wide token bucket allows a burst of 30 requests and replenishes 30 tokens per minute, shared by all keys on the account. Observe Retry-After on 429. This reporting limit fails closed when its limiter is unavailable. Queries have a five-second server budget; a timeout returns 503 and suggests retrying a shorter date range.

get/api/v1/usage

Request

  • Base URL: https://api.spicyapi.ai
  • URL: https://api.spicyapi.ai/api/v1/usage
  • Auth: HTTP bearer

Query parameters

fromstring date

Inclusive UTC date in YYYY-MM-DD format.

tostring date

Exclusive UTC date in YYYY-MM-DD format.

Response

Current-key usage with exact USD decimal strings and sparse daily/model buckets.

codeinteger required
msgstring required
request_idstring required

Correlation identifier. Include it in support requests.

Changes

No recorded changes to this operation across all 1 revision of this API.