API reference
Usage
Available from Phase 3
The HTTP API is not live yet. These endpoints are the planned contract, generated from the same schema the server will use. Paths and fields can still change before they ship.
GET
/api/v1/usageAuthorizationBearer <token>
An app token (sk_live_, sk_test_, pk_live_), a browser token (a 5-minute ES256 JWT) or an agent token (sa_live_).
In: header
Query Parameters
from?string
Format
date-timeto?string
Format
date-timeset?string
Length
1 <= lengthtoken?string
Length
1 <= length <= 200Response Body
application/json
application/json
curl -X GET "https://example.com/api/v1/usage"{ "from": "2019-08-24T14:15:22Z", "to": "2019-08-24T14:15:22Z", "token": "string", "sets": [ { "runs": 0, "bandHigh": 0, "bandMedium": 0, "bandLow": 0, "wouldActControlled": 0, "errors": 0, "inputTokens": 0, "outputTokens": 0, "systemOneCostMicroUsd": -9007199254740991, "counterfactualMicroUsd": -9007199254740991, "savingsMicroUsd": -9007199254740991, "llmCallsAvoided": 0, "setId": "83e19bc1-5428-42b5-88ea-b28354e481f3", "slug": "string", "wouldActRoutes": [ { "route": "string", "runs": 0 } ] } ], "totals": { "runs": 0, "bandHigh": 0, "bandMedium": 0, "bandLow": 0, "wouldActControlled": 0, "errors": 0, "inputTokens": 0, "outputTokens": 0, "systemOneCostMicroUsd": -9007199254740991, "counterfactualMicroUsd": -9007199254740991, "savingsMicroUsd": -9007199254740991, "llmCallsAvoided": 0 }, "days": [ { "day": "2019-08-24", "runs": 0, "errors": 0, "systemOneCostMicroUsd": -9007199254740991, "counterfactualMicroUsd": -9007199254740991, "savingsMicroUsd": -9007199254740991, "llmCallsAvoided": 0 } ]}Bandwise is an independent product built on TypeSafe's System One models. It is not TypeSafe's documentation. For the System One models themselves, see docs.typesafe.ai.