Code examples
Python
import requests
response = requests.post(
"https://api.meetmockup.com/api/v1/mockups/generate",
headers={
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"design_url": "https://meetmockup.com/samples/sample-design-1.png",
"template_id": "white_male_front",
"placement": {"scale": 0.4, "offset_x": 0, "offset_y": -50},
},
)
data = response.json()
Node.js
const response = await fetch(
"https://api.meetmockup.com/api/v1/mockups/generate",
{
method: "POST",
headers: {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
design_url: "https://meetmockup.com/samples/sample-design-1.png",
template_id: "white_male_front",
placement: { scale: 0.4, offset_x: 0, offset_y: -50 },
}),
}
);
const data = await response.json();
curl
curl -X POST https://api.meetmockup.com/api/v1/mockups/generate \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"design_url": "https://meetmockup.com/samples/sample-design-1.png",
"template_id": "white_male_front",
"placement": {
"scale": 0.4,
"offset_x": 0,
"offset_y": -50
}
}'