API Documentation

Integrate MockupKit's mockup generation capabilities into your applications with our RESTful API.

Authentication

All API requests require authentication using a Bearer token. To get your API key:

  1. Create an account at MockupKit Dashboard
  2. Navigate to the API Keys page
  3. Create a new API Key and use the key as a Bearer token
  4. Include it in the Authorization header of all requests

Example Request Header

Authorization: Bearer YOUR_API_KEY_HERE
Content-Type: application/json

Security Best Practices

  • Never expose your API key in client-side code or public repositories
  • Use environment variables to store your API key
  • Rotate your API keys regularly
  • Monitor your API usage in the dashboard

Base URL

https://api.mockupkit.app

All API endpoints are prefixed with /v1

GET

Get Templates

Endpoint

GET https://api.mockupkit.app/v1/templates

Description

Retrieves a list of all available mockup templates. Each template includes metadata such as template ID, name, filename, thumbnail URL, smart object information (including dimensions and layer details), file size, upload date, and associated collections.

Response Example

{
  "success": true,
  "templates": [
    {
      "template_id": "004bfee0-8243-46df-9d5a-41bd1b018942",
      "name": "Round Ceramic",
      "filename": "Round Ceramic 3.psd",
      "smart_objects": [
        {
          "width": 1067,
          "inner_canvas_width": 972,
          "layer_id": "smart_0",
          "inner_canvas_height": 973,
          "layer_name": "Design",
          "height": 1067
        }
      ],
      "file_size": "9.31 MB",
      "uploaded_at": "2025-09-19T15:16:14.463Z",
      "thumbnail_url": "thumbnail_url",
      "collections": []
    },
    {
      "template_id": "template_id_2",
      "name": "11x14 Poster",
      "filename": "11x14 Poster.psd",
      "smart_objects": [
        {
          "width": 1520,
          "inner_canvas_width": 1520,
          "layer_id": "smart_0",
          "inner_canvas_height": 1938,
          "layer_name": "Design",
          "height": 1938
        }
      ],
      "file_size": "1.45 MB",
      "uploaded_at": "2025-10-31T16:27:58.188Z",
      "thumbnail_url": "thumbnail_url",
      "collections": []
    }
  ]
}
GET

Get Collections

Endpoint

GET https://api.mockupkit.app/v1/collections

Description

Retrieves a list of all template collections. Collections group related templates together (e.g., "Gift Wrap", "T-Shirt Mockups", "Mug Mockups"). Each collection includes the collection ID, title, description, color, template count, array of template IDs, and creation/update timestamps.

Response Example

{
  "success": true,
  "collections": [
    {
      "collection_id": "36209421-29a2-4b1e-9d23-0af0fe981ed2",
      "title": "Gift Wrap",
      "description": "Bring your patterns to life with gift wrap mockups that look ready to unwrap",
      "color": "blue",
      "template_count": 14,
      "template_ids": [
        "template_id_1",
        "template_id_2",
        "template_id_3"
      ],
      "created_at": "2025-09-21T17:48:23.326Z",
      "updated_at": "2025-09-21T18:48:20.161Z"
    }
  ]
}
POST

Single Template Render

Endpoint

POST https://api.mockupkit.app/v1/render

Description

Generates a mockup by rendering a single template with your artwork. Returns the rendered mockup URL and processing information.

Request Body

ParameterTypeRequiredDescription
template_idstringYesUnique identifier of the template
artwork_urlstring (URL)YesPublic URL of the artwork image to use
output_formatstringYesOutput format: "jpg" or "png"

Request Example

{
  "template_id": "004bfee0-8243-46df-9d5a-41bd1b018942",
  "artwork_url": "https://images.unsplash.com/photo-1557682250-33bd709cbe85?w=800",
  "output_format": "jpg"
}

Response Example

