Skip to main content

Usage Log

Get a detailed per-request usage log with operation type, model, input/output token counts, and cost estimates for each API call.

Retrieve a detailed log of individual API requests with per-request token counts, model information, and cost estimates. This is the most granular usage view available, showing every LLM call and OCR request made by your account.

Each log entry links back to the originating document (when applicable) via the document_id field, allowing you to trace costs to specific documents in your pipeline.

The usage log is ordered by most recent first. Use page-based pagination to browse historical entries.
GET/v1/credits/usage/log

Response

Response fields

itemsarrayArray of per-request usage log entries.
items[].idstringLog entry UUID.
items[].modelstringModel used for this request.
items[].input_tokensintegerInput tokens consumed.
items[].output_tokensintegerOutput tokens produced.
items[].cache_read_tokensintegerPrompt cache read tokens.
items[].cost_estimate_usdnumberEstimated cost in USD.
items[].operation_typestringOperation category (e.g. extraction, matching).
items[].document_idstring | nullAssociated document UUID if applicable.
items[].created_atstringISO 8601 timestamp of the request.
totalintegerTotal number of log entries.
pageintegerCurrent page number.
limitintegerItems per page.

Response

{
  "items": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "model": "claude-sonnet-4-5",
      "input_tokens": 4280,
      "output_tokens": 612,
      "cache_read_tokens": 0,
      "cost_estimate_usd": 0.022,
      "operation_type": "extraction",
      "document_id": "doc-uuid-abc123",
      "created_at": "2024-09-14T10:32:00.000Z"
    }
  ],
  "total": 8240,
  "page": 1,
  "limit": 20
}

Errors

Error responses

401unauthorizedMissing or invalid API key.
429rate_limitedToo many requests. Retry after the period indicated in the Retry-After header.