Spritesheets

Generate a sound effect for a previously generated spritesheet animation. Pass, as `spritesheet_video_url`, the `video_url` you received from `animateSprite`, `animateSpriteKeyframes`, `transferMotion`, or `editSpritesheet` - it must belong to a spritesheet you generated within the last 7 days; arbitrary external videos are not accepted. Spritesheets generated with the hydra model already come with `audio_url`, so only call this for forge / forge-pixel output or to replace hydra's sound. Optionally add a `prompt` describing the sound you want. The job result is the URL of the generated audio file only; no video is returned. The audio is also attached to the spritesheet, so it appears as `audio_url` in listGenerations (type spritesheet), where the spritesheet keeps the `request_id` it was generated with. Pass an optional `request_id` to make this call idempotent and to find its job again; it must not be one you already used for another generation. 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).

post/assets/sprite/audio

Request body

spritesheet_video_urlstring required

The video_url of a spritesheet you generated in the last 7 days (returned by animateSprite, animateSpriteKeyframes, transferMotion, or editSpritesheet). External URLs are not accepted.

promptstring

Optional description of the sound to generate.

request_idstring

Optional client-provided identifier, unique per request. Re-sending the same request_id returns the existing job instead of generating again. It does not re-tag the spritesheet, which keeps the request_id it was generated with.

asyncboolean

Defaults to true: the call returns 202 immediately with a job id to poll with getApiJob. Set false for a synchronous response (deprecated but supported): the call then blocks until the result is ready.

Response

Success

urlstring

URL to the generated audio file

typestring
durationnumber float
request_idstring
created_atinteger

Changes

Changed in 1 of the 17 revisions of this API.1