remagicaDocs home
API referenceSprites

Draw the missing takes

POST
/sprites/characters/{characterId}/takes/missing

Needs a key withsprites:write

Makes every take the character lacks: each action (as a clip, or as source says) in each direction its game's camera draws (left-facing ones are mirrored at export), in the outfit asked for, with no take there that hasn't failed. At most 64 at a time; they run as the plan's renders at a time allow, under one credit hold. It starts as many as the balance covers, in action order, and says how many it skipped; 402 only when not even one can start. Nothing to draw: requestId is null. Follow it with GET /sprites/events (sprites.watch), then read the rows.

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

An image model for sheet takes (google/nano-banana-pro, openai/gpt-image-2, google/nano-banana-2.1) or a video model for clip takes (kling/v4, bytedance/seedance-2.5, xai/grok-imagine-video-1.5), or its capability model id (sprite_take/…, sprite_clip_take/…). Takes of the other kind, and all when left out, use the game's (else Nano Banana Pro and the plan's video model).

Length1 <= length <= 200
outfitId?|

Left out or null: the base outfit.

source?string

Make every missing take this way; left out: clips, unless model is an image model.

Value in"sheet""clip"

Response Body

Accepted: the takes are held and queued.

application/json
  1. response

The missing takes the balance covers, held and started, and how many it didn't.

credits*integer

What the request sets aside, in credits: its worst case.

model*string

The capability model it runs.

priceVersion*|

The price revision it's priced at.

requestId*|

The request's hold; null when there was nothing to draw.

takes*array<>
refusal*|

Why takes were left out, as the ledger said it; null when none were.

skipped*integer

Takes left out because the balance didn't cover them.

skippedAnimations*integer

Animations with at least one take left out.

Example Request
curl -X POST 'https://api.remagica.com/api/v1/sprites/characters/8a1d5e3f-2b4c-4d6e-9f07-1a2b3c4d5e6f/takes/missing' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "credits": 12,  "model": "google/nano-banana-pro",  "priceVersion": 3,  "requestId": "2163759e-5b3d-4f60-8e2a-1d9c6b4f7e05",  "takes": [    {      "actionId": "c4f7ff02-5b3d-4f60-8e2a-1d9c6b4f7e05",      "direction": "E",      "id": "a5614527-5b3d-4f60-8e2a-1d9c6b4f7e05",      "model": "google/nano-banana-pro",      "outfitId": "f54469b9-5b3d-4f60-8e2a-1d9c6b4f7e05",      "source": "sheet"    }  ],  "refusal": "string",  "skipped": 1,  "skippedAnimations": 1}