Workflow API feature guide

The Firefly Creative Production Workflow API lets you execute workflows over multiple assets and manage batch jobs. You start a batch with a workflow and a set of images or videos, then monitor progress and retrieve results per asset.

This feature guide offers an overview for using the API endpoints. For the full technical details, see the API reference.

Workflow at a glance

  1. Execute a batch – Send a workflow and assets to POST /batch/execute and receive a batchId.
  2. List or filter batches – Use GET /batches to see your batches, optionally filtered by status, workflow, or date.
  3. Check batch status – Use GET /batch/{batchId}/status to see progress, asset counts, and timing.
  4. Cancel (optional) – Use POST /batch/{batchId}/cancel to stop a running or pending batch.
  5. Get execution results – Use GET /batch/{batchId}/executions to list per-asset results, outputs, and errors.

All batch endpoints require authentication (Bearer token). Results are scoped to the authenticated user; you only see batches you created. For more information on authentication, see the Authentication guide.

API contract version (api-version)

Batch operations use an optional HTTP header api-version to select the public contract. The current value is 1.0.

Behavior
Detail
Omitted header
The service assumes 1.0.
Supported value
Send api-version: 1.0 to pin the contract explicitly.
Unsupported value
The API returns HTTP 400 with JSON status: "error" and a message naming the supported version.
Responses
Successful and error responses on batch routes include an api-version response header so clients know which contract handled the call.

Full parameter and response header definitions are in the API reference.

Execute a batch of assets

Start a new batch with POST /batch/execute. You send a workflow definition and the API runs it for each asset in parallel.

Workflow format requirements:

The response is 202 Accepted and includes a batchId, batch status (e.g. pending, running), assets (counts), config, createdAt, and links for checking the batch status, canceling the batch, and listing the batch executions. Use the returned batchId for all later calls.

List batches

Use GET /batches to list batches for the authenticated user. Results are filtered by your user and sorted by creation date (newest first). Pagination and filters are supported.

Query parameters:

The response includes batches (array of batch metadata), pagination (limit, offset, count, hasMore), and filters (the applied query values).

Get batch status

Use GET /batch/{batchId}/status to see current progress and details for a batch.

You get:

Use this to poll progress or to decide when to fetch execution results or cancel.

Cancel a batch

Use POST /batch/{batchId}/cancel to cancel a batch that is pending or running. No new assets are started; assets already in progress may still complete. The batch status becomes cancelled. You cannot cancel batches that are already completed, failed, or cancelled.

The response includes the batchId, status (cancelled), message, previousStatus, and assets (current counts).

List execution results

Use GET /batch/{batchId}/executions to list per-asset execution results for a batch. You can filter and paginate the results.

Each item includes:

The response also includes total (number of assets in the batch), executions (array of results), and pagination (limit, offset, count, hasMore). Use this to collect outputs or to identify failed executions for retry.

Next steps