Skip to content

Deliver Session Artifact

POST
/v1/sessions/{session_id}/deliveries
curl --request POST \
--url https://agents.lumalabs.ai/v1/sessions/example/deliveries \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: image/jpeg' \
--header 'X-Studio-Delivery: example' \
--data binary

Deliver a file the app's surface rendered — an export or a capture — into the session's workspace.

The body is the file's bytes, its Content-Type the file's type; the X-Studio-Delivery header carries the claims the app checks. The delivery is listed in the session snapshot's deliveries at once, and once ready reads through GET /v1/sessions/{session_id}/assets/{asset_id}. A retry of a committed delivery answers the same file.

session_id
required
Session Id
string
X-Studio-Delivery
required
X-Studio-Delivery

URL-encoded JSON: {filename, mimeType, relation: 'capture' | 'export', documentRevision, coordinates, width?, height?}. mimeType must equal the body's Content-Type; documentRevision is the plan artifact revision the file was rendered from; coordinates are the app's own fields naming what was rendered, and the app refuses claims it does not recognise with a 409.

string
<= 4096 characters

URL-encoded JSON: {filename, mimeType, relation: 'capture' | 'export', documentRevision, coordinates, width?, height?}. mimeType must equal the body's Content-Type; documentRevision is the plan artifact revision the file was rendered from; coordinates are the app's own fields naming what was rendered, and the app refuses claims it does not recognise with a 409.

string format: binary

Successful Response

Media typeapplication/json
SessionDeliveryResponse

The file a delivery stored, named as the session snapshot's deliveries name it.

object
artifact_id
required
Artifact Id

Once its delivery is ready, read it through GET /v1/sessions/{session_id}/assets/{asset_id}.

string
Examplegenerated
{
"artifact_id": "example"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}