PLATINUM DOCS
ApiInference

Inference usage: tokens, requests and cost

GET
/v1/inference/usage

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

hours?integer

Window in hours (default 720 = 30 days).

Range1 <= value <= 2160

Response Body

application/json

curl -X GET "https://example.com/v1/inference/usage"
{  "hours": 0,  "days": 0,  "bucket": "hour",  "totals": {    "requests": 0,    "input_tokens": 0,    "cached_input_tokens": 0,    "output_tokens": 0,    "cost_usd": 0  },  "models": [    {      "requests": 0,      "input_tokens": 0,      "cached_input_tokens": 0,      "output_tokens": 0,      "cost_usd": 0,      "model": "string"    }  ],  "series": [    {      "requests": 0,      "input_tokens": 0,      "cached_input_tokens": 0,      "output_tokens": 0,      "cost_usd": 0,      "start": "2019-08-24T14:15:22Z"    }  ]}
Empty