{
  "success": true,
  "batch": true,
  "total_templates": 1,
  "successful_renders": 1,
  "failed_renders": 0,
  "total_processing_time": "2787ms",
  "collection_title": null,
  "render_credits": "0/99999999",
  "usage_info": {
    "current_usage": 0,
    "limit": 99999999,
    "plan": "professional",
    "remaining": 99999999
  },
  "results": [
    {
      "success": true,
      "job_id": "06a95863-bd5e-4e08-9aae-7d228d2ca483",
      "template_id": "004bfee0-8243-46df-9d5a-41bd1b018942",
      "status": "completed",
      "render_url": "https://render.mockupkit.app/eu-west-2:1c2102c9-e87d-ce02-2bdb-1f7e6f06276a/06a95863-bd5e-4e08-9aae-7d228d2ca483.jpg",
      "processing_time": "2770ms"
    }
  ]
}
POST

Batch Template Render

Endpoint

POST https://api.mockupkit.app/v1/render

Description

Generates mockups for multiple templates using a single artwork. Perfect for creating variations of your design across different product types or angles.

Request Body

ParameterTypeRequiredDescription
template_idsstring[]YesArray of template IDs to render
artwork_urlstring (URL)YesPublic URL of the artwork image
output_formatstringYesOutput format: "jpg" or "png"

Request Example

{
  "template_ids": [
    "00028c53-9ccb-4044-8d72-6b196e246c01",
    "014c4fcb-be09-4904-903d-2438b70ccedb"
  ],
  "artwork_url": "https://images.unsplash.com/photo-1557682250-33bd709cbe85?w=800",
  "output_format": "jpg"
}

Batch Processing

The response will contain a results array with one entry per template. All renders are processed in parallel for optimal performance.

POST

Collection Render

Endpoint

POST https://api.mockupkit.app/v1/render

Description

Generates mockups for all templates within a collection using a single artwork. This is ideal for product line presentations where you want to showcase your design across an entire collection.

Request Body

ParameterTypeRequiredDescription
collection_idstringYesUnique identifier of the collection
artwork_urlstring (URL)YesPublic URL of the artwork image
output_formatstringYesOutput format: "jpg" or "png"

Request Example

{
  "collection_id": "7b6d0216-9add-4c5a-8ee9-f582066137bd",
  "artwork_url": "https://images.unsplash.com/photo-1557682250-33bd709cbe85?w=800",
  "output_format": "jpg"
}

Use Case

Perfect for generating product line mockups. For example, render your logo design across all t-shirt styles in the "T-Shirt Mockups" collection with a single API call.

Response Fields

Common Response Fields

FieldTypeDescription
successbooleanWhether the request was successful
batchbooleanIndicates if this was a batch operation
total_templatesnumberTotal number of templates processed
successful_rendersnumberNumber of successfully rendered mockups
failed_rendersnumberNumber of failed renders
total_processing_timestringTotal time taken to process all renders
render_creditsstringCurrent usage and limit in format "used/total"
resultsarrayArray of render results, each containing job_id, template_id, status, render_url, and processing_time
usage_infoobjectInformation about current plan usage including current_usage, limit, plan, and remaining credits

Error Handling

The API uses standard HTTP status codes to indicate success or failure:

  • 200 OK - Request successful
  • 400 Bad Request - Invalid request parameters
  • 401 Unauthorized - Invalid or missing API key
  • 429 Too Many Requests - Rate limit exceeded
  • 500 Internal Server Error - Server error

Error Response Format

{
  "success": false,
  "error": "Error message describing what went wrong",
  "details": "Additional error details"
}

Rate Limits & Usage

API usage is based on your subscription plan. Each successful render consumes one credit from your plan's limit.

Usage Information

The API response includes usage_info showing:

  • current_usage - Credits used in current billing period
  • limit - Total credits available on your plan
  • plan - Your current subscription plan
  • remaining - Credits remaining in current period

Ready to Get Started?

Create your account and start generating professional mockups in minutes.