Skip to Content
Usage

List metered inference events

Permissionusage:readAuthentication
GET
/usage-events

Returns newest-first metering records for this workspace — the same per-request detail the dashboard shows on a call. Exact filters combine with AND, created_to is exclusive, and cursors are bound to the complete filter set; q matches the request id and the branded service and model names. Raw upstream error bodies, unsanitized metadata, the upstream model and provider identifiers, and the serving instance are never returned.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Use a Voice API key or connected-app OAuth access token. Authentication.

Query Parameters

cursor?string

Opaque pagination cursor from a previous response's next_cursor.

limit?integer

Number of catalog resources to return. The server fetches one extra row internally to produce next_cursor.

Range1 <= value <= 200
Default50
q?string

Case-insensitive search across model, provider, provider display name, and request ID.

Length1 <= length <= 200
created_from?string

Inclusive created_at lower bound as RFC3339 or YYYY-MM-DD (midnight UTC).

created_to?string

Exclusive created_at upper bound as RFC3339 or YYYY-MM-DD (midnight UTC). Must be after created_from.

kind?string
Value in"llm""stt""tts""speechlm""embedding""endpointing"
actor?string
Value in"agent""caller""scorer""system""guardrail""analysis"
status?string
Value in"ok""error""timeout"
session_id?string
Formatuuid
turn_index?integer

Conversational turn index. Requires session_id. Exact speech and generation identities take precedence; unmatched legacy requests use a bounded timestamp estimate. Analysis is excluded.

Range0 <= value
request_id?string
Length1 <= length <= 256
streamed?boolean
http_status?integer
Range100 <= value <= 599

Response Body

Safe usage-event page. Nullable fields and next_cursor are always present.

application/json
  1. response
data*array<>
next_cursor*string|null
Example Request
curl -X GET 'https://api.kejue.co/v1/usage-events'
Example Response
{  "data": [    {      "provider_id": "fe3d49af-4061-436b-ae60-f7044f252a44",      "provider_instance_id": "74888419-4aac-4a55-86ad-ca5f887c355d",      "pipeline_mode": "string",      "pipeline_role": "string",      "id": "string",      "ts": "2019-08-24T14:15:22Z",      "kind": "llm",      "actor_kind": "agent",      "status": "ok",      "http_status": 100,      "failure": {        "code": "upstream_error",        "message": "string",        "retryable": true,        "detail": null      },      "latency_ms": 0,      "ttft_ms": 0,      "prompt_tokens": 0,      "completion_tokens": 0,      "total_tokens": 0,      "prompt_cached_tokens": 0,      "audio_duration_sec": 0,      "characters_count": 0,      "streamed": true,      "service_display_name": "string",      "failover_attempts": 0,      "session_id": "1ffd059c-17ea-40a8-8aef-70fd0307db82",      "request_id": "string",      "metadata": {        "generation_id": "string",        "conversational_turn_index": 0,        "turn_index": 0,        "turn_outcome": "completed",        "speech_id": "string"      },      "model_display_name": "string"    }  ],  "next_cursor": "string"}