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.
/packs/{pack}/custom-guis/{gui}/generatePath parameters
packstringrequiredThe pack's slug, as returned by the packs endpoints.
guistringrequiredThe Custom GUI's id from the list.
Body
promptstringrequiredmax 4000 charactersWhat the page should be, or what to change.
pagestringThe 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.
packstringrequiredThe pack.
guiobjectrequiredThe Custom GUI.
idstringrequiredIts id in the pack.
namestringrequiredIts name.
pagesintegerrequiredHow many pages it has.
entrystringrequiredThe page a server opens first.
updatedAtstringrequiredISO 8601.
pagestringrequiredThe page written.
statusstringrequiredAlways ready.
contentstringrequiredThe page's HTML.
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.