Loopfig

Generation API for your app's backend. Three kinds of job, all asynchronous and all stateless: every request carries its own prompt and its own pictures, we run it and return the result. We keep no templates and no catalog; those live in your backend (Appendix A has the prompts we recommend you store).

Job You send You get
Avatar a user's photo + a prompt one full-body image (PNG)
Outfit the user's avatar + 1–5 pictures of clothes + a prompt naming them one image of the avatar wearing all of them (PNG)
Emote the user's avatar + a prompt describing the action a short looping clip (MP4, 4–5 s)

Base URL: https://api.loopfig.com/v1. JSON in and out (Content-Type: application/json; charset=utf-8), except uploads (multipart). All times are RFC 3339 UTC. This page is the contract; the same contract as a machine-readable schema is at openapi.yaml, and an interactive reference (Swagger) at docs.

Status: v1, 25 Nov 2026, live. Avatars, outfits and emotes run end to end on this API (measured timings in section 14). The shapes below won't change inside v1. Your keys come from your account: api.loopfig.com/account.

1. Quick start

Everything is one HTTPS API with a bearer key. You send pictures either as URLs we can fetch or as uploads; you get a job back, and the job's output.url when it's done.

API=https://api.loopfig.com/v1
KEY=mk_live_...          # your API key, made in your account; every call: Authorization: Bearer $KEY

1. Avatar: the user's photo + the recommended prompt (Appendix A.1, the street vinyl-toy look, with its three slots filled by your look builder; <image1> is the photo). ratio is the frame of the look, 2:3 for this one.

curl -s -X POST $API/avatars \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -H "Idempotency-Key: avatar-u12345-1" \
  -d @- <<'JSON'
{
  "prompt": "A full-body 3D render of the person from <image1> as a collectible designer vinyl art toy figure, standing straight and facing the camera, arms relaxed at the sides, feet apart, centered, head to toe with a small margin above the head and below the shoes. Camera straight on at chest height. The head is very big, an oversized bobblehead head nearly as wide as the shoulders, with the person's own hairstyle from <image1>, the hair reaching as far down as it does in the photo; the body below is short and chunky, about two and a half times the head's height, with a short torso and stubby legs, so the whole figure is three and a half heads tall, a designer art toy's proportions. The face is a lifelike likeness of the person in <image1> with a smooth glossy resin sheen: keep the same face shape, age, skin tone, eye shape, nose, lips, eyebrows, jawline, facial hair, hairstyle and hair color as in <image1>, clearly the same person. Everything below the face is high-gloss lacquered vinyl: the clothes, shoes, hands and accessories are shiny smooth PVC toy plastic with bright specular highlights and white light-strip reflections, like an expensive designer art toy. New-generation hip-hop streetwear, baggy and oversized: an oversized black and electric-blue puffer jacket over a white oversized t-shirt, baggy charcoal parachute cargo pants. Shoes: chunky white and electric-blue high-top sneakers. Bold playful accessories, big enough to see from far away, each worn in its place on the body: chrome headphones around the neck, a chunky silver chain, a transparent blue capsule crossbody bag with a rocket charm, and mirrored wraparound sunglasses worn on the face. Background: a saturated azure-blue sky, lighter near the ground, with big fluffy white clouds, and a glossy mirror floor reflecting the shoes. Nothing else in the scene. Lighting: a big frontal softbox and a rim light that make every glossy surface shine, rich saturated colors, sharp focus. No text, no logo, no watermark.",
  "photo": {"url": "https://cdn.example.com/uploads/u12345/selfie.jpg?X-Amz-Signature=..."},
  "ratio": "2:3",
  "seed": 1911200517,
  "user_ref": "u12345",
  "callback_url": "https://backend.example.com/hooks/loopfig",
  "metadata": {"order": "o-778"}
}
JSON
# -> 202 {"id": "job_01JD8X3K9Q2M4N6P8R0T2V4W6Y", "kind": "avatar", "status": "queued", "queue_position": 1, ...}

2. Wait for it: poll or take the webhook. Poll GET /v1/jobs/{id} at most every 2 s; status goes queued → running → succeeded | failed. Or give callback_url as above and we POST the finished job to it, signed (section 11); then you don't poll at all.

curl -s $API/jobs/job_01JD8X3K9Q2M4N6P8R0T2V4W6Y -H "Authorization: Bearer $KEY"
# -> {"status": "succeeded", "output": {"type": "image", "content_type": "image/png", "width": 832, "height": 1248,
#     "url": "https://api.loopfig.com/v1/files/fil_01JD...?exp=1796204400&sig=9f2c...", "url_expires_at": "...", ...}, ...}

3. Download the result. output.url is a plain GET, no key, valid at least 7 days from the moment the job object was issued (url_expires_at says exactly when); the file itself stays 30 days. Store the avatar on your side (or have us PUT it straight to your bucket with deliver_to, section 5).

