API Documentation
Integrate MockupKit's mockup generation capabilities into your applications with our RESTful API.
Quick Navigation
Authentication
All API requests require authentication using a Bearer token. To get your API key:
- Create an account at MockupKit Dashboard
- Navigate to the API Keys page
- Create a new API Key and use the key as a Bearer token
- Include it in the
Authorizationheader of all requests
Example Request Header
Authorization: Bearer YOUR_API_KEY_HERE
Content-Type: application/jsonSecurity 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
All API endpoints are prefixed with /v1
Get Templates
Endpoint
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 Collections
Endpoint
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"
}
]
}Single Template Render
Endpoint
Description
Generates a mockup by rendering a single template with your artwork. Returns the rendered mockup URL and processing information.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| template_id | string | Yes | Unique identifier of the template |
| artwork_url | string (URL) | Yes | Public URL of the artwork image to use |
| output_format | string | Yes | Output 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"
}
]
}Batch Template Render
Endpoint
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
| Parameter | Type | Required | Description |
|---|---|---|---|
| template_ids | string[] | Yes | Array of template IDs to render |
| artwork_url | string (URL) | Yes | Public URL of the artwork image |
| output_format | string | Yes | Output 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.
Collection Render
Endpoint
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
| Parameter | Type | Required | Description |
|---|---|---|---|
| collection_id | string | Yes | Unique identifier of the collection |
| artwork_url | string (URL) | Yes | Public URL of the artwork image |
| output_format | string | Yes | Output 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
| Field | Type | Description |
|---|---|---|
| success | boolean | Whether the request was successful |
| batch | boolean | Indicates if this was a batch operation |
| total_templates | number | Total number of templates processed |
| successful_renders | number | Number of successfully rendered mockups |
| failed_renders | number | Number of failed renders |
| total_processing_time | string | Total time taken to process all renders |
| render_credits | string | Current usage and limit in format "used/total" |
| results | array | Array of render results, each containing job_id, template_id, status, render_url, and processing_time |
| usage_info | object | Information 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 successful400 Bad Request- Invalid request parameters401 Unauthorized- Invalid or missing API key429 Too Many Requests- Rate limit exceeded500 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 periodlimit- Total credits available on your planplan- Your current subscription planremaining- Credits remaining in current period
Ready to Get Started?
Create your account and start generating professional mockups in minutes.