Animate an asset
animate_assetPAID (image-to-video, cost scales with duration × pair count). Animate ANY asset type — the animation lands on the source asset and its still image is preserved. For grid assets (tileset/staged) pass pairs of tile indices; a self-loop { from: n, to: n } makes one tile loop seamlessly. ASK THE USER WHICH STAGES FIRST. Call get_asset, describe the tiles you can see, and get an explicit answer on which is the START and which is the END before you spend. "Animate the treasure box" does not tell you whether they mean closed→open, open→closed, or the lid alone, and guessing wrong bills them for a clip they cannot use. The server rejects a grid animate with no pairs (400) precisely so that this choice is always made deliberately — do not satisfy it by defaulting to 0→last. DEFAULTS TO A COST PREVIEW — see the dryRun argument. Returns { jobId } — poll get_job.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pairs | No | Grid assets only — which tile transitions to animate. Omit for single-image assets. | |
| dryRun | No | DEFAULTS TO TRUE. While true this returns only a cost quote ({ estimatedCredits, balance, spendCapDaily, spentLast24h, capRemaining }) and executes nothing. Show the user estimatedCredits and get an explicit yes for that amount, THEN re-call with dryRun:false to actually spend. | |
| assetId | Yes | Asset id or slug. | |
| closeLoop | No | Single-image assets — reuse the start frame as the end frame so the clip loops. | |
| motionHint | No | Extra motion guidance folded into the prompt. | |
| videoModel | No | Override the video model. | |
| iterationId | Yes | Revision (iteration) id to animate. | |
| idempotencyKey | No | Optional Idempotency-Key for the real (dryRun:false) call. Omit and one is minted per call. Reuse the SAME value when retrying a call that failed with ENTITY_BUSY / 402 / 429 so the retry cannot double-dispatch. | |
| durationSeconds | No | Clip length, clamped server-side to 2-10s. |