resourcepack.ai
DOCS

Generating

Write a Custom GUI page with AI

The Custom GUI editor's AI: writes a page from a sentence, or rewrites one that exists (page, the entry page by default), and saves it before answering, so there is no job to wait on. look: minecraft draws it in the game's own style (panels, slots, the game's font), and adds the kit's stylesheet to the GUI if it lacks it. 15 credits a request, flat, given back if it fails.

POST/packs/{pack}/custom-guis/{gui}/generate

Path parameters

packstringrequired

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

guistringrequired

The Custom GUI's id from the list.

Body

promptstringrequiredmax 4000 characters

What the page should be, or what to change.

pagestring

The page's file name. A new one is made when it doesn't exist.

lookstringdefault "modern"

Its style.

Options: modern, minecraft

Response · 200

Written and saved.

packstringrequired

The pack.

guiobjectrequired

The Custom GUI.

idstringrequired

Its id in the pack.

namestringrequired

Its name.

pagesintegerrequired

How many pages it has.

entrystringrequired

The page a server opens first.

updatedAtstringrequired

ISO 8601.

pagestringrequired

The page written.

statusstringrequired

Always ready.

contentstringrequired

The page's HTML.

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.