API Reference
List metered inference usage and charge history
GET
Project-scoped immutable metering. summary is the authoritative aggregate for the requested window and optional credential filter; data contains the newest 100 records in that same window. Dates are inclusive UTC calendar days.
bearerAuthheader
AuthorizationBearer <ntw_<43 base64url characters>>Project API key. Format ntw_ followed by 43 base64url characters. Keys carry operation scopes and a model allowlist; they are not user session tokens.
from?stringInclusive UTC start date.
Format
dateto?stringInclusive UTC end date. Must be on/after from.
Format
datekey?stringCredential id filter; must belong to the authenticated project.
Format
uuidUsage records and authoritative aggregate
application/json- response
object*"list"Value in
"list"summary*data*array<>Items
items <= 100curl -X GET 'https://api.ninetwos.com/v1/usage' \ -H 'Authorization: Bearer 'Example Response
{ "object": "list", "summary": { "requests": 0, "input_tokens": 0, "output_tokens": 0, "measured": 0, "errors": 0, "completed": 0, "cancelled": 0, "infrastructure_failures": 0 }, "data": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "execution_id": "02ca5b65-a269-4c45-8d4a-0c74ff3ae670", "model": { "id": "zuv-0.5", "name": "Zuv 0.5" }, "usage": { "input_tokens": 0, "output_tokens": 0, "total_tokens": 0 }, "finish_reason": "string", "outcome": "completed", "price": { "currency": "USD", "input_per_million_tokens": "$1.25", "output_per_million_tokens": "$2.85" }, "evidence": { "digest": "string", "model_revision": "string", "tokenizer_revision": "string", "price_revision": "string" }, "created_at": "2019-08-24T14:15:22Z" } ]}