resourcepack.ai
DOCS

Generating

Animate a mob

The mob editor's Animate with AI: one run that writes an animation for each of the mob's states (walking, attacking, being hurt, dying...) and wires them into its settings. A mob made with POST /packs/{pack}/mobs is already animated; this is for one whose animations you want redone, or a model you made a mob with POST /packs/{pack}/models/{model} (type: mob).

Takes a minute or two. Charged as an animation, refunded if it fails. One AI edit at a time per model: a second answers already_running.

plan: true also sets the mob up first from its geometry (its behaviour, health, which way it faces), which is the quickest way from a plain model to something that walks.

POST/packs/{pack}/mobs/{model}/rig

Path parameters

packstringrequired

The pack's slug, as returned by the packs endpoints.

modelstringrequired

The mob's name from the listing.

Body

instructionstringmax 600 characters

How it should move. Absent lets it decide from the model.

planbooleandefault false

Set the mob up from its geometry first.

statesarray of string

Only these states. Absent animates death, attack, hurt, walk and idle.

Response · 202

Accepted. Poll job until it leaves generating.

idstringrequired

The mob's name.

typestringrequired

Always mob.

kindstringrequired

Always model.

statusstringrequired

Always generating.

packstringrequired

The pack.

jobstringrequired

Poll this at GET /jobs/{job}.

Error codes

Branch on error.code, never on the message.

invalid_request400

Something in the body or query is wrong. message says what.

invalid_api_key401

The key isn't one of ours, or it has been revoked.

missing_api_key401

No Authorization: Bearer header was sent.

wrong_key_kind401

An MCP key sent to the REST API, or an API key sent to the MCP server. Each only opens its own.

insufficient_credits402

Not enough AI Credits to run this. Nothing was started or charged.

account_suspended403

The account is suspended, so its keys open nothing. message says until when, if the suspension has an end date.

asset_limit_reached403

The pack is at its asset limit.

forbidden403

Valid key, but not permitted to do this in this pack.

plan_required403

The key is valid, but its account's plan does not include the API.

not_found404

No such pack, asset or job.

already_running409

An AI edit or generation of that asset is still running. Wait for its job, then send the edit again.

not_a_mob409

The model is not a mob. Make it one with POST /packs/{pack}/models/{model} and type: mob.

still_generating409

The asset exists but isn't finished. Poll its job until it's ready.