Skip to content

Get a run

GET
/runs/{runId}
import { FloraClient } from '@flora-ai/flora';
const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });
const generation = await client.generations.retrieve({
runId: '<runId>',
});
console.log(generation);

Returns status and completed output URLs for a public API run, including action runs started through POST /runs/action.

Error responses use the standard error body.

runId
required

Run identifier

string
/^run_\S+$/

Run identifier

Run returned.

Media type application/json
object
run_id
required

Run identifier

string
/^run_\S+$/
status
required
string
Allowed values: pending running completed failed
progress
required
number
created_at
required
number
started_at
number
completed_at
number
error_code

Machine-readable run error code

string
error_message

Human-readable run error message

string
charged_cost

Cost charged in USD

number
outputs
Array<object>
object
output_id
required

Run output identifier

string
type
required

Run output media type

string
Allowed values: imageUrl videoUrl audioUrl text documentUrl model3dUrl
url
required

Run output URL or text content

string
>= 1 characters
asset_id

Asset identifier for durable media outputs

string
/^asset_\S+$/
label

Optional output label

string
tri_count

Triangle count for model3d outputs

integer
bbox

Axis-aligned local bounds for model3d outputs

object
min
required
array
max
required
array
textured

Whether the model3d output carries textures

boolean
poll_url

URL to poll pending/running runs or fetch completed/failed run details.

string format: uri
brand

Brand OS brand, release, rules and images a brand-guided generation used

object
brand_id
required

Brand identifier

string
/^brand_\S+$/
version
required

Release version the run read, such as “v3”

string
task
required

Task profile key the run used, such as image.generate

string
surface
required

Where the brand applied: an API or agent generation, a canvas project’s brand step, or render_text

string
Allowed values: api canvas render_text
rules
required

Rules that shaped the run, as ruleKey@vN

Array<string>
attached_asset_keys
required

Brand masters attached as inputs: images, logos and fonts

Array<string>
bank_asset_keys
required

Imagery bank photos used, as style references or painted as they are

Array<string>
imagery

Where the imagery came from: the bank, a model, or both. Absent when the output carries no photo or generated image

string
Allowed values: bank generated mixed
layout

Layout path the output filled

string
prompt_rewritten

Canvas: whether the brand step rewrote the prompt

boolean
Example
{
"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"
}
],
"brand": {
"brand_id": "brand_abc123",
"surface": "api",
"imagery": "bank"
}
}