animateSpriteKeyframes
Animate a sprite through up to three fixed keyframes - initial_image, middle_image and final_image (each a URL or base64) - producing a spritesheet that interpolates through the provided frames in order. At least one of initial_image or middle_image is required (a final_image alone has nothing to anchor the animation); any keyframe may be omitted. The motion_prompt is optional here - when omitted, the motion is derived purely from the keyframes. Runs on the Forge family, the only models supporting middle keyframes: Forge (default) or Forge Pixel for pixel-art sprites; both share the same durations and pricing. The job result is a single sprite result directly (spritesheet URL, frame layout, and optionally a GIF or individual frame URLs when requested) with no separate polling step. Credits are charged only on success, based on the produced duration and never more than the duration you requested. Use animateSprite instead for the classic single-image + text-prompt animation with model choice. Pass an optional request_id to tag the result so you can locate it later via GET /assets/sprites/results. Requires an API key (user scope). Returns 202 with a job id immediately; poll getApiJob (pass wait: 30) until status is succeeded, then read its result field, which is exactly the response documented for this operation. Each account may have up to 50 generations queued or running at once; beyond that submissions return 429 (PENDING_JOBS_LIMIT) - wait for jobs to finish.
Credits: cost varies by model and duration (credits/sec): Forge 1.5/s (min 4), Forge Pixel 1.5/s (min 4); see this endpoint's full pricing table in the API docs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| requestBody | Yes | Payload for generating an animated spritesheet that interpolates through up to three fixed keyframes (initial / middle / final). Runs on the Forge family - the only models supporting a middle keyframe. Input images can be provided in base64 or URL. At least one of initial_image or middle_image must be provided. |