Spritesheets
Edit a previously generated spritesheet: re-prompt its underlying animation (edit_mode "prompt"), extend the frame beyond its borders ("outpaint"), repair a bad loop ("fix_loop"), or re-render it with finer detail ("improve": the extra pass hydra-plus runs when it generates, on a spritesheet generated with hydra only - any other returns HTTP 400; a sheet generated on hydra-plus already has it). 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" or "improve"; 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 rate × seconds of video generated, never more than was held, and the difference (or everything, if the job fails or is cancelled) is refunded. The returned sheet is then trimmed to its best loop and can run slightly shorter than the video; that trim is not deducted. Prompt edits are priced per model (credits/second × duration) and held for the duration you requested; "outpaint", "fix_loop" and "improve" run a lighter pipeline in which `model` is ignored and are billed at a flat 1 credit per second of output, held for and capped at the length of the source spritesheet's video (`duration` does not change their price). 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); new audio is generated only by prompt edits on hydra: "fix_loop", "outpaint" and "improve" do not regenerate it, and their result carries the source spritesheet's `audio_url` when it had one. Pass an optional `request_id` to tag the result for later retrieval via listGenerations (type spritesheet). Requires an API key (user scope). The call returns 202 with a job id - poll getApiJob (pass wait 30 to long-poll) honouring poll_after_ms, until status is succeeded; its result field is exactly the response documented for this operation. Synchronous responses are deprecated but still supported: pass `async: false` to block until the result is ready and receive it as the response body. Synchronous calls run on the same queue: the response carries an X-Ludo-Job-Id header, and a job still running after 15 minutes comes back as 202 with the job instead of an error. Each account may have up to 50 generations queued or running at once via the API; a request beyond that returns 429 (code PENDING_JOBS_LIMIT).
Changed onpost/assets/sprite/edit
Request
- Base URLhttps://api.ludo.ai/api
- AuthAPI key in header Authorization
Request body
Response
Success
Changes
- info
added the success response with the status
- info
- info
endpoint added
- info