resourcepack.ai
DOCS

Generating

Generate a block texture

Produces a block, drawn at 16x16 (a bigger size is that scaled up). Four versions are drawn and the best is used; on Creator, Studio or a Team the others are at GET .../assets/texture/{name}/candidates.

vanillaTarget is required when mode is vanilla; description is required when mode is custom. Setting faceSlot generates a single face of a block reskin and needs a vanillaTarget that supports per-face textures.

POST/packs/{pack}/textures

Path parameters

packstringrequired

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

Body

promptstringrequired

What to draw. Describe material and wear, not pixels.

sizeintegerrequired16–128

Output edge length in pixels.

modestringrequired

Replace a vanilla block, or add a texture of your own.

Options: vanilla, custom

vanillaTargetstring

The vanilla texture to replace.

descriptionstring

What this texture is. Required for custom.

namestring

Your label for it.

faceSlotstring

Generate one face only.

Options: top, bottom, side

referenceIdstring

A reference image: the referenceId from POST /packs/{pack}/references, or one uploaded in the Studio.

referenceStrengthnumber0.05–0.95

How closely to follow the reference. Clamped to this range rather than rejected.

useStyleGuidebooleandefault true

Follow 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.

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.