Skip to content

Get workflow run

Viewing v2, the current version

GET
/v2/workspaces/{workspace_id}/workflows/{workflow_id}/runs/{run_id}
curl --request GET \
--url https://api.app.layer.ai/api/v2/workspaces/:workspace_id/workflows/:workflow_id/runs/:run_id \
--header 'Authorization: Bearer <token>'

Unchanged from v1. This endpoint’s documented request and response schemas are identical in v1 and v2 — change the /v1 prefix to /v2. Schema equality is not a promise about behavior, so keep your usual smoke tests.

Get the status and results of a workflow run.

workspace_id
required
Workspace ID

ID of the workspace that owns the resource.

string format: uuid

ID of the workspace that owns the resource.

workflow_id
required
Workflow ID

ID of the workflow.

string format: uuid

ID of the workflow.

run_id
required
Run ID

ID of the workflow run.

string format: uuid

ID of the workflow run.

Successful Response

Media typeapplication/json
GetWorkflowRunOutput
object
run_id
required
Run ID

Unique identifier for this workflow run.

string format: uuid
status
required
BlueprintRunStatus

Current status: pending, running, success, failure, or canceled.

string
Allowed values: pending running success failure cancelled
poll_interval_seconds
Poll Interval Seconds

Suggested polling interval in seconds. Present while PENDING or RUNNING.

integer
nullable
steps
Steps

Status of each step composing the workflow run.

Array<object>
default:
GetWorkflowRunStep
object
name
required
Name

The name of the workflow step

string
status
required
BlueprintRunStatus

The execution status of the step: pending, running, success, failure, or canceled.

string
Allowed values: pending running success failure cancelled
error
Error

The error details if any

string
nullable
error_code
Error Code

Machine-readable error code if the step failed.

string
nullable
estimated_price_creative_units
Estimated Price Creative Units

Estimated Creative Units price. Present when available.

number
nullable
completed_at
Completed At

Completion timestamp. Present only on SUCCESS.

string format: date-time
nullable
actual_price_creative_units
Actual Price Creative Units

Actual Creative Units price charged. Present only on SUCCESS.

number
nullable
outputs
Outputs

Generated assets. Present only on SUCCESS.

Array<object>
nullable
WorkflowRunAsset
object
object_id
required
Object ID

Unique identifier of the generated object.

string format: uuid
object_type
required
LibraryObjectType

Type of generated object: file or asset.

string
Allowed values: directory file asset style blueprint skill
file_id
File ID

File ID — pass directly as input to forge or workflow runs without re-uploading.

string format: uuid
nullable
url
required
URL

Download URL for the asset.

string
content_type
required
Content Type

MIME type, e.g. image/png or video/mp4.

string
preview_url
Preview URL

Image preview URL.

string
nullable
width
Width

Width in pixels.

integer
nullable
height
Height

Height in pixels.

integer
nullable
duration_seconds
Duration Seconds

Duration in seconds for video assets.

number
nullable
file_size_bytes
File Size Bytes

File size in bytes.

integer
nullable
metadata
Any of:
FileMetadataView

What an engine needs beyond the image to build a resource from a file. Each kind is null when absent.

object
tile
Any of:
TileMetadataView

Where a game tile’s sprite sits on its grid, in the sprite’s own pixels from its top-left corner.

object
shape
required
TileShape

The outline of one grid cell seen from straight above.

string
Allowed values: SQUARE HEXAGON
orientation
required
TileOrientation

How the cell is turned to the camera: DIAMOND or ALIGNED for a square, POINTY_TOP or FLAT_TOP for a hexagon.

string
Allowed values: DIAMOND ALIGNED POINTY_TOP FLAT_TOP
elevation
required
Elevation

Camera tilt in degrees above the ground plane; 90 is straight down.

number
facing
required
Facing

Quarter turn of the camera around the tile, in degrees clockwise seen from above: 0, 90, 180, or 270. A hexagon is only drawn facing 0.

integer
footprint_width
required
Footprint Width

Cells the footprint covers across (the base’s right-hand edge) at facing 0.

integer
footprint_depth
required
Footprint Depth

