Model APIs

Workflows

On this page
  1. Presets
  2. Sets
  3. Compositions
  4. Edit sessions
  5. Next steps

There is no single endpoint to chain arbitrary models and no workflow event stream; each of these workflows has its own status you poll.

Choose the surface that matches your outcome. A preset prepares a request, a set coordinates several image jobs, a composition turns a timeline into a deliverable, and an edit session keeps the history of successive image edits.

Kind What it connects Start with What you poll How it bills
Preset Intake answers, a prompt and its target model POST /presets/{slug}/assemble, then the returned generate endpoint The generated Job through GET /jobs/{id} Slot filling is free; doctrine assembly has a one-credit hold and meters writer cost. The generation bills separately.
Set Two to eight image jobs using shared references and settings POST /generate/set GET /sets/{id}; each member also has a Job Each member has its own credit hold, settlement and refund.
Composition Timeline media, edits, grades and text into an MP4 or still POST /compositions/{id}/render GET /renders/{id} Renders currently take no credit hold. Generating source media is billed separately.
Edit session An existing image and a sequence of new image edits POST /edit-sessions, then POST /edit-sessions/{id}/steps GET /edit-sessions/{id} or the step's GET /jobs/{id} Each step is priced as an image generation; failed or canceled steps are refunded and excluded from chain_credits.

Presets #

From preset to generation Read a preset and its intake, assemble the answers into a prompt, submit to the returned generate endpoint, and poll the resulting job. Assembly does not generate media. PREPARE THE REQUEST RUN THE MODEL Preset + intake GET /presets/{slug} Assemble answers POST …/assemble Submit prompt + params POST /generate/* Follow the job GET /jobs/{id} Assembly returns a prompt, settings and its charge. Media generation is a separate submit.
Read a preset, assemble its prompt, submit to its model and follow the job
Property Value
Input A catalog preset slug, its intake answers, optional chips and a brief
Preparation Read GET /presets/{slug}/intake/context, then call POST /presets/{slug}/assemble
Output prompt, optional negative_prompt, params, endpoint and the assembly charge
Execution Submit the assembled fields to the returned generate endpoint; assembly itself creates no media
Progress Follow the returned generation job, not the preset catalog record

Public presets describe an outcome and the model or Studio lane that makes it. For create_image, create_video and create_audio targets, assembly validates the answers against the preset's intake and model limits. It keeps the target model fixed. Studio-intent targets do not use this assembly path; their agent turns and generated media bill separately.

Sets #

One set, independent image jobs Submitting a set fans out into two to eight member jobs with independent credit holds. Poll the set to collect their ready outputs. Accepted members continue if a later member is refused. SHARED VISUAL SETTINGS 2–8 MEMBER JOBS GROUPED OUTPUTS Pack or variants POST /generate/set Member 1 · own hold Member 2 · own hold Further members Jobs + ready assets GET /sets/{id} Each accepted job settles or refunds independently. Refused labels appear in problems.
A set fans out into independent image jobs and collects their outputs
Property Value
Input Two to eight labelled prompts plus a shared image model and visual settings
Kinds pack for a coordinated collection; variants for an axis such as emotion or concept
Submit response 202 with an OutputSet, not a single Job
Progress generating, then ready, partial or failed; inspect each member's job
Refused members problems records refused labels; accepted jobs continue and further members are not submitted

Keep the set id to display the group and each member's job id to investigate an individual failure. The set is a collection of independent generation outcomes; a failure or refusal does not roll back outputs that already succeeded.

Compositions #

From composition to finished asset A stored composition and its edits become a queued render. Poll the render status, inspect warnings, then read the produced MP4 or PNG asset for a fresh signed URL. AUTHORED TIMELINE ASYNCHRONOUS EXPORT Composition HTML + edits overlay 202 · render queued POST …/{id}/render Status + warnings GET /renders/{id} MP4 or still PNG GET /assets/{id} Poll the render id. Read its warnings before using the produced asset.
Render a composition, poll the render record and read its output asset
Property Value
Input A stored HTML timeline composition and its edits overlay
Start POST /compositions/{id}/render
Output MP4 by default; target: still produces one PNG frame
Progress The separate render record at GET /renders/{id}
Inspection Read warnings as well as the produced asset; unsupported timeline features can be skipped
Other operations Clone through POST /compositions/{id}/clone; import through POST /compositions/{id}/imports/figma; export an editor ZIP through GET /compositions/{id}/export

A render uses the composition's effective timeline, including supported placement, edits, grades, masks, media motion and text. It does not execute arbitrary page scripts. Follow the render id until completion, then read the produced asset for a fresh download URL. Editor export accepts format=fcpxml or format=aejsx and is separate from server rendering.

Edit sessions #

Edit from the current head Create a session from an image, estimate the next step, append an edit, and poll its job. The output becomes the next head. Revert can move the head to an earlier step without deleting any asset or step. START FROM A LIBRARY IMAGE ONE EDIT JOB PER STEP Create session POST /edit-sessions Estimate next edit GET …/{id}/estimate Append from head POST …/{id}/steps Poll session or job ready output → next head Estimate again before the next step Revert moves the head to an earlier step or source. It deletes nothing.
Create an edit session, estimate the next edit, append a step and follow its job
Property Value
Start POST /edit-sessions with source_asset_id for an image in your library
Next edit POST /edit-sessions/{id}/steps queues an image edit from the current head
Read GET /edit-sessions/{id} returns the ordered steps, their job ids and their statuses
Quote GET /edit-sessions/{id}/estimate returns next_step_credits, the resolved settings and chain_credits
Revert POST /edit-sessions/{id}/revert with an earlier step_id, or null to use the source
Narrow tweaks GET /tweak-scopes lists measured scopes, including unavailable scopes and their reasons

An edit step can use a freeform prompt, or a supported scope plus detail for a local change. A scoped edit cannot also carry style_id; its input and prompt are constrained to preserve the selected image. Read the available scope and model choices before submitting.

Field Type Required Description
id string Yes
source_asset_id string Yes
head_step_id string, nullable No Null means the source is the head.
head_asset_id string Yes The head output, or the source as a fallback while the output is unavailable.
steps array of EditSessionStep Yes Steps in position order.
chain_credits integer Yes Sum of queued, running and succeeded step quotes. Failed and canceled steps are refunded and excluded.
Field Type Required Description
model string Yes
quality string Yes
render_quality string Yes
next_step_credits integer Yes
chain_credits integer Yes
steps array of object Yes

Each step has its own job status. The session itself is the history and head pointer; it has no aggregate status field. Estimates show the cost of the next step and the chain total. Failed and canceled steps are excluded from that total.

Next steps #