Skip to main content
GET
Export a run as Markdown
The reference panel describes the current v3 operation. The notes below describe its v2 compatibility API. Follow the v3 request schema for current calls: v3 can move identifiers from the body or query into the URL. Keep the v2 method, path, and payload together when using the compatibility API.

v2 compatibility notes

Returns the run rendered as one Markdown document (markdown): its status, timing, tokens and cost; each step with its outputs, error and agent turns (each turn’s prompt, reasoning, answer and tool calls); the files the run output, by fileId (at most 500; read one with GET /api/v2/files/get); and the governance decisions that blocked or held a step. Runtime content is returned as recorded except that credential-shaped strings are replaced by a [REDACTED] marker, and a human step’s outputs never carry who answered, the channel or the person’s response. The document never carries who triggered the run, an agent thread, a storage handle, a step’s raw failure detail or a governance decision’s reason text. The workflow’s name appears only when your scopes also reach workflows:read and your role grants hold it at the workflow’s home.

Size and continuation

A large export comes back in pages. A page stops on a step or turn boundary once it holds about 3 MiB of rendered Markdown (step outputs and agent turns, measured as rendered), or sooner when it nears the request’s read limit, so every page stays inline, and meta.partial says the document left some out. When it stopped before the end of the run, inside a transcript or between steps, meta.hasMore is true and meta.nextCursor is set: pass it as cursor with the same id and repeat until meta.nextCursor is null. The pages together hold every agent turn exactly once. A later page is titled # Run dump (continued). It starts at the step that was cut, with that step’s name and remaining turns only (or, when the previous page stopped before a step began, that step in full), then the steps after it in full; the run header, failure, governance and file sections are the first page’s. A single turn too large for one page is sent once, cut, and the export moves on. Treat the cursor as opaque: one the export did not issue is a 400 “Invalid cursor”. If a page cannot move forward it returns meta.partial: true with meta.nextCursor: null. tier is inline up to 1 MiB, inline_large up to 8 MiB, and too_large above that, when the body is null and meta.partial is true; approximateSizeBytes says how large it measured. No storage URL is ever returned: there is no download link to follow.

Visibility

You need runs:read at the run’s home (its own org unit, else its workflow’s owning org unit) and at every company it carries, the same rule as GET /api/v2/runs/get. Any other run, and a run with neither home, answers 404 “Run not found” like a missing one. A Personal key reads as its owner, cut down to the key’s scopes; an External App reads by its own role grants. id is required; a missing id answers 404. cursor is optional and may appear once.

Authorizations

Authorization
string
header
required

An External App: the JWT it obtains from POST /oauth/token with OAuth2 client_credentials. Pass as Authorization: Bearer <jwt>. An app's static companion key also authenticates as the app, but is deprecated and is not protected by Idempotency-Key.

Path Parameters

runId
string
required

The run id.

Minimum string length: 1

Query Parameters

cursor
string

The opaque meta.nextCursor from the previous page.

Minimum string length: 1

Response

The run as Markdown, or one page of it

data
object
required
meta
object
required