resourcepack.ai
DOCS

Packs

Change a pack's style guide

Changes the fields you send and keeps the rest, so {"palette": ["#3b3a36", "#6b5a43"]} sets the colours and leaves the notes alone. Only the pack's owner may change it: it decides what every collaborator's generations look like.

A reference picture is a referenceId from POST /packs/{pack}/references; imageIds is the whole list, in order, so send the old ids to keep them. A picture taken out of the list is deleted. The pictures are read once, behind the answer, and what is read off them steers generations from then on.

POST/packs/{pack}/style

Path parameters

packstringrequired

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

Body

enabledboolean

Whether generations follow it.

notesstringmax 1000 characters

Your own words about the look.

palettearray of stringmax 64 entries

The whole palette: #rrggbb strings, or {hex, name}. Duplicates are dropped.

paletteNamestring

A name for the palette. Sending a palette without one clears the old name.

strictboolean

Snap finished pixels to the palette. Right for a chosen palette, wrong for one taken off a photo.

imageIdsarray of stringmax 10 entries

The whole list of reference pictures, as referenceIds.

Response · 200

Saved. The guide as it now stands.

packstringrequired

The pack.

styleobjectrequired

The guide.

enabledbooleanrequired

Whether generations follow it. Off keeps it without anything reading it.

notesstringrequired

The author's own words about the look. May be empty.

palettearray of objectrequired

The pack's colours. A visual generation paints in these.

hexstringrequired

#rrggbb, lowercase.

namestring

Its name, when it came from a named palette.

paletteNamestring

The named palette it came from, if any.

strictbooleanrequired

Whether finished pixels are snapped to the palette rather than only asked to use it.

imageIdsarray of stringrequired

Reference pictures the look is read from, as referenceIds.

Error codes

Branch on error.code, never on the message.

invalid_json400

The request body wasn't a JSON object.

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.

account_suspended403

The account is suspended, so its keys open nothing. message says until when, if the suspension has an end date.

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.