Batch generation and AI suggestions
Queue up to 10 generations in one call, and get free pose ideas for your mascot.
Batch Generation
Each entry in requests uses the same fields as /generate, except speech, and all run in parallel. The call returns 202 Accepted with the queued jobs.
curl -X POST https://api.masko.ai/v1/mascots/MASCOT_ID/generate-batch \
-H "Authorization: Bearer masko_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"requests": [
{
"type": "image",
"name": "Waving",
"image_prompt": "waving hello with a friendly smile"
},
{
"type": "image",
"name": "Thinking",
"image_prompt": "hand on chin, looking up thoughtfully"
},
{
"type": "animation",
"name": "Celebrating",
"image_prompt": "jumping with arms raised in celebration",
"animation_prompt": "jumping up and down excitedly, confetti motion",
"animation_model": "standard",
"duration": 5,
"loop": true
}
]
}'When to Batch vs Sequential
Batch when you know every item up front, such as a full pose set for a new mascot. Send requests one by one when a generation needs an earlier result, such as animating a new image with source_image_asset_id after its job completes.
AI Action Suggestions
Get 6 to 8 action names that suit the mascot, from its references or its first completed image, for free.
curl https://api.masko.ai/v1/mascots/MASCOT_ID/suggestions \
-H "Authorization: Bearer masko_YOUR_API_KEY"Items that already exist are left out, so you can call it again as the pose library grows. The names work as both name values and image prompts in a batch.
Partial acceptance
A batch is not atomic: the outer 202 does not mean every request was accepted. Check each entry in data.jobs for a real job_id, poll accepted jobs individually, and review missing entries before retrying. Never resend the whole batch after an uncertain response.
