Skip to content

Get inference run

Viewing v2— current version

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

Changed in v2. This endpoint’s contract differs from v1. See the v2 migration guide for the request and response changes before you switch.

Get the status and results of an inference run, plus what each attached reference set contributed to it.

workspace_id
required
Workspace Id

Id of the workspace that owns the resource.

string format: uuid

Id of the workspace that owns the resource.

inference_id
required
Inference Id

Id of the generation.

string format: uuid

Id of the generation.

Successful Response

Media typeapplication/json
GetInferenceRunV2Output
object
inference_id
required
Inference Id

Unique identifier for this inference 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
base_model_id
Any of:
string
reference_set_contributions
Reference Set Contributions

Per-set summary of what each reference set contributed.

Array<object>
default:
ForgeReferenceSetContribution
object
set_id
Any of:
string format: uuid
lora_applied
Lora Applied

True when a LoRA finetune was applied for this set.

boolean
animation_applied
Animation Applied

True when an animation (Meshy rigging action) finetune was applied for this set.

boolean
voice_applied
Voice Applied

True when a voice (ElevenLabs) finetune was applied for this set.

boolean
mapped_asset_count
Mapped Asset Count

Number of assets successfully mapped to guidance inputs.

integer
0
prompt_fallback_applied
Prompt Fallback Applied

True when the set fell back to prompt-only representation.

boolean
lora_available_but_incompatible
Lora Available But Incompatible

True when SBMC has a LoRA for this set on another base model but not the one used.

boolean
skipped_not_applicable
Skipped Not Applicable

True when the set isn’t applicable to the chosen model (its modality / applicable base models exclude it) so no LoRA or assets were applied.

boolean
reference_sets_degraded
Reference Sets Degraded

True when at least one attached reference set did not meaningfully contribute. The run still costs Creative Units.

boolean
reference_sets_warning
Any of:
string
Example
{
"status": "in_progress",
"reference_set_contributions": [],
"reference_sets_degraded": false
}

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."
}