remagicaDocs home
API referenceSprites

Create an action

POST
/sprites/characters/{characterId}/actions

Needs a key withsprites:write

Adds an action to a character, after its others. Its key is made from the name unless you send one; a key the character already uses is refused.

Requires scope sprites:write.

Authorization

apiKey
headerx-api-key<token>

An API key of your workspace (rmg_…), created in the web app. It acts for that workspace, not for a person, and keeps working when its creator leaves.

Path Parameters

characterId*string
Length1 <= length <= 128

Header Parameters

Idempotency-Key?string

Makes the request safe to retry: send a unique value (a UUID, say). The same request sent again with the same key within 24 hours gets the first one's response back, and nothing runs or is charged twice. Reusing a key for a different request, or while the first is still running, is 409 CONFLICT. A request that fails frees its key.

Length1 <= length <= 255

Request Body

application/json
  1. body
beats?array<>

The beats of the motion, one per frame.

Itemsitems <= 64
cancelWindow?|null
clipSeconds?|

Length of a clip take, in seconds (source clip).

fps?integer
Range1 <= value <= 60
frames?integer
Range1 <= value <= 64
loopIn?|null
loopOut?|null
playback?string
Value in"loop""once""pingpong"
prompt?string
Lengthlength <= 4000
sort?integer
Range0 <= value <= 10000
source?string

sheet: one generated sheet, sliced. clip: frames taken from a video.

Value in"sheet""clip"
storyboard?

The action's pinned poses, by frame.

key?string

Lowercase letters and digits, joined by - or _. Left out: made from the name.

Match^[a-z0-9]+(?:[-_][a-z0-9]+)*$
Length1 <= length <= 40
name*string
Length1 <= length <= 120

Response Body

The action.

application/json
  1. response

An action a character performs, with its timing.

beats*array<>

The beats of the motion, one per frame.

Itemsitems <= 64
cancelWindow*|null
clipSeconds*|

Length of a clip take, in seconds (source clip).

fps*integer
Range1 <= value <= 60
frames*integer
Range1 <= value <= 64
loopIn*|null
loopOut*|null
playback*string
Value in"loop""once""pingpong"
prompt*string
Lengthlength <= 4000
sort*integer
Range0 <= value <= 10000
source*string

sheet: one generated sheet, sliced. clip: frames taken from a video.

Value in"sheet""clip"
storyboard*

The action's pinned poses, by frame.

characterId*string
Length1 <= length <= 128
createdAt*string
Formatdate-time
id*string
Length1 <= length <= 128
key*string

Unique per character; what exports name it.

name*string
Length1 <= length <= 120
updatedAt*string
Formatdate-time
Example Request
curl -X POST 'https://api.remagica.com/api/v1/sprites/characters/8a1d5e3f-2b4c-4d6e-9f07-1a2b3c4d5e6f/actions' \  -H 'Content-Type: application/json' \  -d '{  "name": "Attack"}'
Example Response
{  "beats": [    "string"  ],  "cancelWindow": {    "from": 1,    "to": 1  },  "clipSeconds": 5,  "fps": 1,  "frames": 1,  "loopIn": 1,  "loopOut": 1,  "playback": "loop",  "prompt": "A lighthouse on a cliff at dusk, cinematic",  "sort": 1,  "source": "sheet",  "storyboard": {    "beat": {      "frame": 1,      "sketchKey": "generations/e661f4c9-5b3d-4f60-8e2a-1d9c6b4f7e05/0.png"    },    "end": {      "frame": 1,      "sketchKey": "generations/e661f4c9-5b3d-4f60-8e2a-1d9c6b4f7e05/0.png"    },    "impact": {      "frame": 1,      "sketchKey": "generations/e661f4c9-5b3d-4f60-8e2a-1d9c6b4f7e05/0.png"    },    "open": {      "frame": 1,      "sketchKey": "generations/e661f4c9-5b3d-4f60-8e2a-1d9c6b4f7e05/0.png"    }  },  "characterId": "eb1fe45b-5b3d-4f60-8e2a-1d9c6b4f7e05",  "createdAt": "2026-10-21T12:00:00.000Z",  "id": "a5614527-5b3d-4f60-8e2a-1d9c6b4f7e05",  "key": "attack",  "name": "Autumn campaign",  "updatedAt": "2026-10-21T12:00:00.000Z"}