Drint API
Put 3D packaging mockups and print-ready dielines in your own product: a print-on-demand shop, a Shopify app, a design tool. Search the mockup library and generate a die at any size in SVG, PDF, DXF or CF2.
Get an API keyOpenAPI specRun in PostmanQuick start
Make a key in Drint → Account → Sign-in & security → API keys. Each key belongs to one space and counts against that space's plan. The key is shown once: keep it on your server, never in a web page.
export DRINT_KEY=drk_...
curl https://drint.io/api/v1/mockups?q=kraft+paper+bag \
-H "Authorization: Bearer $DRINT_KEY"
Endpoints
GET /api/v1/mockups?q=
Search mockups by a few words, best match first. limit up to 50, lang for names (en, vi, th, zh, ja…).
curl "https://drint.io/api/v1/mockups?q=tuck+end+box&limit=5" -H "Authorization: Bearer $DRINT_KEY"{
"query": "tuck end box",
"lang": "en",
"data": [
{ "id": "…", "name": "…", "kind": "…", "group": "…", "size_mm": "60 × 40 × 120",
"image": "https://drint.io/catalog-shots/….webp", "link": "https://drint.io/mockups/…?m=…" }
]
}GET /api/v1/mockups/:id
One mockup by its id, with its picture and a link that opens it in Drint's 3D editor.
curl https://drint.io/api/v1/mockups/MOCKUP_ID -H "Authorization: Bearer $DRINT_KEY"GET /api/v1/dielines?q=
Die structures Drint draws, and about 180 FEFCO / ECMA codes. Pass a code (0201, A20.20.03.01) or words (mailer box).
curl "https://drint.io/api/v1/dielines?q=0427" -H "Authorization: Bearer $DRINT_KEY"POST /api/v1/dielines
Generate a die file at your size. Give a code or a type, sizes in mm, and a format: svg, pdf, dxf or cf2. The download link lasts one hour.
curl https://drint.io/api/v1/dielines \
-H "Authorization: Bearer $DRINT_KEY" \
-H "Content-Type: application/json" \
-d '{"code":"0201","length_mm":300,"width_mm":200,"height_mm":150,"format":"svg"}'{
"code": "FEFCO 0201",
"type": "rsc",
"size_mm": { "L": 300, "W": 200, "H": 150 },
"format": "svg",
"download": "https://drint.io/mcp/file/…/0201-300x200x150-khuon.svg",
"expires_in": 3600,
"design_url": "https://drint.io/app?ma=FEFCO+0201&L=300&W=200&H=150",
"svg": { "used": 1, "limit": 3 }
}POST /api/v1/renders
Render a mockup with your artwork: Drint's studio light and camera, your PNG, JPEG or WebP as the print. mode label puts it on the front (a garment: the whole print area), pattern tiles it over the whole print (tile_mm). size 512 – 2048 px, format png or webp, background transparent or #rrggbb. With "wait": true the answer waits until the picture is drawn (up to 60 s); otherwise poll the job. The picture link needs no key and lasts one hour.
curl https://drint.io/api/v1/renders \
-H "Authorization: Bearer $DRINT_KEY" \
-H "Content-Type: application/json" \
-d '{"mockup_id":"MOCKUP_ID","artwork_url":"https://example.com/label.png","size":1024,"background":"transparent","wait":true}'{
"id": "rnd_…",
"status": "done",
"mockup_id": "MOCKUP_ID",
"mode": "label",
"size": 1024,
"format": "png",
"background": "transparent",
"watermark": false,
"image": "https://drint.io/api/v1/renders/rnd_…/image",
"expires_in": 3599
}GET /api/v1/renders/:id
A render job: queued, rendering, done (with image) or failed (with error).
curl https://drint.io/api/v1/renders/rnd_… -H "Authorization: Bearer $DRINT_KEY"GET /api/v1/me
The key's space, its plan, its API plan and what is left this month: renders, dielines, embed domains.
curl https://drint.io/api/v1/me -H "Authorization: Bearer $DRINT_KEY"API plans
For print shops, print-on-demand shops and app makers: the editor embedded on your own domains and the API in your product. Prices are public, checkout is by card, nothing to book. The year is billed as 10 months.
| Starter$49/monthor $490 a year | Business$199/monthor $1,990 a year | Scale$599/monthor $5,990 a year | |
|---|---|---|---|
| Mockup renders | 2,000 a month | 10,000 a month | 40,000 a month |
| Dielines (SVG, PDF, DXF, CF2) | 500 a month | 3,000 a month | 15,000 a month |
| Embed domains | 1 + 1 staging | 5 | 20 |
| Extra domain | $19/month each | $19/month each | $15/month each |
| Render size | Up to 2048 px, no watermark | Up to 4096 px, no watermark | Up to 4096 px, no watermark |
| Branding in the editor | Small “Powered by Drint” line | No Drint name: your logo and colours | No Drint name: your logo and colours |
| Render line | Shared line | Priority line | First in the line |
| Support | Email, 2 business days | Priority email, 1 business day | Set-up help by email and video, priority email within 1 business day |
| Buy monthlyYearly | Buy monthlyYearly | Buy monthlyYearly |
Try Business free for 14 days, no card: 300 renders with a watermark grid, up to 2048 px, 1 test domain. Start it in Drint → Account → API.
Past your month: packs, never a surprise bill
When the month's renders or dielines run out the API answers 402 with an upgrade_url; nothing is charged by itself. Packs are bought once, never expire and are used after the month's allowance:
- 1,000 renders $29 ($0.029 each) · Buy
- 5,000 renders $119 ($0.0238 each) · Buy
- 20,000 renders $399 ($0.020 each) · Buy
- 2,000 dielines $19 ($0.0095 each) · Buy
More than 40,000 renders a month: from $0.012 a render, write to hello@drint.io.
Without an API plan
| Free | Pro | |
|---|---|---|
| Mockup search | Yes | Yes |
| SVG dielines | 3 a month | Unlimited |
| PDF / AI, DXF, CF2 dielines | — | Yes |
| Mockup renders | 10 a month, up to 1024 px, watermark grid | 500 a month, up to 2048 px, clean |
| Embed domains | — | — |
| Rate limit | 60 requests a minute per key; 3 renders waiting at a time | |
The Print shop plan includes 1 embed domain. See all Drint plans.
Errors
Every error is JSON with a stable code and a message you can show:
HTTP/1.1 402 Payment Required
{
"error": {
"code": "quota_exceeded",
"message": "The free plan does not include PDF / AI dielines. An API plan (from Starter) includes dielines in every format.",
"plan": "free",
"upgrade_url": "https://drint.io/developers/buy?plan=api-starter&space=user-…&utm_source=api"
}
}
| Status | code |
|---|---|
| 400 | invalid_request, invalid_json, invalid_artwork, artwork_unreachable |
| 401 | missing_api_key, invalid_api_key |
| 402 | quota_exceeded, plan_limit |
| 404 | not_found |
| 429 | rate_limited, too_many_renders (see Retry-After) |
| 503 | busy, renderer_unavailable (see Retry-After) |
Embed the 3D editor in your website
For print shops and packaging sellers: put Drint's 3D editor on your own site. Your customers pick a mockup, type the size, upload their design and turn it in 3D; when they press Send design you get the mockup picture, the print file and the dieline, in the page and on Drint.
- In Drint → Account → Sign-in & security → Embed keys, make a key and list your website's domains (
yourshop.com,*.yourshop.com). The editor opens only on those domains; anywhere else the browser refuses to show it. - Paste this where the editor should appear:
<div id="drint-editor"></div>
<script src="https://drint.io/embed.js"></script>
<script>
Drint.open({
el: '#drint-editor',
key: 'dre_...', // your embed key (public: it only works on your domains)
mockup: 'MOCKUP_ID', // optional: start on one mockup; else the library
size: { L: 200, W: 80, H: 260 },// optional, mm
lang: 'en', // 'en', 'vi' or 'ar' (right to left)
customer: { name: 'Ann', email: 'ann@example.com', ref: 'cart-1042' }, // optional
onDone: function (result) {
// result.image (Blob, PNG 1600 px), result.print (Blob), result.dieline (SVG text or null),
// result.files = links valid 24 h, result.order = { id, track } on a print shop's space
console.log(result);
}
});
</script>
Try it on your own machine first: add localhost:PORT to the key's domains.
The result
{
"id": "des_…",
"mockup": "MOCKUP_ID",
"variant": 0,
"size": { "L": 200, "W": 80, "H": 260 },
"files": {
"mockup": "https://drint.io/api/embed/file/…/mockup.png",
"print": "https://drint.io/api/embed/file/…/print.png",
"dieline": "https://drint.io/api/embed/file/…/dieline.svg"
},
"customer": { "name": "Ann", "phone": "", "email": "ann@example.com", "note": "", "ref": "cart-1042" },
"order": { "id": "DH-2026-0042", "track": "https://drint.io/don/…" },
"page": "https://yourshop.com",
"created_at": "2026-11-03T09:00:00.000Z"
}
On a print shop's space each design also lands in Orders on Drint, with its files. The editor sends the result only to your page's own origin.
Webhook
Give the key a webhook (https) and Drint POSTs the same JSON there with "event": "design.completed". Check it came from Drint with the key's webhook secret:
// Node: header X-Drint-Signature: t=<unix seconds>,v1=<hex>
const [t, v1] = req.headers['x-drint-signature'].split(',').map((p) => p.split('=')[1]);
const mac = crypto.createHmac('sha256', process.env.DRINT_WEBHOOK_SECRET).update(t + '.' + rawBody).digest('hex');
const ok = crypto.timingSafeEqual(Buffer.from(mac), Buffer.from(v1)) && Math.abs(Date.now() / 1000 - t) < 300;
| Print shop space | Starter | Business / Scale | |
|---|---|---|---|
| Embedded editor | 1 domain | 1 + 1 staging | 5 / 20 domains |
| Dieline in the result | Yes | Yes (trial: watermark grid, no dieline) | Yes |
| Your logo instead of Drint's | — | — | Yes |
| Designs land in Orders | On a print shop's space | ||
The editor opens on the key's domains that your API plan also lists (Account → API plan & embed domains); localhost always works for testing.
AI assistants
For Claude, ChatGPT, Cursor and VS Code, Drint also has an MCP server at https://drint.io/mcp.