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.
/packs/{pack}/stylePath parameters
packstringrequiredThe pack's slug, as returned by the packs endpoints.
Body
enabledbooleanWhether generations follow it.
notesstringmax 1000 charactersYour own words about the look.
palettearray of stringmax 64 entriesThe whole palette: #rrggbb strings, or {hex, name}. Duplicates are dropped.
paletteNamestringA name for the palette. Sending a palette without one clears the old name.
strictbooleanSnap finished pixels to the palette. Right for a chosen palette, wrong for one taken off a photo.
imageIdsarray of stringmax 10 entriesThe whole list of reference pictures, as referenceIds.
Response · 200
Saved. The guide as it now stands.
packstringrequiredThe pack.
styleobjectrequiredThe guide.
enabledbooleanrequiredWhether generations follow it. Off keeps it without anything reading it.
notesstringrequiredThe author's own words about the look. May be empty.
palettearray of objectrequiredThe pack's colours. A visual generation paints in these.
hexstringrequired#rrggbb, lowercase.
namestringIts name, when it came from a named palette.
paletteNamestringThe named palette it came from, if any.
strictbooleanrequiredWhether finished pixels are snapped to the palette rather than only asked to use it.
imageIdsarray of stringrequiredReference pictures the look is read from, as referenceIds.
Error codes
Branch on error.code, never on the message.
invalid_json400The request body wasn't a JSON object.
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.
account_suspended403The account is suspended, so its keys open nothing. message says until when, if the suspension has an end date.
forbidden403Valid key, but not permitted to do this in this pack.
plan_required403The key is valid, but its account is on Starter. The API needs a paid plan.
not_found404No such pack, asset or job.