remagicaDocs home
API referenceSprites

Pack exports into one ZIP

POST
/sprites/exports/pack

Needs a key withsprites:write

Puts ready exports in one ZIP: a folder's characters, each exported from a game of its own, as one bundle with a folder per character. Files the exports share as they are are kept once; an export whose files would clash goes in a folder of its own. Asking again for the same exports reuses the ZIP. Charges nothing.

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
exportIds*array<>

Ready exports to put in one ZIP, each a game's characters (a folder's characters are each in a game of their own).

Items1 <= items <= 50
name?string

What the download is called. Default: sprites.

Length1 <= length <= 80

Response Body

The ZIP's link.

application/json
  1. response
bytes*integer

The ZIP's size.

downloadUrl*string

A signed link to the ZIP, valid for an hour.

files*integer

Files in the ZIP.

Example Request
curl -X POST 'https://api.remagica.com/api/v1/sprites/exports/pack' \  -H 'Content-Type: application/json' \  -d '{  "exportIds": [    "4e8c2a1f6b3d5e7a9c0b1d2e3f4a5b6c"  ]}'
Example Response
{  "bytes": 2457600,  "downloadUrl": "https://files.remagica.com/generations/e661f4c9-5b3d-4f60-8e2a-1d9c6b4f7e05/0.png",  "files": 1}