Skip to main content
POST
Execute inference

Authorizations

Authorization
string
header
required

Personal Access Token or OAuth2 JWT. Create a PAT at app.layer.ai → Settings → Personal Access Tokens.

Path Parameters

workspace_id
string<uuid>
required

Body

application/json

REST request body for executing an inference. workspace_id comes from path.

model_id
string<uuid>
required

Model/style ID to use for generation.

weight
number
default:1

Style/LoRA strength applied to the model. 1.0 = as trained; lower weakens, higher over-applies the style. Only affects LoRA/adapter-backed styles; ignored for models without a trainable adapter.

Required range: 0 <= x <= 2
prompt
string | null

Text prompt.

Maximum string length: 100000
width
integer | null

Output width in pixels. If not specified, a default resolution based on the model will be applied.

Required range: x > 0
height
integer | null

Output height in pixels. If not specified, a default resolution based on the model will be applied.

Required range: x > 0
batch_size
integer
default:4

Number of outputs (1-16).

Required range: 1 <= x <= 16
num_inference_steps
integer | null

Number of diffusion steps.

Required range: x > 0
guidance_scale
number | null

Guidance scale (CFG).

prompt_strength
number | null

Prompt strength for img2img (0-1).

Required range: 0 <= x <= 1
quality
enum<string> | null

Quality level: low, medium, or high.

Available options:
low,
medium,
high
sharpness
number | null

Output sharpness.

duration_seconds
number | null

Video duration in seconds.

Required range: x > 0
generate_audio
boolean | null

Generate audio with video.

keep_audio
boolean | null

Keep audio from input video.

fps
integer | null

FPS for LTX video generation (e.g. 25 or 50).

Required range: x > 0
video_effects
ForgeVideoEffectInput · object[]

Video effects to apply.

use_ta_pose
boolean | null

Use T/A pose for 3D.

include_textures
boolean | null

Include textures in 3D output.

quad_mesh
boolean | null

Generate quad mesh.

pbr_materials
boolean | null

Generate PBR materials.

low_poly
boolean | null

Generate low-poly mesh.

generate_parts
boolean | null

Generate separate parts.

face_limit
integer | null

Face/polygon limit for 3D mesh.

Required range: x > 0
stability
number | null

Audio stability (0-1).

Required range: 0 <= x <= 1
use_speaker_boost
boolean | null

Boost speaker clarity.

similarity_boost
number | null

Voice similarity boost (0-1).

Required range: 0 <= x <= 1
style_exaggeration
number | null

Style exaggeration (0-1).

Required range: 0 <= x <= 1
speed
number | null

Speech speed multiplier.

Required range: x > 0
upscale_ratio
number | null

Upscale factor (e.g. 2.0, 4.0).

creativity
number | null

Creative variation strength for upscaling.

resemblance
number | null

Resemblance to original for upscaling.

vectorize
boolean | null

Vectorize the output image.

remove_background
boolean | null

Remove background from output.

reframe
boolean | null

Reframe/extend the image.

refill
boolean | null

Outpaint/refill transparent areas.

seed
integer
default:-1

Random seed. -1 for random.

guidance_files
ForgeGuidanceFileInput · object[]

Reference images/files to guide generation.

Maximum array length: 20
mask
ForgeMaskInput · object | null

Mask for inpainting/outpainting.

session_name
string | null

Session name.

Maximum string length: 255

Response

Successful Response

inference_id
string<uuid>
required

Unique identifier for this forge run.

status
enum<string>
required

Current status: IN_PROGRESS.

Available options:
in_progress,
complete,
failed,
cancelled,
deleted
poll_interval_seconds
integer
required

Suggested polling interval in seconds.

created_at
string<date-time>
required

Timestamp of when the run was created.

estimated_price_creative_units
number | null

Estimated price in Creative Units.

session_id
string<uuid> | null

Session ID the run was added to, if a session was specified.

normalized_parameters
NormalizedInferenceParameters · object | null

Actual parameters used after model-specific normalization and defaults.