resourcepack.ai
DOCS

Generating

Regenerate an asset

Runs a block's, item sprite's, icon's, model's or sound's generation again, as its page's Regenerate button does, or Retry after a failed one. It uses the prompt the asset was made with unless you send a new one, which then becomes its prompt. Charged as that generation is.

Regenerating something that came out fine keeps what it replaces as a version, so POST /packs/{pack}/assets/{kind}/{name}/versions/{version}/restore can bring it back. Other types are regenerated with their generate endpoint, or changed with Edit with AI.

POST/packs/{pack}/assets/{kind}/{name}/regenerate

Path parameters

packstringrequired

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

kindstringrequired

The asset's kind from the listing.

Options: texture, model, font, sound

namestringrequired

The asset's name from the listing.

Body

promptstring

A new prompt. The stored one by default.

takeCountinteger1–10

For a sound: how many takes to make.

Response · 202

Accepted. The work runs asynchronously — poll job until it leaves generating.

idstringrequired

The asset's id within the pack.

typestringrequired

What 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

kindstringrequired

The file format it is stored as.

Options: texture, model, font, sound

statusstringrequired

Always generating — nothing is finished when this returns.

packstringrequired

The pack it was written into.

jobstringrequired

Poll this at GET /jobs/{job} until it leaves generating.

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.