List generation history
List generation history with the FLORA API: GET /generations.
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.
GET https://app.flora.ai/api/v1/generationsAuth: API key as a bearer token,
Authorization: Bearer $FLORA_API_KEY. See Authentication.TypeScript SDK:
client.generations.list(), paginated. See Pagination.Operation ID:
listGenerations.
Example
curl -X GET 'https://app.flora.ai/api/v1/generations' \
-H "Authorization: Bearer $FLORA_API_KEY"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);
}Query parameters
limit
integer
No
Maximum number of results to return. 1 to 100.
cursor
string
No
Opaque cursor for fetching the next page. Example: eyJvZmZzZXQiOjIwfQ.
workspace_id
string
No
Workspace identifier. Pattern: ^ws_\S+$. Example: ws_abc123.
project_id
string
No
Project identifier. Pattern: ^prj_\S+$. Example: prj_abc123.
status
string
No
Run status filter. One of: pending, running, completed, failed.
include_inputs
boolean
No
Include each generation's submitted inputs (prompt and input references) on the item. Off by default; the inputs block can be large. Example: true.
Responses
200: Generation history returned.
generations
array of objects
Yes
generations[].run_id
string
Yes
Run identifier. Pattern: ^run_\S+$. Example: run_abc123.
generations[].status
string
Yes
One of: pending, running, completed, failed.
generations[].progress
number
Yes
generations[].created_at
number
Yes
generations[].started_at
number
No
generations[].completed_at
number
No
generations[].error_code
string
No
Machine-readable run error code. Example: provider_error.
generations[].error_message
string
No
Human-readable run error message. Example: The provider failed to complete the generation..
generations[].charged_cost
number
No
Cost charged in USD. At least 0.
generations[].outputs
array of objects
No
generations[].outputs[].output_id
string
Yes
Run output identifier. Example: output_1.
generations[].outputs[].type
string
Yes
Run output media type. One of: imageUrl, videoUrl, audioUrl, text, documentUrl, model3dUrl.
generations[].outputs[].url
string
Yes
Run output URL or text content. At least 1 character. Example: https://media.flora.ai/output.png.
generations[].outputs[].asset_id
string
No
Asset identifier for durable media outputs. Pattern: ^asset_\S+$. Example: asset_abc123.
generations[].outputs[].label
string
No
Optional output label. Example: preview.
generations[].outputs[].tri_count
integer
No
Triangle count for model3d outputs. At least 0.
generations[].outputs[].bbox
object
No
Axis-aligned local bounds for model3d outputs
generations[].outputs[].bbox.min
array of 3 numbers
Yes
generations[].outputs[].bbox.max
array of 3 numbers
Yes
generations[].outputs[].textured
boolean
No
Whether the model3d output carries textures
generations[].poll_url
string (uri)
No
URL to poll pending/running runs or fetch completed/failed run details.
generations[].generation_id
string
Yes
Run identifier. Pattern: ^run_\S+$. Example: run_abc123.
generations[].workspace_id
string
Yes
Workspace identifier. Pattern: ^ws_\S+$. Example: ws_abc123.
generations[].project_id
string
Yes
Project identifier. Pattern: ^prj_\S+$. Example: prj_abc123.
generations[].model
object
No
generations[].model.model_id
string or null
Yes
Model identifier. At least 1 character. Example: t2i-flux-2-pro.
generations[].inputs
object
No
The submitted inputs this run launched with; present only when include_inputs=true
generations[].inputs.prompt
string
Yes
Prompt the run executed
generations[].inputs.raw_prompt
string
No
Prompt as originally submitted, when it differs from the executed prompt
generations[].inputs.elements
array of objects
No
Canvas input elements wired into the run, as the model saw them
generations[].inputs.elements[].element_id
string
Yes
Canvas element identifier
generations[].inputs.elements[].element_name
string
Yes
Name of the input element
generations[].inputs.elements[].parent_node_id
string
Yes
Canvas node the element belongs to
generations[].inputs.elements[].prompt_extension
string
Yes
Text this element contributed to the prompt
generations[].inputs.elements[].tag
string
Yes
How the element was referenced in the prompt
generations[].inputs.elements[].image_ordinal
number
No
Ordinal for "image N" prompt references, counting image inputs only
generations[].inputs.asset_ids
array of string
No
Ordered reference input assets (images first, then video, audio, documents, 3D); "image N" ordinals index into the image subset
meta
object
Yes
meta.next_cursor
string or null
Yes
Opaque cursor for fetching the next page. Example: eyJvZmZzZXQiOjIwfQ.
meta.total_estimate
integer or null
No
Estimated total matching items. At least 0.
Errors
Every error has the same body: error.code, error.message, and error.fields on validation errors. See Errors for how to recover from each code.
400
invalid_json, input_validation_error
The body isn't valid JSON, or an input failed validation (fields lists each one).
401
unauthorized, invalid_api_key
The API key is missing, invalid or revoked.
402
insufficient_credits
The workspace balance is too low for this request.
403
forbidden, paid_plan_required
The key can't do this, or the workspace plan doesn't include it.
404
not_found
The resource doesn't exist or isn't visible to this key.
409
idempotency_duplicate, revision_conflict
Duplicate Idempotency-Key or a stale base_revision.
429
rate_limited
Too many requests. Back off and retry.
500
unknown_error, internal_error
Something failed on FLORA's side. Retry with backoff.
503
temporarily_unavailable
Authorization is temporarily unavailable. Retry later.
Last updated
Was this helpful?