resourcepack.ai
DOCS

Generating

Generate a GUI sheet

Produces a texture named gui:<name>.

The easy path is `auto: true`: a reasoning model plans the whole screen from the prompt — rows, title, materials, buttons, layout — and target may be omitted. Without auto, you direct everything yourself.

Image spend: elements, decorations and button icons are each their own image call, which is why they share a cap. texts, button faces, the title plaque and the frame are composed rather than generated and cost nothing extra.

POST/packs/{pack}/guis

Path parameters

packstringrequired

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

Body

promptstringrequired

With auto, the whole screen you want; without it, how the panel surface should look.

autobooleandefault false

Let the director plan the screen from the prompt alone.

targetstring

The vanilla screen to reskin. Required unless auto is set (the director picks the chest size).

namestring

Your label.

titlestring

The screen's name, worn per titleStyle. Composed from the vanilla font — free.

titleScaleintegerdefault 1

1 fits long names, 2 is display size.

Options: 1, 2

titleStylestringdefault "plaque"

How the name is worn: a composed plaque, painted straight onto the panel, or on a drawn signboard.

Options: plaque, painted, sign

signPromptstring

titleStyle: sign only — the board to draw (one image call).

framestring

What the frame band is made of — a second material image wrapped round the window.

scenebooleandefault false

Draw the panel as one full-bleed picture instead of a flat material — for screens whose cells hold no items.

buttonsarray of objectmax 6 entries

Real controls: the face and label are composed (always legible); only an icon costs an image call.

slotintegerrequiredmin 0

Index of the slot its top-left sits on.

labelstringmax 24 characters

The words on the button. May be empty when icon is set.

iconstring

One small object drawn at 16px beside the label.

fillstring

Accent for the face, #rrggbb. Absent uses the panel's palette.

wSlotsinteger1–7default 1

Width in slots.

hSlotsinteger1–7default 1

Height in slots.

elementsarray of objectmax 6 entries

Buttons and icons drawn over the panel. Each is a separate image call.

slotintegerrequiredmin 0

Index of the slot to place it on.

promptstringrequired

What to draw.

wSlotsinteger1–7default 1

Width in slots.

hSlotsinteger1–7default 1

Height in slots.

kindstringdefault "artwork"

Artwork fills its box; an icon sits on transparency.

Options: artwork, icon

textsarray of objectmax 12 entries

Lines of text drawn from the vanilla font. Free — no image call.

textstringrequiredmax 64 characters

What it says.

xintegerrequired0–255

Sheet pixels from the left.

yintegerrequired0–255

Sheet pixels from the top.

colorstringrequired

Hex colour, #rrggbb.

scaleinteger1–4default 1

Whole numbers only — bitmap text at 1.5x is mush.

shadowbooleandefault true

Drop shadow behind the glyphs.

alignstringdefault "left"

Which edge x refers to.

Options: left, center, right

drawSlotsbooleandefault false

Draw the item slot boxes.

includePlayerInventorybooleandefault false

Extend the restyle over the player's inventory.

referenceIdstring

A reference image already uploaded in the Studio. There is no API endpoint to upload one yet.

referenceStrengthnumber0.05–0.95

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

Response · 202

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

idstringrequired

The asset's name within the pack.

kindstringrequired

Which store the generated asset lands in.

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.

insufficient_credits402

Not enough AI Credits to run this. Nothing was started or charged.

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.

unavailable503

The feature behind this endpoint is switched off.