Skip to main content
GET
Get Usage

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

Successful Response

Response from GET /v1/usage - retrieving user's credit purchases and usage history.

balance_credits
number
required

Current credit balance, to two decimal places (can be negative if credits consumed without sufficient balance)

has_credits
boolean
required

Whether the user has credits available (balance > 0)

purchases
ApiPurchaseV1 · object[]
required

List of credit purchases, most recent first

usage
ApiUsageV1 · object[]
required

List of credit usage records, most recent first. Limited to the 500 most recent records.

auto_reload
AutoReloadSettingsV1 · object | null

Auto Reload settings if configured

top_up_url
string
default:https://happenstance.ai/integrations/keys

URL to purchase more credits