Generating
Generate an item
Produces an item (a 2D sprite) or an item3d (a 3D model bound to the item) — the response's type and job say which.
Omit target (or send null) for an item of your own; give a vanilla item id to reskin it. Reskinning one this pack already reskins answers 409: change it in the Studio rather than overwriting it blind. variant needs a target and Minecraft 1.21.4 or newer.
/packs/{pack}/itemsPath parameters
packstringrequiredThe pack's slug, as returned by the packs endpoints.
Body
promptstringrequiredWhat to draw or build.
targetstringA vanilla item to reskin. Null or absent means a new item.
shapestringdefault "2d"A flat sprite, or real geometry.
Options: 2d, 3d
sizeintegerdefault 16Sprite edge length. 2D only.
Options: 16, 32, 64, 128
namestringYour label. Falls back to the prompt.
variantbooleanA custom-model-data variant of target rather than a full reskin.
referenceIdstringA reference image: the referenceId from POST /packs/{pack}/references, or one uploaded in the Studio.
referenceStrengthnumber0.05–0.95How closely to follow the reference. Clamped to this range rather than rejected.
useStyleGuidebooleandefault trueFollow the pack's style guide — its palette, its notes and its reference pictures. Defaults to true, so a pack with a style guide produces assets that match it without this field. Send false for one asset that should deliberately not match. A pack with no style guide, or one switched off, ignores this either way.
Response · 202
Accepted. The work runs asynchronously — poll job until it leaves generating.
idstringrequiredThe asset's id within the pack.
typestringrequiredWhat is generating. For an item, item or item3d.
Options: model, vehicle, mob, block, block_face, model_texture, item, item_model, item3d, armor, armor3d, gui, hud, dialog, icon, rank_tag, sound
kindstringrequiredThe file format it is stored as.
Options: texture, model, font, sound
statusstringrequiredAlways generating — nothing is finished when this returns.
packstringrequiredThe pack it was written into.
jobstringrequiredPoll this at GET /jobs/{job} until it leaves generating.
Error codes
Branch on error.code, never on the message.
invalid_request400Something in the body or query is wrong. message says what.
invalid_api_key401The key isn't one of ours, or it has been revoked.
missing_api_key401No Authorization: Bearer header was sent.
wrong_key_kind401An MCP key sent to the REST API, or an API key sent to the MCP server. Each only opens its own.
insufficient_credits402Not enough AI Credits to run this. Nothing was started or charged.
account_suspended403The account is suspended, so its keys open nothing. message says until when, if the suspension has an end date.
asset_limit_reached403The pack is at its asset limit.
forbidden403Valid key, but not permitted to do this in this pack.
plan_required403The key is valid, but its account's plan does not include the API.
not_found404No such pack, asset or job.
conflict409That vanilla target is already reskinned in this pack. Change it in the Studio rather than overwriting it.