Stophy

Usage

Return daily credit and request counts for the authenticated key.

Return daily credit and request counts for the authenticated key.

Authorization

bearerAuth
AuthorizationBearer <token>

API key from your dashboard. Prefix with Bearer in the Authorization header.

In: header

Query Parameters

days?integer

Number of days of history to return.

Default30

Response Body

application/json

application/json

GET
/v1/usage
curl -X GET "https://example.com/v1/usage"
{  "success": true,  "requestId": "string",  "cacheState": "hit | miss",  "creditsUsed": "number",  "creditsRemaining": "number",  "data": {    "items": [      {        "date": "string",        "credits": "number",        "requests": "number"      }    ]  }}
{  "success": false,  "code": "UNAUTHORIZED",  "error": "string",  "details": null}