resourcepack.ai
DOCS

Generating

Generate a shader

Produces a shader object, of one of three dimensions:

- 2d: a HUD overlay drawn over the screen (a health bar with the player's head, a compass, a frame). It is laid out while the request waits, so the answer is already ready and its job needs no polling. Up to 500 characters. - 3d: an object drawn in the world by a shader (a glowing portal, a hologram). Takes minutes. Up to 800 characters. - text: a text effect, a look any text in its colour wears in game (fire, a rainbow wave, a glitch). Takes minutes, and its type is text_effect. Up to 600 characters.

Each dimension is billed at its own price, the one the Studio quotes, and refunded in full if it fails. A shader has no file to download: it ships inside the pack's .zip. A 3D object or a text effect is changed with POST /packs/{pack}/assets/shader/{id}/edit; a HUD overlay is changed in the Studio's shader editor.

POST/packs/{pack}/shaders

Path parameters

packstringrequired

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

Body

promptstringrequired

What it should show or look like.

namestring

Your label. Absent lets it be named from the prompt.

dimensionstringdefault "2d"

A HUD overlay, an object in the world, or a text effect.

Options: 2d, 3d, text

referenceIdsarray of stringmax 5 entries

Reference images to design after, in order: referenceIds from POST /packs/{pack}/references.

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. A 2d shader is already ready; a 3d one or a text effect runs asynchronously, so poll job until it leaves generating.

idstringrequired

Its id within the pack.

typestringrequired

What is generating.

Options: shader, text_effect

statusstringrequired

ready for a 2d shader, generating otherwise.

Options: generating, ready

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 is on Starter. The API needs a paid plan.

not_found404

No such pack, asset or job.