remagicaDocs home
API referenceSprites

Preview an export

POST
/sprites/exports/preview

Needs a key withsprites:read

A dry run of an export: the files it would hold and each sheet's size, from the standing takes (approved, else the newest finished), without drawing anything. With trim on, sizes are before trimming.

Requires scope sprites:read.

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

Response Body

What the export would hold.

application/json
  1. response
animations*array<>
engine*string
Value in"godot""unity""unreal""gamemaker""phaser""rpgmaker""aseprite""zip"
files*array<>
layout*string
Value in"sheets""atlas"
missing*array<>

Actions and drawn directions with no finished take (base outfit): left out of the bundle.

scale*integer
sheets*array<>
trimmed*boolean

Whether trim is on: the sizes shown are before trimming, which only the export measures.

Example Request
curl -X POST 'https://api.remagica.com/api/v1/sprites/exports/preview' \  -H 'Content-Type: application/json' \  -d '{  "characterIds": [    "8a1d5e3f-2b4c-4d6e-9f07-1a2b3c4d5e6f"  ],  "engine": "godot",  "gameId": "5c2a9e1d-7b3f-4a6e-8d0c-2f1e3a4b5c6d"}'
Example Response
{  "animations": [    {      "action": "string",      "character": "string",      "characterId": "eb1fe45b-5b3d-4f60-8e2a-1d9c6b4f7e05",      "direction": "E",      "fps": 1,      "frames": 1,      "id": "walk_E",      "mirroredFrom": "E",      "playback": "string"    }  ],  "engine": "godot",  "files": [    {      "bytes": 2457600,      "kind": "image",      "path": "ember_knight/ember_knight_walk.png"    }  ],  "layout": "sheets",  "missing": [    {      "action": "string",      "character": "string",      "characterId": "eb1fe45b-5b3d-4f60-8e2a-1d9c6b4f7e05",      "direction": "E"    }  ],  "scale": 1,  "sheets": [    {      "frames": 1,      "height": 1280,      "path": "string",      "width": 1024    }  ],  "trimmed": true}