Animate an asset
animate_assetPAID (image-to-video; Wan 3.0 costs 150 credits/second, so each default 2-second pair is 300 credits; total 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. Confirmed background-removal provider failures already fall back automatically on the server, without a new user charge. There is no daily removal retry lockout; honor reported cooldowns and unknown-task safeguards if recovery still fails. For already-authorized generation, automatically execute a zero-credit recovery quote and poll it; no renewed approval or refund. Never duplicate a running recovery. Limit automatic retries to two per failed job per session; stop on recurring failure or any paid quote. 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, then ask a normal confirmation question. Prefer the client's native question UI with Approve / Decline / Discuss choices when available; otherwise accept any unambiguous conversational approval. Never require a fixed phrase or ask the user to type a magic word. Only after approval, 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. |