Get account usage
GET /v1/usage
apiKeyX-Spavik-Api-Key<token>Spavik integration API key (sk-spv-api-...), sent in X-Spavik-Api-Key.
from?stringdateto?stringdateworkspace_id?stringUser-Agent?stringInformation about the agent originating the request, when known. Browsers supply their own value. Optional diagnostic metadata, declared by the caller and never used for authorization. Omit unknown values. Values are trimmed and truncated to the documented length.
length <= 1024X-Spavik-Client-Name?stringHTTP caller: SDK, MCP server or direct application (for example spavik-sdk-python, spavik-sdk-javascript or spavik-mcp). Optional diagnostic metadata, declared by the caller and never used for authorization. Omit unknown values. Values are trimmed and truncated to the documented length.
length <= 128X-Spavik-Client-Version?stringVersion of that SDK, MCP server or direct application. Optional diagnostic metadata, declared by the caller and never used for authorization. Omit unknown values. Values are trimmed and truncated to the documented length.
length <= 64Success
application/json- response
plan?string"free""build""pro""growth""enterprise"credit_balance?integerPrediction balance: granted on sign-up, granted by staff, purchased and refunded, as a single number. Spent after the monthly allowance, and never expires.
credits_low?booleanpredictions_remaining?integerWhat can still be consumed: monthly allowance left plus balance. The same number as the X-Spavik-Predictions-Remaining header on billable responses. Null on an unlimited plan.
unlimited_usage?booleanTrue only when unlimited usage is explicitly configured. An absent balance alone does not imply unlimited usage.
included_units_per_month?integerperiod?window?totals?daily?array<>by_kind?array<>by_workspace?array<>by_api_key?array<>import requestsurl = "https://api.spavik.co/v1/usage"response = requests.request("GET", url)print(response.text){ "plan": "free", "credit_balance": 0, "credits_low": true, "predictions_remaining": 0, "unlimited_usage": true, "included_units_per_month": 0, "period": { "key": "string", "reset_at": "2019-08-24T14:15:22Z", "units_used": 0 }, "window": { "from": "2019-08-24", "to": "2019-08-24" }, "totals": { "units": 0, "predictions": 0 }, "daily": [ { "date": "2019-08-24", "units": 0, "predictions": 0 } ], "by_kind": [ { "key": "string", "label": "string", "units": 0, "predictions": 0 } ], "by_workspace": [ { "key": "string", "label": "string", "units": 0, "predictions": 0 } ], "by_api_key": [ { "key": "string", "label": "string", "units": 0, "predictions": 0 } ]}How is this guide?
Last updated on