editSpritesheet
Edit a previously generated spritesheet: re-prompt its underlying animation (edit_mode "prompt"), extend the frame beyond its borders ("outpaint"), or repair a bad loop ("fix_loop"). Pass the spritesheet_url you received from animateSprite, animateSpriteKeyframes, transferMotion, or an earlier edit - it must be a spritesheet you generated within the last 7 days; arbitrary external images are not accepted. Omit duration, frames, frame_size, crop and model to keep the source spritesheet's values. A prompt is required for edit_mode "prompt", optional for "outpaint", and not accepted for "fix_loop"; optionally add up to 5 reference images (URL or base64) to guide the edit. The job result is the same result shape as animateSprite (spritesheet URL, frame layout, optional GIF or individual frames). Credits are held when the job is accepted; the final charge is max(rate × produced seconds, the model's minimum charge), never more than for the duration you requested, and the difference (or everything, if the job fails or is cancelled) is refunded. Prompt edits are priced per model (credits/second × duration); "outpaint" and "fix_loop" run a lighter pipeline in which model is ignored and are billed at a flat 1 credit per second of the output duration (the source spritesheet's duration unless you pass one). Outpaint decides the extra margin itself - there is no amount parameter. The result carries the same fields as animateSprite (spritesheet_url, video_url, grid fields); audio is generated only by prompt edits on hydra, so a fix on a hydra sheet comes back without audio_url. Pass an optional request_id to tag the result for later retrieval via listGenerations (type spritesheet). Async generation job: returns {id, status} - poll getApiJob (job and credit contract: see the server instructions).
Credits: edit_mode "fix_loop" / "outpaint": flat 1 credit per second of output, no minimum, model ignored; edit_mode "prompt": per model as listed - credits/s × seconds, per model: Hydra 3/s (shortest duration 3s, so 9 credits minimum), Forge 2/s (min charge 4 credits), Forge Pixel 2/s (min charge 4 credits); see this endpoint's full pricing table in the API docs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| requestBody | Yes | Payload for editing a previously generated spritesheet. edit_mode selects the operation - prompt-driven edit (default), outpaint, or loop fixing. |