Get Session Run
const url = 'https://agents.lumalabs.ai/v1/sessions/example/runs/example?wait_s=0';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://agents.lumalabs.ai/v1/sessions/example/runs/example?wait_s=0' \ --header 'Authorization: Bearer <token>'Read one run belonging to this session, optionally waiting until it settles.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Seconds to hold the request open until the run settles. 0 answers immediately.
Seconds to hold the request open until the run settles. 0 answers immediately.
Responses
Section titled “ Responses ”Successful Response
One run as a caller reads it — the single handle and the single wait.
object
What kind of work a run performs. Mirrors db.ApiRunKind.
Assets this run produced.
One asset a run produced. The durable handle is asset_id.
object
One layer of a layering output.
object
Edge treatment of the layer's transparency — soft (hair/fur/glass), hard (solid edges), or none (the opaque background).
Placement of this layer's pixels within the composite canvas. Absent only when the output's dimensions could not be resolved.
object
Height of the full composite canvas the layers reassemble into.
Width of the full composite canvas the layers reassemble into.
Pixel height of the returned layer image.
Pixel width of the returned layer image.
Left offset of this layer's pixels within the composite canvas.
Top offset of this layer's pixels within the composite canvas.
Whether the layer was planned as typeset text (a headline, caption, or label) rather than an image element. Absent when not reported for this output.
Complete-element caption for the layer's content.
Layer position, front-to-back; the last layer is the background.
Short (1-2 word) layer name.
The text read off a contains_text layer, so it can be re-typeset as live text inside bounds. Absent when the layer holds no text, or its lettering could not be read or is a logo / wordmark. Final whenever the job is. A layering job is not reported finished until reading its text has finished or timed out.
object
The text as shown, preserving capitalization, with a line break between lines.
True when the lettering is ornamental (outlines, patterned fills, bevels, drop shadows), so plain typeset text will not reproduce its look.
Described typeface traits. Absent when they could not be read.
object
Letterform style.
Up to three Google Fonts family names that resemble the lettering, closest first. Empty when none of the offered families fit.
Whether the letters are slanted or cursive.
The font in your font catalog that the lettering matches, so you can re-set the text in it. Absent when no catalog font matches closely enough, or matching is not enabled. The image itself is not rendered in this font.
object
Typed ref of the matched face (one weight and style), font_face:
Typed ref of the matched font family, font_family:
Name of the matched font family.
Style of the matched face.
CSS font weight of the matched face, e.g. 400 or 700.
Stroke weight.
Letter width for its height.
True when this idempotency_key had already started a run: that run is echoed and no second one was started.
A run's lifecycle state. Mirrors db.ApiRunState.
Example
{ "kind": "brief", "outputs": [ { "layer": { "alpha_hint": "soft", "text": { "font": { "category": "sans serif", "match": { "style": "normal" }, "weight": "thin", "width": "condensed" } } } } ], "replayed": false, "state": "queued"}Validation Error
object
object
object
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}