remagicaDocs home
API referenceSprites

Create a game

POST
/sprites/games

Needs a key withsprites:write

Starts a game's style bible. What you leave out comes from the defaults: the pixel style and its recipe, a side-scroller camera, a 32 px canvas, the standard size classes, rules and cleanup. Its slug is made from the name, unique in the workspace.

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.

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
camera?string

Which directions each action is drawn in: side (side-scroller), four or eight (top-down) or iso (isometric).

Value in"side""four""eight""iso"
canvas?

Left out, or in part: the defaults fill the rest.

name*string
Length1 <= length <= 120
recipe?array<>

Left out: the style's own traits.

Itemsitems <= 24
style?string

Default pixel.

Response Body

The game.

application/json
  1. response

A game: its style bible and defaults.

camera*string

Which directions each action is drawn in: side (side-scroller), four or eight (top-down) or iso (isometric).

Value in"side""four""eight""iso"
canvas*

How the game's sprites are drawn. Pixel styles use sizePx, the rest resolutionPx.

cleanup*

The cleanup steps a take goes through.

createdAt*string
Formatdate-time
id*string
Length1 <= length <= 128
imageModel*|

The image model takes use; null: the app's default.

name*string
Length1 <= length <= 120
recipe*array<>

The style's traits, in order: what prompts say about the look. Never names a game or studio.

Itemsitems <= 24
rules*

The checks every frame of the game is held to.

seed*|

A fixed seed for every take; null: a new one each time.

sizeClasses*

How tall each size class stands, in px on a 32 px canvas.

slug*string

Unique in the workspace; made from the name.

style*string

A base style (pixel, painted, cel, 3d, vector) or a look id.

updatedAt*string
Formatdate-time
videoModel*|

The video model clip takes use; null: the app's default.

Example Request
curl -X POST 'https://api.remagica.com/api/v1/sprites/games' \  -H 'Content-Type: application/json' \  -d '{  "name": "Moonfall"}'
Example Response
{  "camera": "side",  "canvas": {    "light": "tl",    "line": "none",    "outline": "none",    "resolutionPx": 256,    "shading": "flat",    "sizePx": 16  },  "cleanup": {    "align": true,    "bg": true,    "color": true,    "quant": true,    "snap": true,    "upscale": true  },  "createdAt": "2026-10-21T12:00:00.000Z",  "id": "a5614527-5b3d-4f60-8e2a-1d9c6b4f7e05",  "imageModel": "string",  "name": "Autumn campaign",  "recipe": [    "string"  ],  "rules": {    "maxColours": 1,    "oneOutline": true,    "outlineHex": "#140f17"  },  "seed": 1,  "sizeClasses": {    "large": 1,    "medium": 1,    "small": 1  },  "slug": "moonfall",  "style": "pixel",  "updatedAt": "2026-10-21T12:00:00.000Z",  "videoModel": "string"}