Mockupanda
API Documentation
Back to app

Templates

Templates are the foundation of Mockupanda. This page explains how to find, use, and understand templates.

What is a Template?

A template is a pre-designed mockup scene with designated frame(s) for your artwork, and metadata like frame ratio, blending mode etc. When using the API, your artwork is automatically placed into the frame(s) and rendered into the scene, with the artwork set to fill the frame(s).

Finding Templates

Template IDs

Each template has a unique ID. Use this ID in the template_id parameter when generating mockups. Visit mockupanda.com/editor to browse all available templates and copy their IDs. Filter by:

API Endpoint

Fetch all templates programmatically:

curl -X GET https://mockupanda.com/api/v1/templates \
-H "Authorization: Bearer YOUR_API_KEY"

Response:

{
  "templates": [
    {
      "id": "bedroom-poster-01",
      "name": "Bedroom Poster",
      "category": "poster",
      "frames": 1,
      "thumbnail": "https://mockupanda.com/templates/bedroom-poster-01/thumb.jpg",
      "aspect_ratio": "2:3",
      "tags": ["bedroom", "modern", "single"]
    },
    {
      "id": "wall-diptych-01",
      "name": "Wall Diptych",
      "category": "wall-art",
      "frames": 2,
      "thumbnail": "https://mockupanda.com/templates/wall-diptych-01/thumb.jpg",
      "aspect_ratio": "2:3",
      "tags": ["wall", "diptych", "minimalist"]
    }
    // ... more templates
  ],
  "total": 120
}

Template Properties

Single-Frame Templates

Most templates have one frame. Use artwork_url to specify the artwork:

curl -X POST https://mockupanda.com/api/v1/mockups/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "template_id": "bedroom-poster-01",
  "artwork_url": "https://example.com/art.jpg"
}'

Multi-Frame Templates

Some templates have multiple frames (diptych, triptych). Use artwork_urls to map frame indices to artwork:

curl -X POST https://mockupanda.com/api/v1/mockups/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "template_id": "wall-diptych-01",
  "artwork_urls": {
    "0": "https://example.com/art1.jpg",
    "1": "https://example.com/art2.jpg"
  }
}'

Frame indices start at 0. If a template has 3 frames, use "0", "1", and "2".

Aspect Ratios

Each template expects a specific artwork aspect ratio:

  • Portrait (2:3): 2000x3000, 1000x1500, etc.
  • Square (1:1): 2000x2000, 1500x1500, etc.
  • Landscape (3:2): 3000x2000, 1500x1000, etc.

The API will crop artwork to fit the template's ratio. Preview the template to see the expected ratio.

Template Metadata

Fetch detailed metadata for a specific template:

curl -X GET https://mockupanda.com/api/v1/templates/bedroom-poster-01 \
-H "Authorization: Bearer YOUR_API_KEY"

Response:

{
  "id": "bedroom-poster-01",
  "name": "Bedroom Poster",
  "description": "Modern bedroom with a single poster on the wall",
  "category": "poster",
  "frames": 1,
  "thumbnail": "https://mockupanda.com/templates/bedroom-poster-01/thumb.jpg",
  "preview": "https://mockupanda.com/templates/bedroom-poster-01/preview.jpg",
  "aspect_ratio": "2:3",
  "dimensions": {
    "width": 2000,
    "height": 1500
  },
  "tags": ["bedroom", "modern", "single", "poster"],
  "created_at": "2024-01-15T10:30:00Z"
}

Template Updates

We regularly add new templates. Existing template IDs never change — your integration won't break when we add new templates.

Next Steps