Create from Text
Describe your mascot and pick a style - the API generates the reference image.
Two Approaches
You can either preview multiple variations first (recommended) or create a collection directly in a single call. The preview approach costs 1 credit and gives you 4 options to choose from. Direct creation auto-generates one reference and builds the collection immediately.
Step 1: Browse Styles
/v1/stylesFetch the list of available art styles. Each style has a preset ID you can pass to the generation endpoint.
curl https://api.masko.ai/v1/styles \
-H "Authorization: Bearer masko_YOUR_API_KEY"Step 2: Generate Previews
/v1/generate/previewGenerate multiple preview images from your text description. This lets you pick the best variation before committing to a collection.
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": "3d-render",
"count": 4
}'Step 3: Create Collection
/v1/collectionsTake the preview URL you like best and use it as a reference image to create your collection.
curl -X POST https://api.masko.ai/v1/collections \
-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": [
"https://api.masko.ai/v1/previews/preview_2.png"
]
}'CDN publishing is enabled by default on new collections. You can also set animation_sizes at creation time to define which resolutions to generate (e.g. ["512x512", "256x256", "128x128"]).
Shortcut: Direct Creation
If you don't need to preview, you can create a collection in one call. The API auto-generates a reference image (1 credit) from your prompt. Optionally pass a style to apply a visual preset.
curl -X POST https://api.masko.ai/v1/collections \
-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"
}'