Spavik
API referenceUsage and plans

Get account usage

GET /v1/usage

Download OpenAPI
GET
/v1/usage

Authorization

apiKey
headerX-Spavik-Api-Key<token>

Spavik integration API key (sk-spv-api-...), sent in X-Spavik-Api-Key.

Query Parameters

from?string
Formatdate
to?string
Formatdate
workspace_id?string

Header Parameters

User-Agent?string

Information 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.

Lengthlength <= 1024
X-Spavik-Client-Name?string

HTTP 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.

Lengthlength <= 128
X-Spavik-Client-Version?string

Version 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.

Lengthlength <= 64

Response Body

Success

application/json
  1. response
plan?string
Value in"free""build""pro""growth""enterprise"
credit_balance?integer

Prediction 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?boolean
predictions_remaining?integer

What 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?boolean

True only when unlimited usage is explicitly configured. An absent balance alone does not imply unlimited usage.

included_units_per_month?integer
period?
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