Create a mascot from text
Describe your mascot and pick a style; the API draws its reference image.
Two Approaches
Preview options first (recommended, 1 credit per preview), or create the mascot in one call (1 credit for its reference image).
If direct creation fails, its credit is refunded, with background retries when needed. Retry with the same Idempotency-Key and request: completed errors replay too, so a retry never charges again.
Step 1: Browse Styles
Each style has an id to pass as preset_id.
curl https://api.masko.ai/v1/styles \
-H "Authorization: Bearer masko_YOUR_API_KEY"Step 2: Generate Previews
Generate several images from your description and pick one before creating the mascot.
curl -X POST https://api.masko.ai/v1/generate/preview \
-H "Authorization: Bearer masko_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A friendly orange fox wearing a space helmet",
"preset_id": "STYLE_ID",
"count": 4
}'Step 3: Create Mascot
Use the preview URL you like as a reference image.
curl -X POST https://api.masko.ai/v1/mascots \
-H "Authorization: Bearer masko_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Astro Fox",
"project_id": "PROJECT_ID",
"prompt": "A friendly orange fox wearing a space helmet",
"reference_image_urls": [
"URL_FROM_PREVIEW_RESPONSE"
]
}'Shortcut: Direct Creation
Skip previews: the API generates a reference image from your prompt for 1 credit. style optionally applies a preset.
curl -X POST https://api.masko.ai/v1/mascots \
-H "Authorization: Bearer masko_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Astro Fox",
"project_id": "PROJECT_ID",
"prompt": "A friendly orange fox wearing a space helmet",
"style": "3d"
}'Design touches
design_touches adds the Studio creator's design ideas after your prompt, only where they fit: a touch never adds ears, limbs or a mouth the character lacks, and your prompt wins where they differ. Touches need prompt and no references, and cost nothing extra.
| Group | Touch IDs |
|---|---|
| Shape | proportions (big head, small body), simple, asymmetry (a little lopsided), grounded, few-colors |
| Face | no-mouth, looks-at-you, blush, and at most one of eyes-big or eyes-dots |
| Character | signature, weird (one weird thing), twist, grown-up-flaw, magic-part, and at most one mood: mood-cozy, mood-mischievous, mood-melancholy, mood-bold, mood-mysterious, mood-chaotic or mood-serene |
curl -X POST https://api.masko.ai/v1/mascots \
-H "Authorization: Bearer masko_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Ember",
"project_id": "PROJECT_ID",
"prompt": "a dragon",
"design_touches": ["proportions", "eyes-big", "mood-cozy"]
}'