Documentation Index
Fetch the complete documentation index at: https://docs.boltroute.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Return daily credit usage grouped by API key for the authenticated user.GET /api/v1/credits/usage/api-keys
Purpose: return credit usage metrics grouped by API key. Query parameters:from(RFC3339 timestamp, required): start timestamp for the series window.to(RFC3339 timestamp, required): end timestamp for the series window.api_key_id(UUID, optional): filter to a single API key.
fromandtomust be provided together.- The date range is capped at 90 days.
- The query includes credit rows where
metadata.source = "api_key"and legacy rows where source is missing. - The query excludes rows where
metadata.source = "frontend". - Records with missing or invalid
metadata.api_key_idare grouped into anis_unknown = truebucket. - When an API key still exists,
api_key_name,api_key_purpose, andis_activeare populated fromapi_keys. api_key_idreturns only the matching API key bucket.
Response
Status:200 OK
Example response:
400invalid date parameters, invalidapi_key_id, or missing required range.401unauthorized.500internal error while computing usage.