Cells the footprint covers deep (the base’s left-hand edge) at facing 0.

integer
height
required
Height

Wall height in cell sides: 0 is a flat ground tile, 1 a cube on a square.

number
tile_width
required
Tile Width

Width in pixels of one cell’s base outline in the sprite.

integer
tile_height
required
Tile Height

Height in pixels of one cell’s base outline in the sprite.

integer
anchor
required
TilePointView

The point the tile is placed by: the bottom center of the cell it stands on (the front cell of a footprint wider than one).

object
x
required
X

Pixels right of the sprite’s left edge.

number
y
required
Y

Pixels down from the sprite’s top edge.

number
cell_center
required
TilePointView

The center of the anchor’s cell. Godot and Unity pin a tile here rather than at the anchor.

object
x
required
X

Pixels right of the sprite’s left edge.

number
y
required
Y

Pixels down from the sprite’s top edge.

number
base_outline
required
Base Outline

The footprint’s whole base outline, clockwise on screen from the anchor’s vertex or edge.

Array<object>
TilePointView
object
x
required
X

Pixels right of the sprite’s left edge.

number
y
required
Y

Pixels down from the sprite’s top edge.

number
subject_id
Subject ID

What the tile shows. Every facing of one subject shares it, so a tileset can group them.

string format: uuid
nullable
fit
Fit

How well the drawing stands on the grid once fitted, from 0 to 1. Null on an older tile.

number
nullable
is_off_grid
Is Off Grid

True when the drawing did not settle on the grid and may not sit exactly on its cell. Check its placement before using it.

boolean
nine_slice
Any of:
NineSliceMetadataView

The insets a 9-slice draws a UI element by, in the image’s own pixels in from each edge.

The corners are drawn at their own size, the edges repeat along their length, and the center repeats both ways.

object
left
required
Left

Pixels in from the left edge.

integer
top
required
Top

Pixels in from the top edge.

integer
right
required
Right

Pixels in from the right edge.

integer
bottom
required
Bottom

Pixels in from the bottom edge.

integer
source
required
NineSliceSource

DETECTED when measured off the pixels, USER when a person set the insets.

string
Allowed values: DETECTED USER
sprite_sheet
Any of:
SpriteSheetMetadataView

The frame grid a sprite sheet was packed on, in the sheet’s own pixels from its top-left corner.

Cells start margin pixels in from the sheet’s edges with spacing pixels between them.

object
columns
required
Columns

Cells across.

integer
rows
required
Rows

Cells down.

integer
cell_width
required
Cell Width

Width of one cell in pixels.

integer
cell_height
required
Cell Height

Height of one cell in pixels.

integer
margin
required
Margin

Pixels between the sheet’s edges and the outer cells.

integer
spacing
required
Spacing

Pixels between neighboring cells.

integer
frames
required
Frames

The frames, in play order: left to right, then top to bottom, unless the list orders them otherwise.

Array<object>
SpriteSheetFrameView

One frame’s rect on the sheet, in the sheet’s own pixels from its top-left corner.

object
index
required
Index

The frame’s cell in reading order over the whole grid (left to right, then top to bottom). Cells that hold no frame are left out, so indexes can skip.

integer
x
required
X

The frame’s left edge on the sheet, in pixels.

integer
y
required
Y

The frame’s top edge on the sheet, in pixels.

integer
w
required
W

The frame’s width in pixels.

integer
h
required
H

The frame’s height in pixels.

integer
anchor
Any of:
TilePointView
object
x
required
X

Pixels right of the sprite’s left edge.

number
y
required
Y

Pixels down from the sprite’s top edge.

number
animations
required
Animations

Named animations over the frames. When empty, play the sheet as one animation named default over every frame in frames order, at 12 fps, looping.

Array<object>
SpriteSheetAnimationView
object
name
required
Name

The animation’s name.

string
frames
required
Frames

Frame indexes (frames[].index), in play order.

Array<integer>
fps
required
FPS

Frames per second.

number
loop
required
Loop

Whether the animation restarts after its last frame.

boolean
layers
Layers

The layers of a layered file, back to front, so drawing each visible PNG at its left and top, in order, rebuilds the image (blend modes and clipping aside).

