Skip to main content
POST
Estimate inference price

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 estimating inference price. 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.

Response

Successful Response

estimated_price_creative_units
number
required

Total estimated Creative Units price for this run.

workspace_balance_creative_units
number
required

Usable Creative Units balance (total balance minus reserved by in-progress generations).

estimated_remaining_balance_creative_units
number
required

Usable balance after subtracting the estimated price. Can be negative.

has_sufficient_creative_units
boolean
required

Whether the workspace has enough available Creative Units to cover the estimated price.