curl -s -o u12345-avatar.png "https://api.loopfig.com/v1/files/fil_01JD...?exp=1796204400&sig=9f2c..."

4. Outfit: the avatar + the clothes + a prompt naming them. <image1> is the avatar (here the avatar job's id, the usual way), <image2>, <image3>… are your images, in order. The wording is Appendix A.2 with your catalog's words for each item (a hoodie with jeans replaces all the clothes, so the "keep the rest of their clothes" sentence is left out here).

curl -s -X POST $API/outfits \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -H "Idempotency-Key: outfit-u12345-cart-4411" \
  -d @- <<'JSON'
{
  "prompt": "A full-body picture, from head to toe with the shoes in view, of the character from <image1> wearing the black cotton pullover hoodie from <image2> and the mid-blue straight-leg denim jeans from <image3>. Keep the character exactly as in <image1>: the same face, hair, skin tone, body shape, proportions and the same art style. Keep the background, floor and lighting of <image1>. In the same standing pose as in <image1>, facing the camera. Keep every clothing item exactly as in its photo: the same color, fabric, cut and details, rendered in the same style as <image1>. Render every item in the same glossy lacquered vinyl toy finish as the rest of the figure, shiny smooth PVC with bright specular highlights, while keeping the item's own color, shape, cut and details.",
  "avatar": {"job_id": "job_01JD8X3K9Q2M4N6P8R0T2V4W6Y"},
  "images": [
    {"url": "https://cdn.example.com/catalog/hoodie-black.jpg"},
    {"url": "https://cdn.example.com/catalog/jeans-blue.jpg"}
  ],
  "seed": 2001,
  "user_ref": "u12345",
  "callback_url": "https://backend.example.com/hooks/loopfig"
}
JSON
# -> 202 {"id": "job_01JD9...", "kind": "outfit", "status": "queued", ...}; the result replaces the avatar as the user's current look

5. Emote: the avatar + the action. The prompt is only the motion (Appendix A.3 has five tested ones); we add the fixed part that keeps the avatar exactly as it is, the framing and the loop.

curl -s -X POST $API/emotes \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -H "Idempotency-Key: emote-u12345-wave-1" \
  -d @- <<'JSON'
{
  "prompt": "The character lifts the right hand to shoulder height, palm open toward the camera, and waves it from side to side three times with a warm, friendly smile and a small tilt of the head, then lowers the arm back to the side.",
  "avatar": {"job_id": "job_01JD9..."},
  "seconds": 4,
  "seed": 101,
  "user_ref": "u12345",
  "callback_url": "https://backend.example.com/hooks/loopfig"
}
JSON
# -> 202 {"id": "job_01JDA...", "kind": "emote", "status": "queued", "eta_seconds": 120, ...}
# when done: "output": {"type": "video", "content_type": "video/mp4", "duration_seconds": 4.46, "fps": 24, "width": 768, "height": 1152, "url": "...", ...}

Errors are always this shape, with the HTTP status saying what kind (section 15):

{"error": {"code": "prompt_missing_image_ref", "message": "The prompt must mention <image1> (the photo)",
           "param": "prompt", "request_id": "req_3f9a1c2b7d6e4a10"}}

Uploads instead of URLs: POST /v1/uploads (multipart file) gives an upl_… id to use as {"upload_id": "upl_…"} anywhere a picture goes (section 4). Typical times once the system is warm: an avatar in about 20 s, an outfit in about 15 s, an emote in about 90 s; a cold start adds about 40 s for images and about 8–10 min for the first emote after a quiet spell (section 14, eta_seconds).

2. Authentication

Every request carries Authorization: Bearer <api_key>. Keys look like mk_live_<40 chars> and belong to a client (your company's account).

Your account is at api.loopfig.com/account: sign up with an email and a password, and you get a client of your own. There you make keys (each with a label, shown once: we store only a hash) and revoke them, see your webhook secret (whsec_...) or make a new one, and see your balance, your lots of credits with their expiry, your usage per day and your purchases and refunds. Buying credit packs there opens soon. There's no password reset by email yet: if you lose your password, write to support from the address you signed up with.

Keys are only accepted over HTTPS. Never put them in a mobile app or a web page: this API is for your backend.

3. Conventions

4. Images you send

An image is referenced with an ImageRef object with exactly one of:

Field Meaning
url An https:// URL we fetch once, within 20 s, following at most 3 redirects. Presigned S3/GCS/R2 URLs work. Must be reachable from the public internet; private addresses are rejected. The URL is not stored after the fetch and never appears in a job object.
upload_id An upload made with POST /v1/uploads (below).
job_id One of your finished image jobs (avatar or outfit). Its output is the input. The usual way to send "the user's current avatar".

Accepted: JPEG, PNG, WebP, HEIC/HEIF, up to 20 MB, short side at least 256 px, long side at most 6000 px. EXIF rotation is applied. We downscale to at most 2048 px on the long side before generation. Anything else fails the job with error.code = invalid_image (or the request with 422 invalid_image when we can check it synchronously, i.e. uploads).

A photo for an avatar should show one person, face visible, on any background; head-and-shoulders or full body both work (section 7 says what we do with it). A picture of a clothing item should be a packshot: the item alone on a plain background, short side 512 px or more.

POST /v1/uploads

multipart/form-data with field file (the image) and optional user_ref. Up to 20 MB (the edge accepts 60 MB request bodies).

201 {"id": "upl_01JD...", "content_type": "image/jpeg", "width": 3024, "height": 4032, "bytes": 2811034,
     "expires_at": "2026-11-26T12:00:00Z"}

An upload is an input for a job and nothing else. One no job uses is deleted after 24 hours; one used by a job follows that job's retention (section 13).

5. Results you get

A finished job has an output object:

{
  "type": "image",                       // or "video"
  "content_type": "image/png",           // or "video/mp4"
  "url": "https://api.loopfig.com/v1/files/fil_01JD...?exp=1796204400&sig=9f2c...",
  "url_expires_at": "2026-12-02T12:00:00Z",
  "bytes": 1487223, "sha256": "4a1c...",
  "width": 832, "height": 1248,
  "duration_seconds": null, "fps": null, "has_audio": null,   // video only
  "seed": 3001,
  "expires_at": "2026-12-25T12:00:00Z",  // when we delete the file (retention)
  "expired": false,                      // true once it's gone (then url is null)
  "delivered_to": null                   // the PUT URL we uploaded to, if you gave one
}
"deliver_to": {"put_url": "https://s3.../avatars/u12345.png?X-Amz-...", "headers": {"x-amz-acl": "private"}}
Ratio 1.0 MP Use
2:3 832 × 1248 the recommended avatar look (Appendix A.1), and its outfits
3:4 896 × 1184 a shorter full-body frame
4:5 928 × 1152 half-body
1:1 1024 × 1024 square tiles
9:16 768 × 1376 stories
4:3, 16:9 1184 × 896, 1376 × 768 landscape

6. Jobs

The job object

{
  "id": "job_01JD8X3K9Q2M4N6P8R0T2V4W6Y",
  "kind": "avatar",                          // avatar | outfit | emote
  "status": "running",                       // queued | running | succeeded | failed | cancelled
  "created_at": "2026-11-25T10:00:00Z",
  "started_at": "2026-11-25T10:00:04Z",
  "finished_at": null,
  "queue_position": null,                    // 1-based while queued, else null
  "eta_seconds": 18,                         // our estimate, may be null
  "progress": {"stage": "generating", "step": 3, "steps": 8},
  "priority": "normal",
  "user_ref": "u12345",
  "input": {                                 // what you sent, minus URLs and bytes: prompt, pictures, knobs, seed
    "prompt": "A full-body stylised 3D render of the person from <image1> ...",
    "photo": {"kind": "url"},                //   {"kind": "upload", "upload_id": "upl_..."} | {"kind": "job", "job_id": "job_..."}
    "ratio": "2:3", "megapixels": 1.0, "portrait_step": true,
    "seed": 3001                             //   the seed used, yours or ours
  },
  "output": null,                            // section 5 when succeeded
  "error": null,                             // {"code", "message"} when failed
  "warnings": [],
  "usage": {"gpu_seconds": null, "queue_seconds": 4.1, "credits": 9},   // section 12: processing and queue time, the credits it cost
  "callback_url": "https://backend.example.com/hooks/loopfig",
  "metadata": {"order": "o-778"}
}

input is the request as we run it: for an outfit prompt, avatar, images (a list), ratio, megapixels, seed; for an emote prompt, avatar, seconds, audio, seed.

Status flow: queued → running → succeeded | failed, and queued | running → cancelled. succeeded, failed and cancelled are final. Stages while running: fetching, waiting_for_gpu, loading_model, generating, encoding, delivering.

GET /v1/jobs/{job_id}

The job object. 404 not_found for another client's job. Poll at most every 2 s; webhooks are better.

GET /v1/jobs

Your jobs, newest first. Filters: status, kind, user_ref, created_after, created_before. Paginated.

DELETE /v1/jobs/{job_id} (cancel)

Cancels a queued or running job: 200 with the job (status: cancelled). A cancelled job costs nothing: its credits come back (section 12). On a finished job: 409 already_finished.

DELETE /v1/jobs/{job_id}/files

Deletes the job's input copy and output now instead of at retention. The job record stays (without files). 204.

7. Avatars: POST /v1/avatars

{
  "prompt": "A full-body ... of the person from <image1> ...",   // required, any length, must mention <image1>
  "photo": {"url": "https://..."},           // ImageRef (required)
  "ratio": "2:3",                            // optional: 1:1 | 3:4 | 4:5 | 2:3 | 9:16 | 4:3 | 16:9 (default 2:3)
  "megapixels": 1.0,                         // optional: 0.5–2.0
  "portrait_step": true,                     // optional, default true (below)
  "seed": 3001,                              // optional; random when omitted
  "user_ref": "u12345", "priority": "normal",   // priority: normal | high (high runs first within your quota)
  "callback_url": "https://...", "deliver_to": {"put_url": "https://..."}, "metadata": {}
}

202 with the job object and Location: /v1/jobs/{id}. Your prompt is sent to the image model verbatim, with <image1> standing for the picture of the person. There is no prompt rewriting anywhere in this API: the same prompt, seed and photo give the same picture.

What <image1> is: the portrait step. An avatar is two pictures on our side. First we make a clean head-and-shoulders portrait from the photo (our fixed instruction: the person facing the camera, plain light grey background, their face, hair, skin tone and clothes kept; about 5 s). Then your prompt runs with that portrait as <image1>. Without this step a full-body photo makes the figure copy the photo's stance and natural proportions, and the look's big head is lost; with it every user stands the same way in the same frame. portrait_step: false skips it and gives your prompt the raw photo, for prompts that want the photo's own pose, clothes layout or background. The prompt must mention <image1> (422 prompt_missing_image_ref) and no other <imageN> (422 prompt_unknown_image_ref).

8. Outfits: POST /v1/outfits

{
  "prompt": "A full-body picture ... of the character from <image1> wearing the ... from <image2> and the ... from <image3>. ...",
  "avatar": {"job_id": "job_01JD..."},       // ImageRef: the user's current avatar (required) = <image1>
  "images": [{"url": "https://..."}, {"upload_id": "upl_..."}],   // 1–5 ImageRefs, the clothes = <image2>, <image3>, ... in this order
  "ratio": null,                             // optional; null (default) = the avatar picture's own frame
  "megapixels": 1.0, "seed": null,
  "user_ref": "u12345", "priority": "normal", "callback_url": "...", "deliver_to": {...}, "metadata": {}
}

Rules (checked synchronously, 422):

Three or more items: the reference sheet. With 3–5 pictures of clothes we may hand the model one picture instead of several: a reference sheet with each item in its own numbered cell (item 1, item 2, … in your images order) as <image2>. It gives the same result as separate pictures and takes the same time whatever the count (separate pictures cost about 4–5 s each). Your prompt is still sent as written, with one mechanical substitution and nothing else: every <imageK> with K ≥ 2 becomes item K−1 in <image2>, so "the hoodie from <image3>" reaches the model as "the hoodie from item 2 in <image2>". The job's input.images_as says which way it ran (references | sheet). Write the prompt as documented in either case.

So the quality of an outfit depends on two things you control: a clean packshot per item and accurate words for it in the prompt ("mid-blue straight-leg denim jeans", not "jeans").

9. Emotes: POST /v1/emotes

{
  "prompt": "The character lifts the right hand ... then lowers the arm back to the side.",   // the action, required
  "avatar": {"job_id": "job_01JD..."},       // ImageRef: the user's current avatar (required): first and last frame
  "seconds": 4,                              // optional: 4 or 5 (default 4)
  "audio": false,                            // optional: keep the model's generated soundscape
  "seed": null,
  "user_ref": "u12345", "priority": "normal", "callback_url": "...", "deliver_to": {...}, "metadata": {}
}

The avatar image is the clip's first frame and its last frame, so the clip plays on repeat without a jump. Your prompt describes what happens in between, in English (Appendix A.3). We put it, unchanged, into the video model's fixed prompt frame, which asks for a static full-body shot of the character exactly as it is in the avatar for the whole clip (same look, same background, same framing; only the character moves) and the return to the starting pose. The frame names nothing in the picture, so the model takes everything from the avatar itself and adds nothing. The background stays the avatar's own: if the model redraws it during the clip, we put the character back on the avatar's background in every frame (a reflection or shadow in the avatar then stays as it is in the picture). Nothing rewrites your wording. The model makes nothing shorter than 4 s, so seconds is 4 or 5; the clip comes out a little longer (section 5).

Emotes are slow compared with images (section 14) and each one takes a whole GPU for its length: make them when the user picks one, not speculatively, and show a sample clip of your own meanwhile.

The prompts we tested for the avatar look, the outfit wording and the five emotes are in Appendix A at the end of this page; store them on your side and send them with each job. They are the current look and may be updated; we'll tell you when they are. A longer integration guide with sample pictures per prompt follows this page.

11. Webhooks

Give any create request a callback_url (https) and we POST the job to it when the job reaches a final state. One delivery per final state (so one per job).

POST /hooks/loopfig HTTP/1.1
Content-Type: application/json
User-Agent: moji-api/1
Moji-Event: job.succeeded                       # job.succeeded | job.failed | job.cancelled
Moji-Delivery: whd_01JD...                      # unique per attempt series; same on retries
Moji-Signature: t=1764064800,v1=5f1a...e3       # see below

{"event": "job.succeeded", "delivery_id": "whd_01JD...", "sent_at": "2026-11-25T10:00:21Z", "job": { ...the job object... }}

The Moji- header names and the moji-api/1 User-Agent come from the API's working name; they are part of the contract and stay as they are in v1.

Verify: compute HMAC-SHA256(secret, "<t>.<raw request body>"), hex-encode, compare with v1 in constant time, and reject if |now - t| > 300 s. During a secret rotation the header carries two v1= values; accept if either matches. The secret is your client's webhook secret (whsec_...), not your API key.

Delivery: we wait 10 s for a response; any 2xx is success. Otherwise we retry with these delays: 30 s, 2 min, 10 min, 30 min, 2 h, 6 h (7 attempts total), then give up; the job itself is unaffected, poll GET /v1/jobs/{id}. Deliveries can arrive out of order and, rarely, twice: treat job.id + status as the idempotency key on your side. GET /v1/jobs/{id} always wins over a webhook if they disagree.

Python check:

import hmac, hashlib, time
def verify(secret: str, header: str, body: bytes, tolerance=300) -> bool:
    parts = dict(p.split("=", 1) for p in header.split(","))
    if abs(time.time() - int(parts["t"])) > tolerance:
        return False
    expected = hmac.new(secret.encode(), f"{parts['t']}.".encode() + body, hashlib.sha256).hexdigest()
    return any(hmac.compare_digest(expected, v) for k, v in (p.split("=", 1) for p in header.split(",")) if k == "v1")

12. Usage and credits

Every finished job has a usage record: its processing time (gpu_seconds, the seconds the job spent on a GPU), its queue time and the credits it cost. Amounts in this API are credits only: no dollar prices or costs (the credit packs and their prices are on the pricing page). These figures let you see how many jobs your traffic makes, how much processing time and how many credits they take, per day, per kind, or per job, and what you have left.

Credits

Jobs are paid in credits from your client's balance. The balance is made of lots: the free trial (120 credits), each purchase, and any credits we grant you. Your account page shows them too.

Job Credits
Avatar 9
Outfit (1–5 pictures of clothes) 6
Emote, 4 s 24
Emote, 5 s 30

GET /v1/usage?from=2026-11-01&to=2026-11-30&group_by=day

from/to are dates (inclusive, UTC; default: the current month). group_by: day (default) | kind.

{"from": "2026-11-01", "to": "2026-11-30",
 "totals": {"jobs": 1240, "succeeded": 1198, "failed": 30, "cancelled": 12,
            "by_kind": {"avatar": 400, "outfit": 700, "emote": 140}, "gpu_seconds": 26950.4, "credits": 11214},
 "rows": [{"key": "2026-11-01", "jobs": 40, "succeeded": 39, "gpu_seconds": 812.2, "credits": 351}, ...],
 "balance": 4680, "billing": "prepaid",
 "lots": [{"kind": "purchase", "credits": 6000, "remaining": 4680,
           "granted_at": "2026-11-03T09:12:00Z", "expires_at": "2027-11-03T09:12:00Z"}]}

GET /v1/usage/records?from=&to=&kind=&user_ref=&cursor=&limit=

One record per job: {job_id, kind, user_ref, status, gpu_seconds, queue_seconds, credits, created_at, finished_at}. gpu_seconds is null for a job that never reached a GPU; a failed job that did may show some. credits is what the job cost (0 once refunded, null for a job made before credits began on 26 Nov 2026).

13. Retention, deletion and privacy

Data Kept Then
Input pictures (uploads, fetched URLs, our copy of a job_id input) 7 days after the job finishes (per client: 1–30) deleted
Results (images, clips) 30 days after the job finishes (per client: 1–90) deleted; the job stays with output.expired: true
Unused uploads 24 h deleted
Job records, usage records (the prompt and the knobs; no pictures, no URLs) 3 years deleted
Request logs (IDs, status codes, no bodies) 30 days deleted

14. Limits, rate limits and timings

Limit Value
Requests per minute per key (all endpoints) 600
Job creations per minute per client 120
Active jobs (queued + running) per client 100 images + 20 emotes (429 too_many_jobs)
Request body (JSON) 1 MB; uploads 20 MB
Pictures of clothes per outfit 5
Prompt length no limit of its own (the request body's applies)
Emote length 4 or 5 s
Image job wall clock (queue excluded) 5 min, then failed with timeout
Emote job wall clock (queue excluded) 15 min
Time a job may wait for a GPU 60 min, then failed with capacity

Rate-limit responses are 429 rate_limited with Retry-After (seconds); every response carries RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset.

Expected latency (queue empty):

Job Warm Cold
Avatar (portrait step + figure) ~20 s (measured 19.9 s) +40–60 s when no image worker is running (measured 60 s in all)
Outfit ~15 s with 1–2 items or a reference sheet (measured 15.6 s with 3 items); up to ~35 s with 5 separate pictures +40–60 s
Emote, 4 s clip ~1.5 min (measured 86 s) ~8–10 min when no video GPU is up: one is rented and loaded on demand (measured 9.5 min in all); eta_seconds tells you

If you plan a launch or a campaign, tell us a day ahead so we pre-warm.

15. Errors

{"error": {"code": "invalid_image", "message": "The image is 180 px on its short side; at least 256 px is needed.",
           "param": "photo", "request_id": "req_01JD..."}}
HTTP code When
400 invalid_request malformed JSON, a bad cursor, an Idempotency-Key over 128 chars
401 unauthenticated missing/invalid key
402 insufficient_credits the job costs more credits than your balance holds (section 12); the error also carries balance and cost
403 forbidden client disabled, or the key has no access to this
404 not_found unknown job, upload, or someone else's; an unknown path
409 already_finished, idempotency_in_progress, conflict
413 payload_too_large body or upload over the limit
415 unsupported_media_type not an accepted image format
422 validation_failed, invalid_image, prompt_missing_image_ref, prompt_unknown_image_ref, idempotency_key_reused the request is well-formed but can't be done; param names the field
429 rate_limited, too_many_jobs see Retry-After
500 internal our bug; retry with the same Idempotency-Key
503 unavailable maintenance; retry with backoff

Not enough credits:

{"error": {"code": "insufficient_credits", "balance": 12, "cost": 24, "param": null, "request_id": "req_01JD...",
           "message": "Not enough credits: this 4 s emote costs 24 credits and your balance is 12. Buy credits, then send the request again."}}

Job failures (status: failed, error.code): invalid_image (unreadable, too small, not an image), fetch_failed (your URL: non-2xx, timeout, too big), model_failed (the model crashed on this input; retried twice by us first), timeout, capacity (no GPU for 60 min, or picture or video generation switched off on our side: the job fails at once with "Picture generation is switched off right now; try again later" or the same for video; send it again later), and cancelled_by_operator. delivery_failed appears in warnings, not as a failure.

16. Content and safety

17. What your app must show

Emotes are made with MiniMax H3. Wherever an emote video is shown or picked, the app must display "MiniMax H3" prominently (its licence asks for it: a caption such as "Video: MiniMax H3" on the emote picker and on the playing emote, plus a line in the licences/about screen). The same licence forbids using or displaying the model's outputs in the European Union, United Kingdom, South Korea and United States: if your app is available there, gate emotes by region. Emote videos a user shares publicly must be marked as AI-generated; your terms of use must forbid the licence's prohibited uses and give users a way to report abuse.

18. Changelog

These are the prompts we tested on real photos and real catalog pictures. They describe the current look and may be updated; the API doesn't store them, your backend does, and you can change them without us. Generation is live; make a key in your account. <image1>, <image2>… are literal placeholders the model understands; keep them exactly as written.

A.1 The avatar look

A collectible designer vinyl art toy of the user in new-generation hip-hop streetwear: the face is a lifelike likeness of the person with a glossy resin sheen; everything below it, hands and accessories included, is high-gloss lacquered vinyl; a very big bobblehead head on a short chunky body; a saturated azure sky with big clouds and a mirror floor. The clothes, shoes and accessories are not fixed: the prompt has three slots, {OUTFIT}, {SHOES} and {ACCESSORIES}, that your backend fills per user from its own lists (the look builder below), so every user gets a different outfit in the same universe. Send it with ratio: "2:3" and portrait_step: true (the default), and a seed per user.

A full-body 3D render of the person from <image1> as a collectible designer vinyl art toy figure, standing straight and facing the camera, arms relaxed at the sides, feet apart, centered, head to toe with a small margin above the head and below the shoes. Camera straight on at chest height. The head is very big, an oversized bobblehead head nearly as wide as the shoulders, with the person's own hairstyle from <image1>, the hair reaching as far down as it does in the photo; the body below is short and chunky, about two and a half times the head's height, with a short torso and stubby legs, so the whole figure is three and a half heads tall, a designer art toy's proportions. The face is a lifelike likeness of the person in <image1> with a smooth glossy resin sheen: keep the same face shape, age, skin tone, eye shape, nose, lips, eyebrows, jawline, facial hair, hairstyle and hair color as in <image1>, clearly the same person. Everything below the face is high-gloss lacquered vinyl: the clothes, shoes, hands and accessories are shiny smooth PVC toy plastic with bright specular highlights and white light-strip reflections, like an expensive designer art toy. New-generation hip-hop streetwear, baggy and oversized: {OUTFIT}. Shoes: {SHOES}. Bold playful accessories, big enough to see from far away, each worn in its place on the body: {ACCESSORIES}. Background: a saturated azure-blue sky, lighter near the ground, with big fluffy white clouds, and a glossy mirror floor reflecting the shoes. Nothing else in the scene. Lighting: a big frontal softbox and a rim light that make every glossy surface shine, rich saturated colors, sharp focus. No text, no logo, no watermark.

The parts, so you can edit the wording without losing the look: the first two sentences are the shot (the figure fills the frame, the camera straight on at chest height); then the head and body ("very big, an oversized bobblehead head nearly as wide as the shoulders … the hair reaching as far down as it does in the photo … the whole figure is three and a half heads tall"); then the face and the identity sentence (face, hair, skin tone, eyebrows, facial hair from <image1>, with a glossy resin sheen); then the material ("everything below the face is high-gloss lacquered vinyl … shiny smooth PVC toy plastic"); then the three slots; then the scene, the lighting and "No text, no logo, no watermark". Keep everything outside the slots as it is: the glossy material, the head size and the sky are what makes every user's avatar part of the same collection.

The three fills. Write them as long as you like: the prompt has no length limit (without fills it is 1,687 characters). Name a colour and a material for every item, and a place on the body for every accessory ("worn on the face", "worn across the chest", "around the neck", "on the belt loop"): the model puts things where the words say. A tested fill: OUTFIT = "an oversized black and electric-blue puffer jacket over a white oversized t-shirt, baggy charcoal parachute cargo pants"; SHOES = "chunky white and electric-blue high-top sneakers"; ACCESSORIES = "chrome headphones around the neck, a chunky silver chain, a transparent blue capsule crossbody bag with a rocket charm, and mirrored wraparound sunglasses worn on the face" (the quick start uses it). Another: "a cropped lilac and cream varsity jacket over a black oversized hoodie, baggy light-wash wide-leg jeans" / "chunky lilac platform sneakers" / "a glossy pink heart-shaped mini bag worn across the chest, a chrome crescent-moon hair clip, layered silver chains with a star pendant, and a small toy bear keychain on the belt loop".

The random look builder. Hip-hop and new-generation streetwear only: baggy and oversized, nothing formal, tailored or classic (no blazers, trench coats, loafers, quiet luxury). Pick from lists like these (extend them freely; keep the spirit):

Slot Options
Aesthetic (1) new-gen hip-hop · Y2K street · techwear street · skate · Tokyo street · electric pop · chrome futurism · pastel street
Outer layer (1, optional) oversized puffer jacket (black and electric blue, lime, chrome silver, lilac) · cropped varsity jacket (lilac and cream, black and yellow, teal and cream) · oversized technical shell with silver zips · oversized denim trucker jacket (light wash, black) · oversized track jacket with contrast stripes · boxy coach jacket
Top (1) white oversized t-shirt · black oversized hoodie · oversized tee in a palette colour · oversized striped rugby shirt · cropped zip hoodie
Bottom (1) baggy parachute cargo pants with toggles (charcoal, black, olive, cream) · baggy light-wash wide-leg jeans · baggy black jeans · wide track pants with side stripes · glossy cargo shorts over leggings
Palette (the outer layer, top and bottom share one) black and electric blue · lilac, cream and black · lime, black and chrome · cream, teal and yellow · pink, white and chrome · orange, black and silver
Shoes (1) chunky high-top sneakers in two palette colours · chunky platform sneakers · chrome-and-cream chunky sneakers with coloured soles · puffy moon-boot sneakers · glossy skate shoes with fat laces
Big playful accessories (at least 2) chrome over-ear headphones around the neck · a chunky silver chain · a transparent capsule crossbody bag (blue, pink, yellow inside) · a character-shaped mini bag (heart, star, bear) worn across the chest · mirrored wraparound sunglasses or a visor worn on the face · a bucket hat, cap or beanie in a palette colour
Playful icon (at least 1, as a pin, charm, clip or pendant) chrome cloud · star · crescent moon · heart · rocket · flame · lightning bolt · smiley · toy creature (bear, bunny, robot) in enamel or chrome
Small extras (0-1) a toy keychain on the belt loop · a chunky smartwatch · stacked rings · a carabiner with charms

The rule: 1 aesthetic; an outer layer and/or a top plus a bottom, all in one palette; 1 pair of shoes; 3 to 5 accessories, at least 2 from the big playful row, at least 1 playful icon, at most one item per row, a place named for each; eyewear in about half the looks, and never eyewear that hides who the person is (mirrored wraparounds and visors are fine; nothing that covers the eyebrows and cheeks too). Pseudo-code:

look     = random.choice(AESTHETICS)                          # "new-gen hip-hop"
palette  = random.choice(PALETTES)                            # ("black", "electric blue")
outer    = random.choice(OUTER + [None])                      # colours from the palette
top      = random.choice(TOPS)
bottom   = random.choice(BOTTOMS)
shoes    = random.choice(SHOES)
acc      = sample(BIG_PLAYFUL, k=2) + [random.choice(ICONS)]  # the floor: 2 big ones + 1 icon
if random.random() < 0.5 and not any("sunglasses" in a or "visor" in a for a in acc): acc.append(random.choice(EYEWEAR))
if len(acc) < 5 and random.random() < 0.5: acc.append(random.choice(SMALL_EXTRAS))
acc      = [a + " " + PLACE[a] for a in acc]                  # "… worn on the face", "… across the chest", "… on the belt loop"
prompt   = PROMPT.format(OUTFIT=", ".join(x for x in [f"{look}: {outer} over a {top}" if outer else f"{look}: a {top}", bottom]),
                         SHOES=shoes, ACCESSORIES=", ".join(acc[:-1]) + " and " + acc[-1])
seed     = random.randint(0, 2**31 - 1)                       # store the fill and the seed with the user

Seeds: store each user's fill and seed; re-making the avatar from the same photo with the same fill and seed gives the same picture, and a new fill or seed gives a new look in the same universe. Leave seed out and each job gets a random one (shown in input.seed).

A.2 The outfit wording

One sentence pattern, with your catalog's English words for each item in the place of the braces. <image1> is the avatar; <image2>, <image3>… are the images you send, in that order, one item each. Name the items in this order: hat, glasses, headphones, necklace, top, jacket, trousers, dress, shoes, bag. The last sentence makes ordinary packshots come out in the figure's toy material while keeping their colour, shape, cut and details; keep it as long as the avatar is the A.1 look (its glossy vinyl material).

A full-body picture, from head to toe with the shoes in view, of the character from <image1> wearing the {item A} from <image2>, the {item B} from <image3> and the {item C} from <image4>. Keep the character exactly as in <image1>: the same face, hair, skin tone, body shape, proportions and the same art style. Keep the rest of their clothes as in <image1>. Keep the background, floor and lighting of <image1>. In the same standing pose as in <image1>, facing the camera. Keep every clothing item exactly as in its photo: the same color, fabric, cut and details, rendered in the same style as <image1>. Render every item in the same glossy lacquered vinyl toy finish as the rest of the figure, shiny smooth PVC with bright specular highlights, while keeping the item's own color, shape, cut and details.

A.3 The five emotes

The prompt is only the action. Write what the body does, in order, with concrete parts and directions, and end back in the starting pose (the clip loops). Leave the look out: don't describe the character, what it wears, the style or the background, and don't write anything that takes something off or adds something (a prop, a shadow, a new place). We keep the avatar exactly as it is; words about the look can only pull the clip away from the picture: the model draws what the words name, so "a grey studio backdrop" replaces the avatar's own background, and naming a hat or sunglasses can put them on an avatar that has none. Keep it a full-body shot: never write anything that implies moving toward the camera or leaning in ("leans toward the camera" makes the model push in, breaking the framing and the loop). seconds: 4 is the floor and fits all five; a longer clip doesn't stretch an action, it needs a longer action. These ran with the seeds shown; the same seed gives every user the same motion.

Emote seconds seed prompt
Wave 4 101 The character lifts the right hand to shoulder height, palm open toward the camera, and waves it from side to side three times with a warm, friendly smile and a small tilt of the head, then lowers the arm back to the side.
Laugh 4 102 The character bursts into a hearty laugh: the head tips back a little, the eyes squeeze shut, the mouth opens wide in a grin, the shoulders bounce up and down, and one hand comes up to the chest; then the laugh fades, the hand drops and the character settles back into the starting pose with a smile.
Dance 5 103 The character does a playful little dance in place: steps from one foot to the other in rhythm, swings the arms loosely with the beat, bobs the head, spins the hips once, raises both hands and snaps the fingers, then steps back to the center and finishes in the starting pose.
Thumbs up 4 106 The character raises the right hand up beside the chest into a confident thumbs-up with a wide happy grin and a small nod, holds it for a moment, then relaxes the face and lowers the hand back to the side. This is a wide full-body shot for the whole clip: the character's head and feet stay visible and the same size as in <Picture 1>.
Sad 4 105 The character's smile fades into a sad pout: the shoulders slump, the head lowers, the eyebrows rise in the middle, the eyes look down at the ground and glisten, one hand reaches across to rub the other arm; then the character takes a breath, lets the hand go and slowly straightens back into the starting pose.

(<Picture 1> in the thumbs-up prompt is the video model's own name for the avatar frame; keep it as written.)