---
title: "Animate a sprite"
method: POST
path: "/api/animations"
tags: ["Animations"]
---

# Animate a sprite

`POST /api/animations`

## Request

- Base URL: `https://www.sprite-ai.art`
- URL: `https://www.sprite-ai.art/api/animations`
- Auth: HTTP bearer

Start an animation job (walk, run, idle, attack and more) from a still sprite you own. Asynchronous: returns an id, then poll GET /api/animations/{id}. The token cost scales with frame_count.

## Request body

- object
  - `source_generation_id` string, uuid, required
  - `preset` 'Idle' | 'Walk' | 'Jump' | 'Run' | 'Attack' | 'Hurt' | 'Death' | 'Custom', required
  - `frame_count` integer
  - `custom_prompt` string
  - `palette_extras` integer
  - `framing_margin` integer
  - `framing_anchor` 'top-left' | 'top' | 'top-right' | 'left' | 'center' | 'right' | 'bottom-left' | 'bottom' | 'bottom-right'
  - `public` boolean

## Response `202`

The job was accepted.

- JobAccepted
  - `id` string, uuid, required
  - `status` 'processing', required

## Other responses

- `400`: The request failed validation.
- `401`: Missing or invalid API key.
- `402`: Not enough tokens.
- `403`: The API key is revoked or expired.
- `404`: Not found, or not yours.
- `429`: Rate limited. Retry after the Retry-After header.
- `500`: Generation failed. Tokens are refunded.

---

[API](https://skmtc.dev/sprite-ai/apis/sprite-ai-api.md) · [All operations](https://skmtc.dev/sprite-ai/apis/sprite-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sprite-ai/apis/sprite-ai-api/revisions/2c1231b72433?raw)
