Create generation
Start an image or video generation. This spends credits: the server reserves a conservative hold up front (call estimateGeneration first to see it) and returns 201 with the generation in a reserved state; the provider work runs asynchronously, so poll getGeneration for completion. Send an idempotencyKey so a retry returns the original generation instead of charging twice.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Team (workspace) id (UUID). Discover ids via the list teams endpoint or the agent context.
Body
Where the generation was started from (studio, agent, or editor). Used for attribution; it does not change how the media is produced.
studio, agent, editor What to generate: image or video. Must match the chosen model and the shape of params.
image, video Catalog model id to generate with, e.g. "google/veo-3.1-fast". List models to see the available ids and their capabilities.
Generation parameters for the chosen modality (prompt, aspect ratio, duration, reference images, and so on). The shape must match the model's capabilities; mismatches are rejected.
- Option 1
- Option 2
Short human-readable summary of the prompt, stored on the generation row for display in lists and history.
Media-library folder id to place the generated asset in. null or omitted uses the team default location.
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$Agent chat session id to associate this generation with when it was started from /agent chat.
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$Id of a post to attach the generated media to once it completes.
Client-supplied key so a retried request returns the original generation instead of starting (and charging for) a second one.
Response
Success
a Universally Unique Identifier
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$a Universally Unique Identifier
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$a Universally Unique Identifier
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$studio, agent, editor image, video openrouter, fal queued, reserved, running, rate_limited, ready, failed, cancelled, skipped_insufficient_credits a Universally Unique Identifier
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$a Universally Unique Identifier
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$