---
title: "Create a mascot from a brand book"
method: POST
path: "/v1/mascots/from-brand-book"
tags: ["Generate"]
---

# Create a mascot from a brand book

`POST /v1/mascots/from-brand-book`

## Request

- Base URL: `https://api.masko.ai`
- URL: `https://api.masko.ai/v1/mascots/from-brand-book`
- Auth: HTTP bearer

One call that turns a brand book into a mascot. Send the brand book as public links (a PDF up to 50 MB, or PNG, JPEG or WebP pages up to 10 MB each) or images from POST /v1/upload, at most 30 pages in total. The job reads the brand book for free, generates every mascot view and prop it finds as a clean image for 1 credit each (at most 5 views and 12 props, so at most 17 credits), then creates the mascot in project_id with the views as labeled references and the description, colors, style, don'ts and props filled in. Poll GET /v1/jobs/{job_id}: step reports progress, and a completed job returns result.mascot_id with what it cost. Nothing is charged when the brand book has no mascot, costs more than max_credits, or the balance is short; each image that fails is refunded. Takes about 2 to 4 minutes. Counts toward the limit of 15 brand book readings per day. Use Idempotency-Key to retry without starting a second job.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `project_id` string, uuid, required: Project to create the mascot in.
  - `files` object[], required: The brand book: one PDF, page images, or both, at most 30 pages in total, in reading order.
    - `url` string, uri: Public HTTP(S) link to a PDF (up to 50 MB) or a PNG, JPEG or WebP image (up to 10 MB). Downloaded server-side with public-address checks on every redirect.
    - `asset_id` string, uuid: An image uploaded with POST /v1/upload, or a PDF sent to the signed upload_url that POST /v1/upload returns for content_type application/pdf.
    - `name` string: File name shown in the mascot context.
  - `name` string: Mascot name. When omitted, the name written in the brand book is used.
  - `max_credits` integer: Spending cap. Each view and prop generated costs 1 credit, at most 17 in total. When the brand book costs more, the job fails after the free reading and nothing is charged.

## Response `202`

Brand book accepted

- CreateMascotFromBrandBookResponse
  - `data` object, required
    - `job_id` string, uuid, required
    - `status` 'pending', required
    - `type` 'mascot_brand_book', required
    - `max_cost_credits` integer, required: The most this job can charge.
    - `poll_url` string, required

## Other responses

- `400`: Request failed
- `401`: Request failed
- `402`: Request failed
- `403`: Request failed
- `404`: Request failed
- `429`: Request failed
- `500`: Request failed
- `503`: Request failed

---

[API](https://skmtc.dev/masko/apis/masko-api.md) · [All operations](https://skmtc.dev/masko/apis/masko-api/llms.txt) · [OpenAPI document](https://skmtc.dev/masko/apis/masko-api/revisions/91eb3006a92f?raw)
