A brand kit is used when you generate images with Magnific One (
POST /v2/images/generate/magnific-one). The other models do not take one: sending brand_kit_id to them answers 422.Build a kit, step by step
1. Create the kit
201 with the new kit’s id: a private draft of yours. To start from an official or shared kit instead, copy it with POST /v2/brand-kits/{brand_kit_id}/duplicate. Both count against the number of kits you may own (422 when it is reached).
2. Feed it
Use any of these sources, as many times as you need:creation_id with its type (image). Upload a file first with Uploads to get its creation_id. Images are analysed on their own: the answer carries a run_id to wait for.
.pdf, .md, .txt). Attaching them needs a paid plan.
-
Ask for one signed target per file:
Each target has its
upload_url,upload_path,mime_typeand thetypeto register it with:pdf, ordesign_mdfor markdown and text. Targets count against your daily upload quota. -
PUTeach file’s raw bytes to itsupload_url, with theContent-Typeof itsmime_type. No JSON and no API key: the signature in the URL is the authorization. -
Register it with its
upload_pathand thattype, instead of acreation_id:A target lasts an hour and is good for one document of this kit: request a new one if thePUTfails or it expires. -
Process it with the document’s
idfrom that answer:POST /v2/brand-kits/{brand_kit_id}/documents/{document_id}/process. It answersprocessingwith arun_id,completedif it was read before, ordeferredwhen the daily extraction limit is reached: it is then read on its own afterretry_after, so do not send it again. - Wait for the run, as in the next step.
DELETE /v2/brand-kits/{brand_kit_id}/documents/{document_id} (website as the document_id for the site the kit was read from). What was already extracted from it stays in the kit.
3. Wait for the run
processing, ask again after poll_after_seconds. Once it ends it is completed, with the palette, typography, brand and voice it found and the gaps that say why anything is missing, or failed for a template that did not get made. Then read the whole kit with GET /v2/brand-kits/{brand_kit_id} (?view=full for the raw kit, to edit it).
4. Edit it
Fonts (
.ttf, .otf, .woff, .woff2):
-
Ask for one signed target per file:
-
PUTeach file’s raw bytes to itsupload_url, with theContent-Typeof itsmime_type(application/octet-stream). No JSON and no API key: the signature in the URL is the authorization. -
Register it with its
upload_path, optionally in a typographyrole:
expires_at: request a new one if the PUT fails or it expires.
5. Generate with it
Go on with Generate on brand, using the kit once itsstatus is ready.
Validation rounds
A validation round tests aready kit you own: it plans a few scenarios (one per template, or the standard set), you generate one image for each, the user says which look on brand and which do not, and that feedback becomes a patch for the kit. Nothing in the kit changes until the patch is applied.
1. Start a round
201 with the round’s id and its recommended_scenarios, each with its key. Omit scenario_keys for the standard round, or send up to 4 of them to test only those (template:<slug> for one of the kit’s templates). Rounds per kit and day are capped.
2. Generate each scenario’s sample
recommended_scenarios. The prompt, model, ratio and template come from the round’s plan, whatever else is sent. Each sample is billed as an image generation (402 with required_credits when the balance is short), so agree the cost with the user first: ?dry_run=true prices it. It answers 202 before rendering, like POST /v2/images/generate/{model}: follow it with GET /v2/creations/{creation_id} or a webhook_url, and folder_reference picks where it lands. A scenario holds one image: asking again answers the one it has, without charging.
3. Record the samples
Once every scenario’s image is generated,POST /v2/brand-kits/{brand_kit_id}/validation/runs/{run_id}/record records them as the round’s samples, in scenario order, and the round becomes samples_recorded.
4. Ask the user
Show the user each sample and ask which look on brand and which do not, and why.5. Analyze the feedback
sample_feedback with its label (more_on_brand, less_on_brand or neutral) and their own words in notes. The answer is 201 with a proposed patch (status: proposed) and its id: additive rules, things to avoid, prompt fragments, logo rules and template examples. A structural change (palette, logo, typography) is only named in proposed_patch.needs_confirmation, for the user to confirm and apply apart with PATCH /v2/brand-kits/{brand_kit_id}. If the user rejects the proposal, analyze again with revision_patch_id and their correction in user_notes. Analysis is a model run on the user’s daily budget (429 over it).
6. Read the patch
GET /v2/brand-kits/{brand_kit_id}/validation/patches/{patch_id} returns the proposal, to show the user before they decide.
7. Apply it
replayed: true. A kit edited since the proposal is refused: analyze again.
8. Refine (optional)
Start a new round withprevious_run_id set to the round you just patched. Its scenarios are cloned so before and after compare; scenario_keys, if sent, must be the previous round’s. Refinements per chain are capped.
Who may do what
- Reads (
GET) work on every kit you may read: your own, the ones shared with you and the official ones. With an API key, only the kits of the key’s organization are reachable. - Writes work only on a kit you own. Duplicate a shared or official kit to edit your own copy.
- A kit you cannot reach answers
404, whether it does not exist or is not yours to see or edit. - A personal token needs
api:readto read,api:writeto create and edit, andapi:destructiveto delete a document or a template.
Limits
- Model runs (processing a document, capturing a website, creating a template, analysing social profiles and analysing a validation round’s feedback) have a per-user minute and daily budget. Over it, the call answers
429: wait theRetry-Afterheader, in seconds. - Font and document uploads count against your daily upload quota: over it,
POST /v2/brand-kits/{brand_kit_id}/fonts/uploadsandPOST /v2/brand-kits/{brand_kit_id}/documents/uploadsanswer429withupload_quota_exceeded.
Generate on brand, step by step
1. Find the kit
status is ready: one still being built is refused.
2. Pick a template and a logo (optional)
data.content.templates (each with its slug) and the logos generation can place are in data.content.logo_marks (each with its sqid).
3. Generate with it
The answer is the same as any image generation:
202 with the images under data[], each with its creation_id.
What is refused, before charging
Each of these answers422 naming the field, and nothing is charged:
- A model other than Magnific One,
autoincluded. - A kit you cannot read, or one whose
statusis notready. - A template or a logo the kit does not have.
- References that Magnific One does not take next to a kit.
In a flow
A flow input of type brand kit takes{ "brand_kit_id": "bk_3Xa9", "brand_kit_template_slug": "social-banner" } in POST /v2/flows/{flow_id}/run, with the same checks.