remagicaDocs home
API referenceSprites

Export sprites

POST
/sprites/exports

Needs a key withsprites:write

Exports the characters' animations (each direction's standing take, per outfit: the approved one, else the newest finished one) for an engine: sheets or one atlas per character at a whole-number scale, the engine's own files, metadata.json, gameplay data and Sprite DNA, zipped. Charges nothing. Follow it on the studio's live feed (topic export) or with GET /sprites/exports/{exportId}, which has the download link once it's ready.

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.

Request Body

application/json
  1. body
characterIds*array<>

The game's characters to export, one folder each.

Items1 <= items <= 50
engine*string

The target: godot (SpriteFrames), unity (sliced sheets and clips), unreal (Paper2D atlas), gamemaker (sprites), phaser (JSON hash atlas and anims), rpgmaker (MZ character sheets), aseprite (sheet data with tags) or zip (every frame as a PNG).

Value in"godot""unity""unreal""gamemaker""phaser""rpgmaker""aseprite""zip"
gameId*string
Length1 <= length <= 128
layout?string

sheets: a sheet per animation, a row per direction. atlas: one packed atlas per character, power-of-two sized.

Default"sheets"
Value in"sheets""atlas"
options?

What the bundle includes and how cells are cut.

scale?integer

Whole-number upscale: nearest neighbour for pixel styles, smooth for the rest.

Range1 <= value <= 8
Default1
idempotencyKey?string

Sending the same key again returns the same export.

Length1 <= length <= 255

Response Body

Accepted: the export is queued.

application/json
  1. response
exportId*string

The export: follow it on the studio's live feed (topic export) or with GET /sprites/exports/{exportId}.

status*string
Value in"queued""running""ready""failed"
Example Request
curl -X POST 'https://api.remagica.com/api/v1/sprites/exports' \  -H 'Content-Type: application/json' \  -d '{  "characterIds": [    "8a1d5e3f-2b4c-4d6e-9f07-1a2b3c4d5e6f"  ],  "engine": "godot",  "gameId": "5c2a9e1d-7b3f-4a6e-8d0c-2f1e3a4b5c6d"}'
Example Response
{  "exportId": "4e8c2a1f6b3d5e7a9c0b1d2e3f4a5b6c",  "status": "queued"}