Spritesheets

Re-pose an existing sprite into a new target pose while preserving the character, taking a source image (URL or base64), a pose name (or "Other" with a free-text description), and an optional n (1-4) for how many variations to produce. Only works with sprite image types (not icons, screenshots, etc.). The job result is an array of pose results, each containing the generated image url, the pose and description used, and a suggested motion_prompt tuned for that pose. Credits are held when the job is accepted and refunded if it fails or is cancelled; the charge scales with the number of images generated. This is typically the first step before animating: call generatePose to set the character's pose, then feed the result (and its suggested motion_prompt) into animateSprite for the best animation quality; use rotateSprite instead when you want to change the camera angle rather than the pose. Pass an optional request_id to tag the results so you can locate them later 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).

post/assets/sprite/pose

Request body

imagestring required

URL or base64-encoded source sprite image to generate a new pose from.

posestring required

Target pose for the sprite. Use the value "Other" to generate other poses not listed in the accepted values, and fill the field description accordingly.

descriptionstring

Optional additional instructions or description to guide the pose generation.

nnumber

Number of pose variations to generate (1-4).

augment_promptboolean

Augment the prompt behind the scenes. Disable to have more control.

request_idstring

Optional client-provided identifier, unique per request. Re-sending the same request_id returns the existing job instead of generating again. Also usable as the request_id filter of listGenerations.

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 of the generated pose image

posestring

The pose that was used to generate this image

descriptionstring

The pose description that was used to generate this image

motion_promptstring

A suggested motion prompt optimized for this pose. Can be used directly with 'animateSprite' for best animation results.

Changes

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