Panduan integrasi OpenAPI JSON
Pilih endpoint

Riwayat pemakaian proyek

GET
/usage

Memerlukan scope usage:read.

Filter berdasarkan model, proyek, atau rentang waktu ISO 8601 dengan zona waktu. Atur halaman hasil dengan limit dan offset.

Authorization

BearerKey
headerAuthorizationBearer <token>

API key Tokotoken dari dashboard.

Query Parameters

from?string

Batas waktu ISO 8601.

Formatdate-time
to?string

Batas waktu ISO 8601.

Formatdate-time
model?string
project?string
limit?integer
Range1 <= value <= 100
Default50
offset?integer
Range0 <= value <= 1000000
Default0

Response Body

Berhasil.

application/json
  1. response
object*unknown
data*array<>
limit*integer
Range0 <= value
offset*integer
Range0 <= value
Example Request
curl -X GET 'https://tokotoken.co/v1/usage' \  -H 'Authorization: Bearer <TOKOTOKEN_API_KEY>'
Example Response
{  "object": "list",  "data": [    {      "id": "string",      "projectId": "string",      "keyId": "string",      "modelId": "string",      "status": "string",      "inputTokens": 0,      "outputTokens": 0,      "cost": 0,      "reserved": 0,      "source": "string",      "subscriptionId": "string",      "priceVersion": "string",      "inputRate": 0,      "outputRate": 0,      "createdAt": "2019-08-24T14:15:22Z",      "settledAt": "2019-08-24T14:15:22Z"    }  ],  "limit": 0,  "offset": 0}