Export Request Logs
/v1/logs/exportOverview
Downloads the same request metadata as List Request Logs for a date range, oldest first, as a streamed file attachment. Session callers must provide workspace_id and have read access. API keys require requests.read and can only export their own workspace. No prompts, audio or outputs are included.
An export spans at most 366 days and 100,000 requests. A range with more is refused with 400 before anything is sent; choose a shorter range or one product. Without after and before, the export covers the last 30 days. One export per workspace runs at a time; another returns 429.
CSV columns: id, created_at, completed_at, task, protocol, model, resolved_model, provider, state, cost, input_tokens, output_tokens, input_chars, audio_seconds, duration_ms, streamed, error_code, key_id, key_name. A cell that begins with =, +, -, @ or a tab is prefixed with a single quote so spreadsheets do not run it as a formula. JSON Lines has one LogEntry object per line.
Parameters
workspace_idquery · stringRequired for sessions; must match an API key's workspace when supplied.
formatquery · stringtaskquery · stringExport one product only.
statequery · stringkey_idquery · stringafterquery · stringInclusive creation time lower bound. Defaults to 30 days before before.
beforequery · stringExclusive creation time upper bound. Defaults to now.
Responses
200The log file, streamed as an attachment named for its range and product.
string
string
400Request validation failed.
errorobjectRequiredShow nested fields
codestringRequiredmessagestringRequiredparamstring | nullrequest_idstring | nullmetadataobjectTyped 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.
401Authentication is missing or invalid.
errorobjectRequiredShow nested fields
codestringRequiredmessagestringRequiredparamstring | nullrequest_idstring | nullmetadataobjectTyped 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.
403Authenticated principal lacks permission.
errorobjectRequiredShow nested fields
codestringRequiredmessagestringRequiredparamstring | nullrequest_idstring | nullmetadataobjectTyped 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.
429Rate limit exceeded.
errorobjectRequiredShow nested fields
codestringRequiredmessagestringRequiredparamstring | nullrequest_idstring | nullmetadataobjectTyped 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.
errorobjectRequiredShow nested fields
codestringRequiredmessagestringRequiredparamstring | nullrequest_idstring | nullmetadataobjectTyped 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.