--- title: Deliver Session Artifact | Luma Agents --- POST /v1/sessions/{session\_id}/deliveries Select code samplecURL (shell:curl) ```js const url = 'https://agents.lumalabs.ai/v1/sessions/example/deliveries'; const options = { method: 'POST', headers: { 'X-Studio-Delivery': 'example', Authorization: 'Bearer ', 'Content-Type': 'image/jpeg' }, body: 'binary' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```sh curl --request POST \ --url https://agents.lumalabs.ai/v1/sessions/example/deliveries \ --header 'Authorization: Bearer ' \ --header 'Content-Type: image/jpeg' \ --header 'X-Studio-Delivery: example' \ --data binary ``` - Productionagents.lumalabs.ai/v1/sessions/{session\_id}/deliveries 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. ## Authorizations - **[BearerAuth](/api/agents/index.md#bearerauth)** ## Parameters ### Path Parameters **session\_id** required *Session Id* string ### Header Parameters **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. ## Request Bodyrequired The list of MIME types the operation can consumeimage/jpeg string format: binary string format: binary string format: binary string format: binary string format: binary ## Responses ### 200 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 ```json { "artifact_id": "example" } ``` ### 422 Validation Error Media typeapplication/json *HTTPValidationError* object **detail** *Detail* Array\ *ValidationError* object **ctx** *Context* object **input** *Input* **loc** required *Location* Array **msg** required *Message* string **type** required *Error Type* string ##### Examplegenerated ```json { "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ] } ```