Download session history

Beta
Download a session's message history. Formats: 'trace' (default — every message fully serialized, including tool calls, tool results, reasoning, and token usage), 'messages' (just the user/agent conversation turns as plain text), 'markdown' (the conversation rendered as a readable transcript), or 'stats' (aggregate metrics: message/tool-call counts, token usage, duration). All formats return JSON except 'markdown', which returns text/markdown.

Authentication

X-API-KEYstring
API Key authentication via header
OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

asset_idstringRequired

Query parameters

export_formatenumOptionalDefaults to trace

Which representation to download: ‘trace’ (full trace with all tool calls), ‘messages’ (user/agent turns only), ‘markdown’ (readable transcript), or ‘stats’ (aggregate metrics)

Allowed values:

Response

The session history in the requested format.

Errors

401
Unauthorized Error
404
Not Found Error
422
Unprocessable Entity Error