Create a mascot from a brand book
Send your brand book and get a mascot back: every view as a reference, and its description, colors, style, don'ts and props in its context.
Create the mascot
Send the files in reading order, as public links or POST /v1/upload assets:
- a PDF up to 50 MB;
- PNG, JPEG or WebP pages up to 10 MB each;
- at most 30 pages in total.
curl -X POST https://api.masko.ai/v1/mascots/from-brand-book \
-H "Authorization: Bearer masko_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"project_id": "PROJECT_ID",
"files": [{ "url": "https://example.com/brand-book.pdf" }],
"max_credits": 17
}'| Field | Required | Description |
|---|---|---|
project_id | Yes | Project the mascot is created in. |
files | Yes | Each file is { "url": "..." } or { "asset_id": "..." }, with an optional name. |
name | No | Mascot name. By default, the name written in the brand book. |
max_credits | No | Spending cap, from 1 to 17. |
Send a PDF from your computer
Ask for a signed upload URL, upload the file straight to storage, then pass its asset_id:
curl -X POST https://api.masko.ai/v1/upload \
-H "Authorization: Bearer masko_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "content_type": "application/pdf", "size": 31759881, "file_name": "brand-book.pdf" }'
# PUT the file with the returned upload_headers before expires_at (15 minutes)
curl -X PUT "UPLOAD_URL" \
-H "Content-Type: application/pdf" \
-H "x-goog-content-length-range: 0,52428800" \
--data-binary @brand-book.pdfThen send "files": [{ "asset_id": "ASSET_ID" }]. Storage refuses files above 50 MB, and calling before the upload finishes returns 400.
Wait for the mascot
Poll the job, which takes about 2 to 4 minutes. step goes pages, read (free), generate (views and props drawn), then mascot (context filled).
curl "https://api.masko.ai/v1/jobs/JOB_ID?wait=true&timeout=120" \
-H "Authorization: Bearer masko_YOUR_API_KEY"Use result.mascot_id with any mascot endpoint. A prop appears in a new image only when the prompt asks for it.
What it costs
Reading is free. Each reference drawing and prop is drawn for $0.125, at most 5 drawings and 12 props ($2.13); failed images are refunded. The drawings are the mascot's front, three-quarter, side and back, then the book's own poses in the room left, usually one (the mascot alone, such as waving). An angle the book never draws is drawn from its front, so a press kit of front poses still gives a side and a back.
The job stops after reading, with no charge, if there is no mascot, the cost exceeds max_credits or your balance is too low; its error gives the reason and price. Each account can read 15 brand books per day.
Tips
- Links must be public: a signed storage URL works, a page behind a login does not.
- Page images can be uploaded one by one and sent as
asset_ids in reading order. - An
Idempotency-Keyheader lets you retry without starting a second job.
