Spritesheets are the main output of AutoSprite — animation frames arranged in a grid, ready to import into your game engine.
Generate Animations
POST /api/v1/characters/:characterId/spritesheets
Generate one or more animations for a character. Each animation produces a video that is processed into a spritesheet. Returns job IDs for polling.
Cost: depends on videoTier — turbo 5, pro 10, ultra 10/sec, max 35 credits per animation. API turbo is soundless; pro can add sound; ultra/max include audio for free. Turbo is the recommended tier for character animations.
Request Body
| Field | Type | Default | Description |
|---|---|---|---|
animations | array | — | Required. 1–10 animation entries (see below) |
videoTier | string | "turbo" | Video tier + price per animation: "turbo" (5 cr, 2s — recommended), "pro" (10 cr, 4s, optional sound), "ultra" (10 cr/sec, native audio), "max" (35 cr, 4s, bundled audio, supports last-frame/loop). ultra has no last-frame/loop support |
turboMode | string | "reference" | Turbo only. "reference" animates straight from the character's base art (no seed frame — the most consistent result). "first_frame" paints a seed frame first and animates from it; selected automatically when poseId, lastFramePoseId or firstFrameQuality is set |
durationSec | number | per tier | Clip length, clamped to the tier's allowed values (turbo: 2; pro: 4 or 6; max: 4 or 6; ultra: 1–6) |
frameCount | number | 25 | Frames to extract (2–64). Defaults to 64 with sound |
frameSize | number | 256 | Output frame size in pixels (32–512) |
withSound | boolean | false | Generate sound effects (ignored by API turbo; pro +clip cost; ultra/max include audio free) |
removeBg | string | "default" | Background removal: "default" or "ultra". Ultra uses AI-powered background removal for the cleanest results |
Legacy turbo: videoTier: "pro" with durationSec: 2 runs the old turbo engine (5 credits). It is less consistent than turbo — use it only to keep new clips matching animations made before September 2026.
Animation Entry
| Field | Type | Required | Description |
|---|---|---|---|
kind | string | Yes | Animation type (see below) |
prompt | string | For custom | Custom animation description (max 1000 chars) |
name | string | For custom | Display name for the animation |
poseId | string | No | Pose ID to use as the first frame |
lastFramePoseId | string | No | Pose ID to use as the last frame (turbo switches to first_frame mode and honors it at no extra cost; ignored by ultra) |
loop | boolean | No | Make the animation loop seamlessly (turbo loops natively; ultra can't loop seamlessly) |
rawPrompt | boolean | No | Custom animations only. Send your prompt to the video model verbatim, skipping the default template. Use when the template's built-in direction (e.g. "facing right (east)") conflicts with a direction in your own prompt. |
firstFrameQuality | string | No | "pro" to generate the first frame with the pro model for sharper poses and better prompt fidelity. Costs +3 credits per animation (not charged when poseId is supplied, since the first frame isn't generated). Useful for hero shots like victory poses or signature actions where the default first-frame model produces blurry or off-pose results. |
Animation Kinds
Sidescroller (2D side-view)
| Kind | Description |
|---|---|
idle | Character standing/breathing idle animation |
walk | Walking cycle |
run | Running cycle |
attack | Attack/slash animation |
jump | Jump animation |
custom | Custom animation — requires prompt and name |
Presets (side-view)
Ready-made animations from the app's preset library. Pass the preset as the kind — it uses its built-in action, so send no prompt (use custom to write your own). Same price and options as any other kind. GET /api/v1/animations lists them all.
| Category | Kinds |
|---|---|
| Combat | punch, kick, block, hurt, hit_react, dodge, dodge_lean, death, shoot |
| Magic & skills | cast, pickup, push, pull, throw |
| Emotes | wave, sit, kneel, point, sleep, victory, dance, talk |
| Movement | dash, fall, climb, swim, crouch, roll, fly, slide |
Want a weapon attack (sword, greatsword, spear, …)? Use Attack Moves.
Isometric (top-down / 3⁄4 RPG)
Recommended: Isometric Packs — one render gives you all eight directions for 15 credits, and because every view comes from the same render the character stays consistent across directions.
Individual directions — when you only need some facings (e.g. just a down-facing idle), request them here as iso_<action>_<direction>. Each direction is a separate render billed at the videoTier price. Only the five east-side directions exist as kinds; mirror them in your game for left / NW / SW.
| Action | up (N) | northeast (NE) | right (E) | southeast (SE) | down (S) |
|---|---|---|---|---|---|
| Idle | iso_idle_up | iso_idle_northeast | iso_idle_right | iso_idle_southeast | iso_idle_down |
| Walk | iso_walk_up | iso_walk_northeast | iso_walk_right | iso_walk_southeast | iso_walk_down |
| Run | iso_run_up | iso_run_northeast | iso_run_right | iso_run_southeast | iso_run_down |
| Jump | iso_jump_up | iso_jump_northeast | iso_jump_right | iso_jump_southeast | iso_jump_down |
idle, walk, and run (sidescroller and isometric) auto-loop with first frame = last frame for a seamless cycle.
Example (Sidescroller)
curl -X POST https://www.autosprite.io/api/v1/characters/char_abc123/spritesheets \
-H "x-api-key: vspk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"animations": [
{ "kind": "idle" },
{ "kind": "walk" },
{ "kind": "attack" },
{ "kind": "death" },
{
"kind": "custom",
"name": "Cast Spell",
"prompt": "character raises staff and casts a fireball"
}
],
"videoTier": "turbo",
"frameCount": 49,
"frameSize": 512,
"removeBg": "ultra"
}'
Response
Status: 202 Accepted
{
"characterId": "char_abc123",
"workflows": [
{ "jobId": "job_001", "kind": "idle", "videoId": "vid_001" },
{ "jobId": "job_002", "kind": "walk", "videoId": "vid_002" },
{ "jobId": "job_003", "kind": "attack", "videoId": "vid_003" },
{ "jobId": "job_004", "kind": "death", "videoId": "vid_004" },
{ "jobId": "job_005", "kind": "custom", "videoId": "vid_005" }
],
"creditsUsed": 25
}
If some animations fail while others succeed, you'll get a partial response with a failed array and a proportional credit refund:
{
"characterId": "char_abc123",
"workflows": [
{ "jobId": "job_001", "kind": "idle", "videoId": "vid_001" }
],
"failed": [
{ "kind": "walk", "error": "Video generation timed out" }
],
"creditsUsed": 5
}
Errors
| Status | Code | When |
|---|---|---|
| 400 | MISSING_ANIMATIONS | No animations array provided |
| 400 | TOO_MANY_ANIMATIONS | More than 10 animations |
| 400 | MISSING_PROMPT | Custom animation without a prompt |
| 400 | INVALID_KIND | Unknown kind |
| 400 | INVALID_REQUEST | A preset sent with a prompt or rawPrompt |
| 400 | INVALID_FIRST_FRAME_QUALITY | firstFrameQuality set to an unsupported value (only "pro" is allowed) |
| 402 | INSUFFICIENT_CREDITS | Not enough credits for all animations |
| 403 | PLAN_REQUIRED | Paid subscription required |
| 404 | NOT_FOUND | Character not found |
If all animations fail, you get a full credit refund. If some fail, you're refunded proportionally for the failed ones only.
Attack Moves
POST /api/v1/characters/:characterId/attacks
Side-view weapon attacks — the same moves as the app's attack wizard. Pick a weapon and up to four of its moves; each move becomes its own animation and spritesheet. The character is painted holding the weapon in a guard stance, and every move starts on that guard (and, except two bow shots, ends back on it).
Cost: 5 credits per move. Moves always render on Turbo, so there is no tier, length or sound option. A move that fails to start is never charged.
The moves of one request share one guard frame, so the weapon looks the same in all of them. Ask for all the moves you want for a weapon in one request, then call again for another weapon.
Request Body
| Field | Type | Default | Description |
|---|---|---|---|
weapon | string | — | Required. "sword", "spear", "axe", "hammer", "greatsword", "staff", "dagger" or "bow" |
moves | string[] | — | Required. 1–4 of the weapon's moves (table below) |
frameCount | number | 25 | Frames per move (2–64) |
frameSize | number | 256 | The character's size in pixels (32–512), or 0 for native. Each move's cell is twice this — see below |
removeBg | string | "default" | Background removal: "default" or "ultra" |
| Weapon | Light | Heavy | Special |
|---|---|---|---|
sword | quick_strike | triple_combo | cyclone_slash, rising_crescent |
spear | quick_jab | lunging_pierce | whirlwind_twirl, dragon_dive |
axe | quick_chop | overhead_cleave | berserker_rush, critical_cleave |
hammer | quick_bash | ground_pound | hammer_hurricane, thunder_slam |
greatsword | heavy_cut | titan_cleave | dragon_upper |
staff | staff_swing | arcane_channel | ground_invocation |
dagger | twin_stab | blade_flurry | viper_pounce |
bow | quick_shot | charged_shot | kneeling_shot |
Light moves are 1-second clips; the others are 2 seconds. charged_shot and kneeling_shot end after the shot instead of back on guard — play them once rather than looping. GET /api/v1/animations lists every move with a description and a looping preview.
Bigger cells, same character size. Attacks need room for thrusts, spins and leaps, so each move's frame is twice frameSize (256 → 512×512) while the character keeps the pixel size it has in your idle and walk sheets, standing bottom-centre. Draw move frames at half scale (or anchor them bottom-centre) so the character lines up with your other animations.
Example
curl -X POST https://www.autosprite.io/api/v1/characters/char_abc123/attacks \
-H "x-api-key: vspk_your_key_here" \
-H "Content-Type: application/json" \
-d '{ "weapon": "greatsword", "moves": ["heavy_cut", "titan_cleave"] }'
Response
Status: 202 Accepted
{
"characterId": "char_abc123",
"weapon": "greatsword",
"workflows": [
{ "jobId": "wf_001", "move": "heavy_cut", "animationId": "asm_greatsword_heavy_cut", "name": "Greatsword Heavy Cut", "videoId": "vid_001" },
{ "jobId": "wf_002", "move": "titan_cleave", "animationId": "asm_greatsword_titan_cleave", "name": "Greatsword Titan Cleave", "videoId": "vid_002" }
],
"creditsUsed": 10
}
Poll each GET /api/v1/jobs/:jobId — a move typically takes 1–3 minutes. If some moves fail to start you also get a failed array ({ "move", "error" }) and are only charged for the moves that started. animationId is the move's id: use it with Redo Animation, and look for it as the sheet's custom action in List Spritesheets.
Errors
| Status | Code | When |
|---|---|---|
| 400 | INVALID_REQUEST | Missing or unknown weapon, a move that doesn't belong to the weapon, more than four moves, or the character wasn't found |
| 402 | INSUFFICIENT_CREDITS | Not enough credits for any move |
| 403 | PLAN_REQUIRED | Paid subscription required |
Animation Catalog
GET /api/v1/animations
Every preset kind and attack move you can request, so your tool can offer them without hardcoding the lists.
{
"presets": [
{ "kind": "death", "name": "Death", "category": "combat", "action": "character clutches its chest with both hands in exaggerated pain, drops to its knees, then falls over and lies still, do not add any props" },
{ "kind": "victory", "name": "Victory", "category": "emotes", "action": "character does a victory dance" }
],
"attacks": {
"creditsPerMove": 5,
"weapons": [
{
"weapon": "sword",
"moves": [
{
"move": "quick_strike",
"animationId": "asm_sword_quick_strike",
"name": "Sword Quick Strike",
"tier": "Light",
"seconds": 1,
"endsOnGuard": true,
"description": "A low, athletic stance into one committed diagonal cut",
"previewUrl": "https://www.autosprite.io/attack-moves/sword/quick-strike-anim.webp"
}
]
}
]
}
}
previewUrl is a looping animated WebP with a transparent background — the AutoSprite mascot performing the move.
Isometric Packs
POST /api/v1/characters/:characterId/packs
The way to animate an isometric / top-down / RPG character. One render produces all eight directions — up, northeast, right, southeast, down, southwest, left, northwest — as eight spritesheets plus one zip. Call it once per action (walk, then run, …).
Cost: 15 credits per pack, all eight directions included. A failed pack is refunded automatically.
Request Body
| Field | Type | Default | Description |
|---|---|---|---|
action | string | — | Required. "idle", "walk", "run", "jump", "attack", "custom", or a preset such as "death" or "victory" (no name or prompt needed). Idle, walk and run loop |
weapon | string | "none" | Attack only. "none" keeps the character's own weapon (or hands), or pick "sword", "axe", "staff", "bow", "greatsword", "dagger", "hammer", "spear" |
weaponPrompt | string | — | Attack only. Describe a custom weapon instead of a preset (max 400 chars) |
name | string | — | Custom only, required. Display name, max 37 chars (e.g. "Cast Spell") |
prompt | string | — | Custom: required — what the character does. Attack: optional description of the strike |
loop | boolean | false | Custom and presets only. Make the action loop |
frameCount | number | 25 | Frames per direction. 0 = every frame (56, or 39 for jump); higher values are capped there |
frameSize | number | 256 | Square frame size in pixels (32–1024), or 0 for native resolution |
idempotencyKey | string | — | Optional (8–100 chars). Retrying with the same key returns the same job and charges only once |
Example
curl -X POST https://www.autosprite.io/api/v1/characters/char_abc123/packs \
-H "x-api-key: vspk_your_key_here" \
-H "Content-Type: application/json" \
-d '{ "action": "walk" }'
Other actions use the same call — { "action": "attack", "weapon": "sword" }, { "action": "death" } or { "action": "custom", "name": "Cast Spell", "prompt": "raises a staff and casts a fireball" }.
Response
Status: 202 Accepted
{
"jobId": "rose_3f9a1c…",
"characterId": "char_abc123",
"action": "walk",
"animationId": "iso_walk",
"directions": ["northwest", "up", "northeast", "left", "right", "southwest", "down", "southeast"],
"creditCost": 15
}
Poll GET /api/v1/jobs/:jobId — a pack typically takes 2–5 minutes. When it succeeds the job lists eight spritesheetIds (one per direction) and a zipUrl with every direction. In List Spritesheets each sheet's kind names its direction (iso_walk_up, iso_walk_left, iso_attack_southeast, …); custom packs have kind custom and a name like "Cast Spell Northwest".
Errors
| Status | Code | When |
|---|---|---|
| 400 | INVALID_REQUEST | Missing or invalid field, a field that doesn't apply to the action (e.g. weapon on a walk pack), an idempotencyKey reused with different settings, or the character has no reference image |
| 402 | INSUFFICIENT_CREDITS | Fewer than 15 credits |
| 403 | PLAN_REQUIRED | Paid subscription required |
Only need one or two facings? Request individual directions (e.g. iso_idle_down) on the Generate Animations endpoint instead — billed per direction. From three directions up, a pack costs the same or less — and it keeps the character consistent across every view.
List Spritesheets
GET /api/v1/characters/:characterId/spritesheets
List all spritesheets for a character.
Example
curl https://www.autosprite.io/api/v1/characters/char_abc123/spritesheets \
-H "x-api-key: vspk_your_key_here"
Response
{
"spritesheets": [
{
"id": "ss_001",
"kind": "idle",
"name": "Idle",
"status": "succeeded",
"frameWidth": 128,
"frameHeight": 128,
"frameCount": 25,
"columns": 5,
"createdAt": "2025-01-15T10:32:00Z"
}
]
}
Get Spritesheet
GET /api/v1/spritesheets/:spritesheetId
Get full details for a spritesheet, including presigned download URLs for the sheet image, atlas JSON, and audio file (if generated with sound).
Example
curl https://www.autosprite.io/api/v1/spritesheets/ss_001 \
-H "x-api-key: vspk_your_key_here"
Response
{
"id": "ss_001",
"kind": "idle",
"name": "Idle",
"characterId": "char_abc123",
"sourceVideoId": "vid_001",
"status": "succeeded",
"frameWidth": 128,
"frameHeight": 128,
"frameCount": 25,
"columns": 5,
"sheetUrl": "https://... (presigned download URL)",
"atlasUrl": "https://... (JSON atlas download URL)",
"audioUrl": null,
"loopStart": null,
"loopEnd": null,
"speedMultiplier": 1.0,
"createdAt": "2025-01-15T10:32:00Z"
}
Download URLs
| Field | Description |
|---|---|
sheetUrl | The spritesheet PNG image — all frames in a grid |
atlasUrl | JSON atlas with frame positions, dimensions, and animation metadata |
audioUrl | MP3 audio file (only if generated with withSound: true) |
The atlas JSON file follows standard spritesheet atlas conventions. Import it directly into Unity, Godot, Phaser, or any engine that supports JSON sprite atlases.
Regenerate All Spritesheets
POST /api/v1/characters/:characterId/regenerate-spritesheets
Re-extract spritesheets from existing animation videos with different settings. This reuses the original videos so it's free — no credits required.
Request Body
| Field | Type | Default | Description |
|---|---|---|---|
frameCount | number | 25 | Frames to extract (4–64) |
frameSize | number | 128 | Frame dimensions in pixels (32–512) |
removeBg | string | "default" | Background removal: "default" or "ultra" |
sharpen | string | "none" | Sharpening: "none", "light", "sharp", "ultra_sharp" |
compression | string | "compressed" | PNG output. "compressed" palette-quantizes the sheet (~70% smaller files, visually indistinguishable for most sprite art). "none" keeps full RGBA. |
Example
curl -X POST https://www.autosprite.io/api/v1/characters/char_abc123/regenerate-spritesheets \
-H "x-api-key: vspk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"frameCount": 16,
"frameSize": 64,
"removeBg": "ultra",
"sharpen": "light",
"compression": "compressed"
}'
Response
Status: 202 Accepted
{
"jobId": "job_regen_001"
}
Regenerate Single Spritesheet
POST /api/v1/spritesheets/:spritesheetId/regenerate
Regenerate a single spritesheet from its source video with different settings. Free — no credits required.
Request Body
Same as Regenerate All Spritesheets.
Example
curl -X POST https://www.autosprite.io/api/v1/spritesheets/ss_001/regenerate \
-H "x-api-key: vspk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"frameCount": 8,
"frameSize": 32,
"sharpen": "sharp",
"compression": "compressed"
}'
Response
Status: 202 Accepted
{
"jobId": "job_regen_002"
}
Errors
| Status | Code | When |
|---|---|---|
| 400 | Various | Spritesheet has no source video to regenerate from |
| 404 | NOT_FOUND | Spritesheet not found or doesn't belong to you |
Redo Animation
POST /api/v1/characters/:characterId/redo
Re-generate an existing animation from scratch. This creates a brand new video and spritesheet for an animation you've already generated — useful when the result wasn't what you wanted.
Your plan includes free redos each month. Once those are used, additional redos are billed at the videoTier price (turbo 5, pro 10, ultra 10/sec, max 35; +sound for pro).
Request Body
| Field | Type | Default | Description |
|---|---|---|---|
animationId | string | — | Required. The animation to redo (e.g. "idle", "walk", or a custom animation ID) |
useFreeRedo | boolean | true | Use a free redo from your plan allowance. Set to false to pay with credits instead |
withSound | boolean | false | Add sound effects (+5 credits on paid redo; free on ultra/max) |
videoTier | string | "turbo" | Video model + paid-redo price (turbo 5, pro 10, ultra 10/sec, max 35) |
turboMode | string | "reference" | Turbo only: "reference" or "first_frame" (same meaning as on Generate) |
durationSec | number | per tier | Clip length, clamped to the tier's allowed values |
Example
curl -X POST https://www.autosprite.io/api/v1/characters/char_abc123/redo \
-H "x-api-key: vspk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"animationId": "idle"
}'
Response
Status: 202 Accepted
{
"jobId": "wf_abc123"
}
Poll GET /api/v1/jobs/:jobId for completion, same as any other generation job.
Errors
| Status | Code | When |
|---|---|---|
| 400 | MISSING_ANIMATION_ID | No animationId provided |
| 402 | INSUFFICIENT_CREDITS | No free redos remaining and not enough credits |
| 403 | PLAN_REQUIRED | Paid subscription required |
| 404 | NOT_FOUND | Character not found |
| 404 | ANIMATION_NOT_FOUND | Animation hasn't been generated yet — generate it first |
Redo vs Regenerate: Redo creates a completely new AI-generated video and spritesheet. Regenerate re-extracts frames from the existing video with different settings (frame count, size, background removal) for free.
