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
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
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" } } ], "meta": { "next_cursor": "eyJvZmZzZXQiOjIwfQ" }}