remagicaDocs home
API referenceSprites

Fix drifted frames

POST
/sprites/characters/{characterId}/drift/fix

Needs a key withsprites:write

Redraws the character's frames scoring below the line (unlocked ones, worst first, at most 32) to match the master: up to triesPerFrame image edits each, cleaned up and scored again, one that clears the line replacing the frame (its old file kept for revert). One credit hold of at most creditCap covers the run, and it stops before a call would spend past the cap. Follow it on the studio's live feed (topic drift) or with GET /sprites/drift/{runId}.

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

Request Body

application/json
  1. body
outfitId?string

That outfit's takes; the base outfit's otherwise.

Length1 <= length <= 128
takeId?string

That take alone, its frames scored again first, whatever its outfit or whether it stands.

Length1 <= length <= 128
threshold?number

Frames scoring below it are flagged, from 0.5 to 0.99. Default 0.9.

Range0.5 <= value <= 0.99
creditCap*integer

The most the run may spend, in credits.

Range1 <= value <= 100000
idempotencyKey?string

Sending the same key again returns the same run.

Length1 <= length <= 255
triesPerFrame*integer

Redraws per frame before it's left for a touch-up.

Range1 <= value <= 3

Response Body

Accepted: the run is queued.

application/json
  1. response
credits*integer

What the run set aside: every try at its worst, at most the cap.

frames*integer

Frames queued, worst first.

model*string
priceVersion*integer|null
runId*string

The run. Follow it on the studio's live feed (topic drift) or with GET /sprites/drift/{runId}.

Example Request
curl -X POST 'https://api.remagica.com/api/v1/sprites/characters/8a1d5e3f-2b4c-4d6e-9f07-1a2b3c4d5e6f/drift/fix' \  -H 'Content-Type: application/json' \  -d '{  "creditCap": 20,  "triesPerFrame": 2}'
Example Response
{  "credits": 12,  "frames": 1,  "model": "google/nano-banana-pro",  "priceVersion": 3,  "runId": "599e5591-5b3d-4f60-8e2a-1d9c6b4f7e05"}