Array<object>
nullable
LayerView

One layer of a layered file, such as the PSD image.split_layers returns.

object
name
required
Name

The layer’s name in the file.

string
kind
required
Kind

group, pixel, shape, type, smartobject or psdimage.

string
url
required
URL

Download URL of the layer’s pixels as a PNG at the layer’s own size. Null when it has none.

string
nullable
left
required
Left

X of the layer’s top-left corner on the canvas, in pixels.

integer
top
required
Top

Y of the layer’s top-left corner on the canvas, in pixels.

integer
width
required
Width

Width of the layer’s PNG, in pixels.

integer
height
required
Height

Height of the layer’s PNG, in pixels.

integer
visible
required
Visible

The layer’s own visibility; a hidden group hides every layer in it.

boolean
opacity
required
Opacity

The layer’s own opacity, 0 (transparent) to 255 (opaque).

integer
group
required
Group

Index in layers of the group that holds this layer; a group’s members follow it. Null at the top level.

integer
nullable
parallax
Any of:
ParallaxMetadataView

How a parallax split’s layers scroll. Its layers pair, in order, with top-level layers (group null).

object
loops
required
Loops

True when every layer repeats left to right at the canvas width.

boolean
layers
required
Layers

One entry per layer, farthest first.

Array<object>
ParallaxLayerView
object
name
required
Name

The layer’s name.

string
scroll
required
Scroll

Share of the camera’s movement the layer moves by: 1 moves with the camera, as the playfield does, and 0 stays put, as a sky at infinity does.

number
error
Error

Error message. Present only on FAILURE.

string
nullable
error_code
Error Code

Machine-readable error code. Present only on FAILURE. Balance-related values: BlueprintInsufficientBalanceError (the workspace ran out of Creative Units — top up and resubmit), BlueprintBalanceUnavailableError (the balance could not be verified, retry later) and BlueprintUsageLimitExceededError (the member who started the run is past their usage limit: ask a workspace admin for more, or wait for it to reset). A run stopped by a refused generation reports BlueprintInvalidRuntimeValueError; refusals says who refused it and why.

string
nullable
refusals
Refusals

Every generation this run started that a guardrail or the provider refused, oldest first. Present only on FAILURE, and empty when no generation was refused.

Array<object>
default:
RunRefusal
object
inference_id
required
Inference ID

The generation that was refused.

string format: uuid
code
required
RefusalCode

Machine-readable refusal code: INPUT_GUARDRAIL_VIOLATION (a guardrail the workspace or project set blocked it, and nothing reached the provider), CONTENT_POLICY_VIOLATION (the provider’s content policy), PROMPT_INTELLECTUAL_PROPERTY (the provider refused protected IP) or NO_MEDIA_GENERATED (the provider returned no output: a passing provider failure, a silent refusal of the prompt, or an input the model found nothing in; run it again before rewriting the prompt). A provider refusal of the prompt can be rewritten without the names it refuses with POST .../inferences/{id}/prompt-rewrite.

string
Allowed values: INPUT_GUARDRAIL_VIOLATION CONTENT_POLICY_VIOLATION PROMPT_INTELLECTUAL_PROPERTY NO_MEDIA_GENERATED
guardrails
Guardrails

Every guardrail that blocked the generation. Empty unless code is INPUT_GUARDRAIL_VIOLATION.

Array<object>
default:
RefusalGuardrail
object
guardrail_id
required
Guardrail ID

ID of the guardrail rule that blocked the generation.

string format: uuid
name
required
Name

The rule’s name as it read when it judged the request.

string
category
required
GuardrailCategory

copyright_infringement, ip_trademark_infringement or artist_style_mimicry for the guardrails Layer ships, custom for a rule the workspace wrote itself.

string
Allowed values: copyright_infringement ip_trademark_infringement artist_style_mimicry custom
reason
required
Reason

Why the rule judged the request a violation. May be empty.

string
webhook
Any of:
WebhookStatusView

What a job’s GET reports about the callback attached to it.

The URL is echoed so a caller can tell which of its endpoints a run was aimed at; the rest is how the delivery went, which is the only place a failed delivery is visible.

