Quickstart

Create your first mascot and get CDN URLs in 5 minutes.

Tip

Using an AI coding agent? Install the Masko AI skill to give it the API contract and generation workflow.

Warning

Prerequisites: You need an API key. Create one in the Developer dashboard.

Step 1: Create a Project

Projects group related collections together. Create one to get started.

curl -X POST https://api.masko.ai/v1/projects \
  -H "Authorization: Bearer masko_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "My App" }'

Step 2: Create a Collection

A collection represents a single mascot character. Give it a name and a prompt describing the character you want. If you create from text without reference images, Masko generates the first reference image for 1 credit.

curl -X POST https://api.masko.ai/v1/collections \
  -H "Authorization: Bearer masko_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Felix the Fox",
    "project_id": "PROJECT_ID",
    "prompt": "A friendly orange fox mascot wearing a blue scarf"
  }'

Step 3: Generate an Animation

Request a generation by specifying the type, item name, and prompts. The API returns a job ID you can poll for status.

curl -X POST https://api.masko.ai/v1/collections/COLLECTION_ID/generate \
  -H "Authorization: Bearer masko_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "animation",
    "name": "Waving hello",
    "image_prompt": "waving hello",
    "animation_prompt": "waving hello with a friendly hand wave",
    "duration": 4
  }'

Step 4: Check the Result

Poll the job endpoint until the status is completed. The response includes download URLs for all generated assets.

curl https://api.masko.ai/v1/jobs/JOB_ID \
  -H "Authorization: Bearer masko_YOUR_API_KEY"

# Response:
# {
#   "data": {
#     "id": "JOB_ID",
#     "status": "completed",
#     "type": "item_generation",
#     "urls": {
#       "video": "https://...",
#       "webm": "https://..."
#     }
#   }
# }
Tip

Once your assets are published to the CDN, the URLs are permanent and served from assets.masko.ai with global edge caching.

Next Steps