Skip to main content

Layer API: Key concepts

A plain-language explanation of workspaces, models, inferences, workflows, files, and Creative Units — the building blocks of the Layer API.

When building with the Layer API, you'll encounter a handful of core concepts that everything else is built around. This article explains what each one is and how they relate to each other.

Workspaces

A workspace is the top-level container for your team on Layer. Every API call is scoped to a workspace — it holds your team members, available models, generated assets, and Creative Unit balance. You'll need your workspace ID (a UUID) for every API request.

To find your workspace ID: open app.layer.ai, go to Settings, and look for the workspace ID — or use the List workspaces endpoint after authenticating.

Models

Models are the AI engines that generate assets. Each model supports specific output types (image, video, 3D, audio) and capabilities (style transfer, inpainting, reference images, and more). Layer provides 100+ built-in models, plus any custom styles your team has trained.

Use the List models endpoint to browse what's available in your workspace and filter by modality or capability. Each model has an id you pass when starting a generation.

Inferences

An inference is a single generation run. You pick a model, provide a prompt and parameters, and Layer starts generating. Inferences are asynchronous — the API returns immediately with an inference_id and a status of IN_PROGRESS. You then poll the Get inference run endpoint until the status changes to COMPLETED, at which point the response includes URLs to your generated assets.

The typical flow:

  • POST to start an inference → receive an inference_id

  • GET the inference by ID → check status

  • When status is COMPLETED → read asset URLs from the response

Workflows

Workflows are multi-step pipelines built in the Layer app's Blueprint editor. They chain operations together — for example: generate an image, upscale it, then remove the background — and expose the entire sequence as a single callable API endpoint.

Workflows are also asynchronous: you start one and receive a run_id, then poll the Get workflow run endpoint for results. Use the List workflows endpoint to see which workflows are published and available in your workspace.

Files

Files are inputs you upload before a generation — reference images, masks, poses, or audio. After uploading, you receive a file_id that you pass as a parameter when starting an inference or workflow.

Files must be uploaded before generation. The API does not accept raw image bytes inline — you upload first, then reference by ID. See Uploading files via the API for the full upload flow.

Creative Units (CUs)

Creative Units are the billing currency for generations. The cost of each inference or workflow run varies by model and output size. Before starting a generation, you can call the Estimate inference price or Estimate workflow price endpoints to check the cost upfront. Your current balance is visible in the Get workspace endpoint response and in Settings > Billing in the app.

What's next

Did this answer your question?