object
url
required
URL

The callback URL this run was submitted with.

string
status
required
WebhookDeliveryStatus

Pending until a delivery settles, then delivered or failed.

string
Allowed values: pending delivered failed
attempts
required
Attempts

How many delivery attempts have been made.

integer
last_attempt_at
Last Attempt At

When the last attempt was made.

string format: date-time
nullable
last_response_status
Last Response Status

HTTP status the receiver returned on the last attempt, if it responded.

integer
nullable
last_error
Last Error

Why the last attempt did not succeed. Null once delivered.

string
nullable
Example
{
"status": "pending",
"steps": [],
"outputs": [
{
"object_type": "directory",
"metadata": {
"tile": {
"shape": "SQUARE",
"orientation": "DIAMOND",
"is_off_grid": false
},
"nine_slice": {
"source": "DETECTED"
}
}
}
],
"refusals": [],
"webhook": {
"status": "pending"
}
}

Unauthenticated — missing or invalid Bearer token.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
error_code
required

Machine-readable error code: the last path segment of type.

string
field

The request field the error is about, by its name in the body (on a tool run, in input), on the errors that name one: so far the value a Layer tool fixes on an INFERENCE_TOOL_PIN_MISMATCH, and the scale factor on an INFERENCE_TOOL_UPSCALE_COPIES_SOURCE. Absent otherwise, even when detail names a field.

string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}

Forbidden — insufficient permissions, or the access token lacks the scope the operation requires.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
error_code
required

Machine-readable error code: the last path segment of type.

string
field

The request field the error is about, by its name in the body (on a tool run, in input), on the errors that name one: so far the value a Layer tool fixes on an INFERENCE_TOOL_PIN_MISMATCH, and the scale factor on an INFERENCE_TOOL_UPSCALE_COPIES_SOURCE. Absent otherwise, even when detail names a field.

string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}

Resource not found.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
error_code
required

Machine-readable error code: the last path segment of type.

string
field

The request field the error is about, by its name in the body (on a tool run, in input), on the errors that name one: so far the value a Layer tool fixes on an INFERENCE_TOOL_PIN_MISMATCH, and the scale factor on an INFERENCE_TOOL_UPSCALE_COPIES_SOURCE. Absent otherwise, even when detail names a field.

string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}

The outcome of the request with this Idempotency-Key is not known yet: it is still running, or it failed without a stored response. Retry after the number of seconds in Retry-After.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
error_code
required

Machine-readable error code: the last path segment of type.

string
field

The request field the error is about, by its name in the body (on a tool run, in input), on the errors that name one: so far the value a Layer tool fixes on an INFERENCE_TOOL_PIN_MISMATCH, and the scale factor on an INFERENCE_TOOL_UPSCALE_COPIES_SOURCE. Absent otherwise, even when detail names a field.

string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}

Invalid input parameters, or an Idempotency-Key reused for a different request.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
error_code
required

Machine-readable error code: the last path segment of type.

string
field

The request field the error is about, by its name in the body (on a tool run, in input), on the errors that name one: so far the value a Layer tool fixes on an INFERENCE_TOOL_PIN_MISMATCH, and the scale factor on an INFERENCE_TOOL_UPSCALE_COPIES_SOURCE. Absent otherwise, even when detail names a field.

string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}

Rate limited — retry after the number of seconds in Retry-After.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
error_code
required

Machine-readable error code: the last path segment of type.

string
field

The request field the error is about, by its name in the body (on a tool run, in input), on the errors that name one: so far the value a Layer tool fixes on an INFERENCE_TOOL_PIN_MISMATCH, and the scale factor on an INFERENCE_TOOL_UPSCALE_COPIES_SOURCE. Absent otherwise, even when detail names a field.

string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}

Internal server error.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
error_code
required

Machine-readable error code: the last path segment of type.

string
field

The request field the error is about, by its name in the body (on a tool run, in input), on the errors that name one: so far the value a Layer tool fixes on an INFERENCE_TOOL_PIN_MISMATCH, and the scale factor on an INFERENCE_TOOL_UPSCALE_COPIES_SOURCE. Absent otherwise, even when detail names a field.

string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}