Skip to content

Get Request Usage

GET/v1/usage/{request_id}

Overview

Use x-request-id from the inference response, not the compatible chat completion body ID. Unsettled requests return 404; logs retain their status. Requires usage.read.

Authorization

Authorizationstring · headerRequired

AudioLab API key sent as Bearer <token>. Authentication guide

Parameters

request_idpath · stringRequired

Responses

200Usage row.
application/json
idstringRequired
request_idstringRequired

Durable request ID returned in the x-request-id response header.

workspace_idstringRequired
key_idstring | null
sourcestringRequired

Values: "audio""llm""legacy""images""moderation""secondary"

taskstring | null

Values: "transcription""speech""s2s""llm""embeddings""images""moderation""ocr""rerank"null

modelstring | null
resolved_modelstring | null
providerstring | null
statestring | null

Values: "queued""running""succeeded""failed""canceled""unknown"null

error_codestring | null
unitstringRequired
costnumberRequired

Posted customer wallet debit in USD, after fractional carry.

accrued_coststring | null

Exact per-request customer accrual before carry, with 16 decimal places. Historical rows may not have this value.

currencystringRequired
secondsnumber | null
billable_secondsnumber | null
input_charsinteger | null
input_tokensinteger | null

Input tokens of selected successful outputs, excluding internal and failed attempts.

cached_tokensinteger | null

Input tokens served from cache, when reported by the provider. Null for usage that does not report caching.

output_tokensinteger | null
reasoning_tokensinteger | null
imagesinteger | null
created_atstringRequired

Settlement time for funded LLM, embeddings and images; usage completion time for audio and moderation; recorded event time for legacy data.

401Authentication is missing or invalid.
application/json
errorobjectRequired
Show nested fields
codestringRequired
messagestringRequired
paramstring | null
request_idstring | null
metadataobject

Typed detail for some refusals. budget_exceeded (402): limit (key_budget or workspace_budget) and budget with scope, period, limit, usage and resets_at. key_limit_exceeded (402): limit key_spend_limit. access_denied (403): policy (workspace or key), rule (models, providers or products), product, provider and model.

404Resource was not found.
application/json
errorobjectRequired
Show nested fields
codestringRequired
messagestringRequired
paramstring | null
request_idstring | null
metadataobject

Typed detail for some refusals. budget_exceeded (402): limit (key_budget or workspace_budget) and budget with scope, period, limit, usage and resets_at. key_limit_exceeded (402): limit key_spend_limit. access_denied (403): policy (workspace or key), rule (models, providers or products), product, provider and model.

500Internal server error.
application/json
errorobjectRequired
Show nested fields
codestringRequired
messagestringRequired
paramstring | null
request_idstring | null
metadataobject

Typed detail for some refusals. budget_exceeded (402): limit (key_budget or workspace_budget) and budget with scope, period, limit, usage and resets_at. key_limit_exceeded (402): limit key_spend_limit. access_denied (403): policy (workspace or key), rule (models, providers or products), product, provider and model.