Workflows vs Forge
Layer gives you two ways to generate assets through the API. They share the same async lifecycle and Creative Unit model, but suit different jobs.
Forge — direct model execution
Section titled “Forge — direct model execution”Forge runs a single model with full control over its parameters. Reach for it when you know exactly which model you want and want to drive it directly.
- Submit:
POST /v1/workspaces/{id}/inferences→inference_id - Poll:
GET /v1/workspaces/{id}/inferences/{id} - Parameters: prompt, dimensions, batch size, style
weight, guidance files (reference images, masks, poses, depth maps), video/3D/audio options, and post-processing (upscale, vectorize, remove background).
Workflows — Blueprint pipelines
Section titled “Workflows — Blueprint pipelines”A workflow is a multi-step pipeline built visually in the Layer app’s Blueprint editor — for example: generate an image → upscale → remove background. It’s callable as a single API run, with inputs and outputs defined by the Blueprint.
- Submit:
POST /v1/workspaces/{id}/workflows/{workflow_id}/runs→run_id - Poll:
GET /v1/workspaces/{id}/workflows/{workflow_id}/runs/{run_id} - The run response includes a per-step
steps[]array so you can see progress and pinpoint a failing step.
Choosing
Section titled “Choosing”| Use Forge when… | Use a Workflow when… |
|---|---|
| You want one model with specific parameters. | You need several steps chained together. |
| Your logic lives in your own code. | Your team already built the pipeline as a Blueprint. |
| You want to vary model/params per request. | You want a stable, named pipeline callable as one unit. |
Both are asynchronous — see Async jobs & polling. Note that rate limits apply to forge generation; workflow runs are not currently subject to those per-minute generation limits.