Skip to main content
A brand kit stores your brand once: colours, imagery style, tone of voice, typography, logos and content templates. Through the API you can build a kit, feed it, edit it, test it with validation rounds and generate images that follow it.
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

The answer is 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:
From your own image creations. Send each one’s 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, markdown or text files (.pdf, .md, .txt). Attaching them needs a paid plan.
  1. Ask for one signed target per file:
    Each target has its upload_url, upload_path, mime_type and the type to register it with: pdf, or design_md for markdown and text. Targets count against your daily upload quota.
  2. PUT each file’s raw bytes to its upload_url, with the Content-Type of its mime_type. No JSON and no API key: the signature in the URL is the authorization.
  3. Register it with its upload_path and that type, instead of a creation_id:
    A target lasts an hour and is good for one document of this kit: request a new one if the PUT fails or it expires.
  4. Process it with the document’s id from that answer: POST /v2/brand-kits/{brand_kit_id}/documents/{document_id}/process. It answers processing with a run_id, completed if it was read before, or deferred when the daily extraction limit is reached: it is then read on its own after retry_after, so do not send it again.
  5. Wait for the run, as in the next step.
A source you no longer want goes with 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

While the run is 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):
  1. Ask for one signed target per file:
  2. PUT each file’s raw bytes to its upload_url, with the Content-Type of its mime_type (application/octet-stream). No JSON and no API key: the signature in the URL is the authorization.
  3. Register it with its upload_path, optionally in a typography role:
A target is valid until its 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 its status is ready.

Validation rounds

A validation round tests a ready 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

The answer is 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

One call per entry of 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

Each sample the user judged goes in 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

Applying the patch is the approval: call it only once the user agrees. It writes the patch’s additive changes into the kit, once: applying it again writes nothing and answers replayed: true. A kit edited since the proposal is refused: analyze again.

8. Refine (optional)

Start a new round with previous_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:read to read, api:write to create and edit, and api:destructive to 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 the Retry-After header, in seconds.
  • Font and document uploads count against your daily upload quota: over it, POST /v2/brand-kits/{brand_kit_id}/fonts/uploads and POST /v2/brand-kits/{brand_kit_id}/documents/uploads answer 429 with upload_quota_exceeded.

Generate on brand, step by step

1. Find the kit

Use a kit whose status is ready: one still being built is refused.

2. Pick a template and a logo (optional)

The kit’s templates are in 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 answers 422 naming the field, and nothing is charged:
  • A model other than Magnific One, auto included.
  • A kit you cannot read, or one whose status is not ready.
  • A template or a logo the kit does not have.
  • References that Magnific One does not take next to a kit.
With an API key, only the kits of the key’s organization are reachable.

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.
A brand kit guides the images; it does not guarantee exact fonts, exact colour values or pixel-identical logo placement.