Start a generation run
Deprecated
$ flora runs start-generation
POST/runs/generation
Starts a model generation run in a project canvas using type, prompt, workspace_id, project_id, optional model endpoint ID, and optional model parameters. Use type=image|video|audio|text and model IDs returned by GET /models or list_models. Mutating public API requests support an optional Idempotency-Key header for client retries; duplicate keys within two hours return idempotency_duplicate.
Parameters
--project-id: string
Project identifier. Use the public API ID returned by list projects; it must start with prj_.
--type: "image" or "video" or "audio" or "text"
Generation type. Use “image”, “video”, “audio”, or “text”; do not pass model families such as “t2i” or “i2v”.
--workspace-id: string
Workspace identifier. Use the public API ID returned by list workspaces; it must start with ws_.
Start a generation run
flora runs start-generation \
--api-key 'My API Key' \
--project-id prj_abc123 \
--prompt 'A cinematic product photo of a ceramic mug on a sunlit table' \
--type image \
--workspace-id ws_abc123{
"charged_cost": 0,
"estimated_seconds": 0,
"run_id": "run_abc123",
"type": "generation",
"action": {
"action_id": "split-text"
},
"model": {
"model_id": "t2i-flux-2-pro"
},
"poll_url": "https://example.com",
"project_id": "prj_abc123",
"technique": {
"name": "name",
"technique_id": "tech_abcd1234"
}
}{
"error": {
"code": "input_validation_error",
"message": "prompt: Required",
"fields": [
{
"field": "prompt",
"message": "Required"
}
]
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid API key."
}
}{
"error": {
"code": "insufficient_credits",
"message": "Insufficient credits."
}
}{
"error": {
"code": "forbidden",
"message": "Forbidden."
}
}{
"error": {
"code": "not_found",
"message": "Not found."
}
}{
"error": {
"code": "idempotency_duplicate",
"message": "Duplicate idempotency key."
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded."
}
}{
"error": {
"code": "unknown_error",
"message": "An unknown error occurred."
}
}Returns Examples
{
"charged_cost": 0,
"estimated_seconds": 0,
"run_id": "run_abc123",
"type": "generation",
"action": {
"action_id": "split-text"
},
"model": {
"model_id": "t2i-flux-2-pro"
},
"poll_url": "https://example.com",
"project_id": "prj_abc123",
"technique": {
"name": "name",
"technique_id": "tech_abcd1234"
}
}{
"error": {
"code": "input_validation_error",
"message": "prompt: Required",
"fields": [
{
"field": "prompt",
"message": "Required"
}
]
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid API key."
}
}{
"error": {
"code": "insufficient_credits",
"message": "Insufficient credits."
}
}{
"error": {
"code": "forbidden",
"message": "Forbidden."
}
}{
"error": {
"code": "not_found",
"message": "Not found."
}
}{
"error": {
"code": "idempotency_duplicate",
"message": "Duplicate idempotency key."
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded."
}
}{
"error": {
"code": "unknown_error",
"message": "An unknown error occurred."
}
}