Get Session Media
const url = 'https://example.com/api/v1/org/example/ws/example/sessions/example/media?limit=500';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/api/v1/org/example/ws/example/sessions/example/media?limit=500' \ --header 'Authorization: Bearer <token>'Media artifacts (images/audio/video) logged across a session’s tools, read from ClickHouse session_events and returned in transcript order. Powers the session detail Media gallery so uploaded images are findable without scrolling the trajectory. When a session has more media than the scan/response caps, the most recent media is returned and truncated is set. Accepts a full UUID or a unique prefix.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Organization slug
Organization slug
Workspace slug
Workspace slug
Query Parameters
Section titled “Query Parameters ”Max media-bearing events to scan (most recent first). The response is further bounded by item and byte caps.
Max media-bearing events to scan (most recent first). The response is further bounded by item and byte caps.
Responses
Section titled “ Responses ”Successful Response
Media logged across a session, for the detail-view Media gallery.
Unlike GET /sessions/{id}/events — a capped tail window keyed for
transcript restore — this scans for media-bearing events across the session
and returns them in transcript (chronological) order. When a session has
more media than the scan/response caps, the most recent media is retained
and truncated is set.
object
One media artifact logged inside a session’s tools.
Sourced from event_data.media_outputs on ClickHouse session_events,
the same payload the transcript renders inline next to each tool call. The
tool_call_id back-reference anchors the artifact to its point in the
transcript. A renderer uses whichever of value (inline base64) or
uri (object storage) is present; the write path normally sets exactly
one, and a renderer that sees both should prefer the inline value.
object
Session_events sequence of the originating event.
Number of media items returned (equals len(items)).
True when media beyond the returned set may exist — the session had more media-bearing events than were scanned, or the item/byte caps were reached. items holds the most recent media.
Example
{ "items": [ { "kind": "image" } ]}Invalid request
Canonical API error envelope returned by the API.
object
HTTP status code
Human-readable error message
object
Where the validation error occurred
Human-readable validation message
Machine-readable validation error type
Stable machine-readable error type
Example
{ "code": 401, "detail": "Authentication failed", "type": "authentication_error"}Authentication failed
Canonical API error envelope returned by the API.
object
HTTP status code
Human-readable error message
object
Where the validation error occurred
Human-readable validation message
Machine-readable validation error type
Stable machine-readable error type
Example
{ "code": 401, "detail": "Authentication failed", "type": "authentication_error"}Access forbidden
Canonical API error envelope returned by the API.
object
HTTP status code
Human-readable error message
object
Where the validation error occurred
Human-readable validation message
Machine-readable validation error type
Stable machine-readable error type
Example
{ "code": 401, "detail": "Authentication failed", "type": "authentication_error"}Not found
Canonical API error envelope returned by the API.
object
HTTP status code
Human-readable error message
object
Where the validation error occurred
Human-readable validation message
Machine-readable validation error type
Stable machine-readable error type
Example
{ "code": 401, "detail": "Authentication failed", "type": "authentication_error"}Already exists
Canonical API error envelope returned by the API.
object
HTTP status code
Human-readable error message
object
Where the validation error occurred
Human-readable validation message
Machine-readable validation error type
Stable machine-readable error type
Example
{ "code": 401, "detail": "Authentication failed", "type": "authentication_error"}Validation error
Canonical API error envelope returned by the API.
object
HTTP status code
Human-readable error message
object
Where the validation error occurred
Human-readable validation message
Machine-readable validation error type
Stable machine-readable error type
Example
{ "code": 401, "detail": "Authentication failed", "type": "authentication_error"}Upgrade required
Canonical API error envelope returned by the API.
object
HTTP status code
Human-readable error message
object
Where the validation error occurred
Human-readable validation message
Machine-readable validation error type
Stable machine-readable error type
Example
{ "code": 401, "detail": "Authentication failed", "type": "authentication_error"}Rate limited
Canonical API error envelope returned by the API.
object
HTTP status code
Human-readable error message
object
Where the validation error occurred
Human-readable validation message
Machine-readable validation error type
Stable machine-readable error type
Example
{ "code": 401, "detail": "Authentication failed", "type": "authentication_error"}Internal server error
Canonical API error envelope returned by the API.
object
HTTP status code
Human-readable error message
object
Where the validation error occurred
Human-readable validation message
Machine-readable validation error type
Stable machine-readable error type
Example
{ "code": 401, "detail": "Authentication failed", "type": "authentication_error"}Bad gateway
Canonical API error envelope returned by the API.
object
HTTP status code
Human-readable error message
object
Where the validation error occurred
Human-readable validation message
Machine-readable validation error type
Stable machine-readable error type
Example
{ "code": 401, "detail": "Authentication failed", "type": "authentication_error"}Gateway timeout
Canonical API error envelope returned by the API.
object
HTTP status code
Human-readable error message
object
Where the validation error occurred
Human-readable validation message
Machine-readable validation error type
Stable machine-readable error type
Example
{ "code": 401, "detail": "Authentication failed", "type": "authentication_error"}