export logs
export_logsExport filtered chat exchanges as JSONL, one exchange per line, for training or eval tooling. Use time, model, tag, or segment filters to target the logs you need.
Instructions
Export the filtered logged exchanges as JSONL in chat format — one {"messages":[...]} line per exchange with the assistant reply appended — ready to pipe into your own training or eval tooling. GET /v1/logs/export (API-key scope: read). Returns: 200 with Content-Type application/jsonl; charset=utf-8. Body: newline-terminated lines, each {"messages": [ ...request messages, assistantReplyMessage ]}, newest first. Response headers: X-Omnia-Export-Count (lines written) and X-Omnia-Export-Capped ('true' when the 10,000-row cap was hit — narrow the filter, e.g. a time range, to get the rest). Notes: No limit/offset — the export is capped at 10,000 rows; use X-Omnia-Export-Capped to detect truncation. Rows whose stored JSON doesn't parse are skipped, never fail the export. 409 { error: string } (flat shape) when request logging is disabled for the workspace. Only successful (non-aborted) exchanges are exported.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | Upper bound, Unix seconds. | |
| tag | No | Exact request tag filter. | |
| model | No | Exact model name filter. | |
| start | No | Inclusive lower bound, Unix seconds. | |
| segment | No | Auto-detected traffic segment (prompt family) — exact match, same values as GET /v1/logs rows' `segment`. | |
| cache_hit | No | "true" or "false". | |
| finish_reason | No | Exact finish-reason filter. |