List generation history
import { FloraClient } from '@flora-ai/flora';
const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });
// Paginated lists are async iterables; further pages are fetched as needed.for await (const generation of await client.generations.list()) { console.log(generation);}curl -X GET 'https://app.flora.ai/api/v1/generations' \ -H 'Authorization: Bearer $FLORA_API_KEY'Lists generation history for the authenticated caller, including pending, running, completed, and failed generations. Results are newest first and can be filtered by workspace_id, project_id, and status. Each item includes poll_url; use it to poll pending/running generations and to fetch completed or failed run details and outputs.
Error responses use the standard error body.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”Maximum number of results to return
Maximum number of results to return
Opaque cursor for fetching the next page
Opaque cursor for fetching the next page
Workspace identifier
Workspace identifier
Project identifier
Project identifier
Run status filter
Run status filter
Include each generation’s submitted inputs (prompt and input references) on the item. Off by default; the inputs block can be large.
Include each generation’s submitted inputs (prompt and input references) on the item. Off by default; the inputs block can be large.
Responses
Section titled “ Responses ”Generation history returned.
object
object
Run identifier
Machine-readable run error code
Human-readable run error message
Cost charged in USD
object
Run output identifier
Run output media type
Run output URL or text content
Asset identifier for durable media outputs
Optional output label
Triangle count for model3d outputs
Axis-aligned local bounds for model3d outputs
object
Whether the model3d output carries textures
URL to poll pending/running runs or fetch completed/failed run details.
Run identifier
Workspace identifier
Project identifier
The submitted inputs this run launched with; present only when include_inputs=true
object
Prompt the run executed
Prompt as originally submitted, when it differs from the executed prompt
Canvas input elements wired into the run, as the model saw them
object
Canvas element identifier
Name of the input element
Canvas node the element belongs to
Text this element contributed to the prompt
How the element was referenced in the prompt
Ordinal for “image N” prompt references, counting image inputs only
Ordered reference input assets (images first, then video, audio, documents, 3D); “image N” ordinals index into the image subset
Example
{ "generations": [ { "run_id": "run_abc123", "status": "pending", "error_code": "provider_error", "error_message": "The provider failed to complete the generation.", "outputs": [ { "output_id": "output_1", "type": "imageUrl", "url": "https://media.flora.ai/output.png", "asset_id": "asset_abc123", "label": "preview" } ], "generation_id": "run_abc123", "workspace_id": "ws_abc123", "project_id": "prj_abc123", "model": { "model_id": "t2i-flux-2-pro" }, "inputs": { "asset_ids": [ "asset_abc123" ] } } ], "meta": { "next_cursor": "eyJvZmZzZXQiOjIwfQ" }}