Skip to content

Get inference run

GET
/v1/workspaces/{workspace_id}/inferences/{inference_id}
curl --request GET \
--url https://api.app.layer.ai/api/v1/workspaces/:workspace_id/inferences/:inference_id \
--header 'Authorization: Bearer <token>'

Get the status and results of an inference run.

workspace_id
required
Workspace Id
string format: uuid
inference_id
required
Inference Id
string format: uuid

Successful Response

Media typeapplication/json
GetForgeRunOutput
object
inference_id
required
Inference Id

Unique identifier for this forge run.

string format: uuid
status
required
InferenceStatus

Current status: in_progress, complete, failed, cancelled, or deleted.

string
Allowed values: in_progress complete failed cancelled deleted
poll_interval_seconds
Any of:
integer
completed_at
Any of:
string format: date-time
outputs
Any of:
Array<object>
ForgeRunAsset
object
file_id
required
File Id

File ID for the generated asset.

string format: uuid
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
Any of:
string
width
Any of:
integer
height
Any of:
integer
duration_seconds
Any of:
number
file_size_bytes
Any of:
integer
actual_price_creative_units
Any of:
number
error
Any of:
string
error_code
Any of:
string
Example
{
"status": "in_progress"
}

Unauthenticated — missing or invalid Bearer token.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}

Forbidden — insufficient permissions.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}

Resource not found.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}

Invalid input parameters.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}

Rate limited — too many concurrent requests.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}

Internal server error.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}