All guidesBluepic platform

API reference

Every endpoint in the Bluepic developer API — authentication, rendering a Studio template, rendering a raw IDML file, checking your credit balance, and the errors you'll actually hit.

July 16, 2026·7 min read
Diagram: API reference

Base URL

https://api.bluepic.io

Every path below is relative to that. There's no staging/sandbox host — the same API key works everywhere, and the free monthly credits (see Credits) are the only thing separating experimentation from production traffic.

Authentication

There are two different credentials in play, and mixing them up is the most common integration mistake:

Used forHeader
API keyPOST /api/render, POST /api/idml/render — the endpoints your backend callsAuthorization: <key>no Bearer prefix
Studio session token/api/api-keys, GET /api/idml/me — managing keys and checking balance from your own accountAuthorization: Bearer <token>

For almost every integration, you only need the first row. Grab your key once from the account page — it's created for you on first visit — and treat it like any other server-side secret: never ship it to a browser or mobile client.

POST https://api.bluepic.io/api/render
Authorization: bpk_xxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

A key that starts with Bearer is rejected — that prefix is reserved for the session-token routes above, which authenticate you, not your backend.

Render a Studio template

POST /api/render

This is the endpoint for templates you built visually in Bluepic Studio. You send the template's ID and the field values to fill in; Bluepic renders it server-side and hands back the image.

{
  "templateId": "efa8ff2c-262b-4488-b8cf-e01521c6fbb5",
  "data": {
    "headline_text_content": "Ship it Friday",
    "avatar_image": { "src": "https://cdn.example.com/avatar.jpg" }
  },
  "format": "png"
}
FieldTypeDefaultNotes
templateIdstring— requiredThe UUID from the template's editor URL. Must belong to your account.
dataobject{}Keys are the input-field names you defined in Studio. Anything you omit keeps its design-time default.
formatpng | jpeg | pdf | svg | webp | gifpng
enginepuppeteer | resvgpuppeteerSee engine trade-offs — same choice applies here.
width / heightnumbertemplate sizeOverride the rendered pixel size.
dpi / qualitynumberResolution and compression, where the format supports them.

Response is the rendered file's raw bytes with a matching Content-Type — no wrapper JSON, no polling. Fetch it, save it, or pipe it straight into an <img> or email attachment.

const res = await fetch('https://api.bluepic.io/api/render', {
  method: 'POST',
  headers: { Authorization: apiKey, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    templateId: 'efa8ff2c-262b-4488-b8cf-e01521c6fbb5',
    data: { headline_text_content: 'Ship it Friday' },
  }),
});
const png = await res.blob();

Render a raw IDML file

POST /api/idml/render
Content-Type: multipart/form-data

Use this when your source of truth is an InDesign file rather than a Studio template — no upload step, no template to manage, just the .idml export and whatever assets it links to, on every request.

[email protected]
[email protected]
[email protected]

Assets are matched back to the document by filename. Options go as query params:

ParamWhat it does
formatpng, jpeg, pdf or svg
pagesall, or a 1-based list like 1,3,5
enginepuppeteer (default, full fidelity) or resvg (faster raster, no Chromium)
dpi / qualityOutput resolution / compression
textOverridesJSON {"<pageIndex>:<elementId>": "value"} — see Automate InDesign projects for the full walkthrough

Multiple pages come back as one merged PDF (format=pdf) or a zip (everything else) — same one-request, one-response shape as the Studio endpoint. Full detail, including a complete pipeline example, is in Automate InDesign projects.

Check your balance

GET /api/idml/me
Authorization: Bearer <studio session token>
{
  "plan": "free",
  "monthlyCredits": 100,
  "period": "2026-07",
  "used": 34,
  "remaining": 66,
  "resetsAt": "2026-08-01T00:00:00.000Z",
  "upgradeUrl": "https://bluepic.io/pricing"
}

This one uses your session token, not your API key — it's meant for your own dashboard or a build script running as you, not for a server checking on behalf of end users. Despite the /idml/ in the path, it covers both render endpoints — 1 credit is 1 rendered page, regardless of which one produced it.

Credits

Every account gets 100 free credits a month, shared across /api/render and /api/idml/render. A render that produces multiple pages costs one credit per page. Once you're out, both endpoints return 402 until the next monthly reset (see resetsAt above) or an upgrade.

Errors

StatusMeaning
400Malformed request — check the field against the tables above.
401Missing or invalid Authorization header.
402Out of credits this period. Body includes upgradeUrl.
404templateId doesn't exist, or isn't owned by your account.
500Render failed server-side. Body includes details — worth attaching to a support request.

Next steps

Back to all guidesGet your API key