Skip to content

Generations and states

REST base: https://infinityflow.stream/api/v1. Creation bodies are JSON. POST /generations requires a UUID Idempotency-Key and generations:write scope.

{
"prompt": "A futuristic city at sunrise",
"title": "Campaign opening",
"mediaKind": "video",
"model": "studio-video",
"aspect": "16:9",
"durationSeconds": 10,
"outputCount": 1,
"referenceIds": []
}
Field Rule
prompt Required; 1–4,000 characters after trimming
title Optional; up to 100 characters
mediaKind video or image; send explicitly for clarity
model studio-video for video; studio-image for images
aspect Required: 16:9 or 9:16
durationSeconds Standard video is 10 seconds; other values are rejected
outputCount One output per job; use a batch for multiple generations
projectId UUID of an owned project; omitted uses the default project
referenceIds Up to 3 distinct UUIDs of valid private reference images

Do not send unsupported resolution, longer duration, supplier IDs or unpublished model settings. GET /models returns the supported capabilities.

State Action
queued Saved request awaiting eligible capacity
processing Preparing, submitting, running or recovering
succeeded Output is available within its retention window
failed Finished without an available result; inspect the saved state before making a new creation
cancelled Cancelled before submission
attention_required Submission outcome is uncertain or intervention is needed; never blindly repeat it

GET /generations/{id} returns { "generation": ... }, including createdAt, updatedAt, readyAt, expiresAt and outputs. Each output describes availability and authorized URLs. Never infer completion from elapsed time alone.

GET /generations?projectId=UUID&cursor=CURSOR returns up to 24 visible items and nextCursor. Pass the returned cursor unchanged using URLSearchParams; it contains a timestamp and ID so same-time batch items are not skipped.

POST /generations/{id}/cancel only cancels requests whose submission has not started and whose execution lease does not prevent cancellation. On 409, inspect the saved request. Cancellation does not interrupt an already submitted generation and does not make an uncertain outcome safe to repeat.