[{"data":1,"prerenderedAt":955},["ShallowReactive",2],{"\u002Fdocs\u002Fapi-reference":3},{"id":4,"title":5,"body":6,"category":944,"date":945,"description":946,"extension":947,"heroImage":948,"meta":949,"navigation":950,"path":951,"readingMinutes":243,"seo":952,"stem":953,"tool":944,"__hash__":954},"docs\u002Fdocs\u002Fapi-reference.md","API reference",{"type":7,"value":8,"toc":934},"minimark",[9,14,25,35,39,42,117,125,131,142,146,152,160,258,411,422,551,555,561,568,574,581,672,681,685,691,786,793,796,819,823,899,903,930],[10,11,13],"h2",{"id":12},"base-url","Base URL",[15,16,21],"pre",{"className":17,"code":19,"language":20},[18],"language-text","https:\u002F\u002Fapi.bluepic.io\n","text",[22,23,19],"code",{"__ignoreMap":24},"",[26,27,28,29,34],"p",{},"Every path below is relative to that. There's no staging\u002Fsandbox host — the same API key works everywhere, and the free monthly credits (see ",[30,31,33],"a",{"href":32},"#credits","Credits",") are the only thing separating experimentation from production traffic.",[10,36,38],{"id":37},"authentication","Authentication",[26,40,41],{},"There are two different credentials in play, and mixing them up is the most common integration mistake:",[43,44,45,60],"table",{},[46,47,48],"thead",{},[49,50,51,54,57],"tr",{},[52,53],"th",{},[52,55,56],{},"Used for",[52,58,59],{},"Header",[61,62,63,96],"tbody",{},[49,64,65,72,82],{},[66,67,68],"td",{},[69,70,71],"strong",{},"API key",[66,73,74,77,78,81],{},[22,75,76],{},"POST \u002Fapi\u002Frender",", ",[22,79,80],{},"POST \u002Fapi\u002Fidml\u002Frender"," — the endpoints your backend calls",[66,83,84,87,88,91,92,95],{},[22,85,86],{},"Authorization: \u003Ckey>"," — ",[69,89,90],{},"no"," ",[22,93,94],{},"Bearer "," prefix",[49,97,98,103,112],{},[66,99,100],{},[69,101,102],{},"Studio session token",[66,104,105,77,108,111],{},[22,106,107],{},"\u002Fapi\u002Fapi-keys",[22,109,110],{},"GET \u002Fapi\u002Fidml\u002Fme"," — managing keys and checking balance from your own account",[66,113,114],{},[22,115,116],{},"Authorization: Bearer \u003Ctoken>",[26,118,119,120,124],{},"For almost every integration, you only need the first row. Grab your key once from the ",[30,121,123],{"href":122},"\u002Fidml\u002Faccount","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.",[15,126,129],{"className":127,"code":128,"language":20},[18],"POST https:\u002F\u002Fapi.bluepic.io\u002Fapi\u002Frender\nAuthorization: bpk_xxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n",[22,130,128],{"__ignoreMap":24},[26,132,133,134,136,137,141],{},"A key that starts with ",[22,135,94],{}," is rejected — that prefix is reserved for the session-token routes above, which authenticate ",[138,139,140],"em",{},"you",", not your backend.",[10,143,145],{"id":144},"render-a-studio-template","Render a Studio template",[15,147,150],{"className":148,"code":149,"language":20},[18],"POST \u002Fapi\u002Frender\n",[22,151,149],{"__ignoreMap":24},[26,153,154,155,159],{},"This is the endpoint for templates you built visually in ",[30,156,158],{"href":157},"\u002Fdocs\u002Fbuilding-templates-in-bluepic-studio","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.",[15,161,165],{"className":162,"code":163,"language":164,"meta":24,"style":24},"language-json shiki shiki-themes github-dark","{\n  \"templateId\": \"efa8ff2c-262b-4488-b8cf-e01521c6fbb5\",\n  \"data\": {\n    \"headline_text_content\": \"Ship it Friday\",\n    \"avatar_image\": { \"src\": \"https:\u002F\u002Fcdn.example.com\u002Favatar.jpg\" }\n  },\n  \"format\": \"png\"\n}\n","json",[22,166,167,176,193,202,215,235,241,252],{"__ignoreMap":24},[168,169,172],"span",{"class":170,"line":171},"line",1,[168,173,175],{"class":174},"s95oV","{\n",[168,177,179,183,186,190],{"class":170,"line":178},2,[168,180,182],{"class":181},"sDLfK","  \"templateId\"",[168,184,185],{"class":174},": ",[168,187,189],{"class":188},"sU2Wk","\"efa8ff2c-262b-4488-b8cf-e01521c6fbb5\"",[168,191,192],{"class":174},",\n",[168,194,196,199],{"class":170,"line":195},3,[168,197,198],{"class":181},"  \"data\"",[168,200,201],{"class":174},": {\n",[168,203,205,208,210,213],{"class":170,"line":204},4,[168,206,207],{"class":181},"    \"headline_text_content\"",[168,209,185],{"class":174},[168,211,212],{"class":188},"\"Ship it Friday\"",[168,214,192],{"class":174},[168,216,218,221,224,227,229,232],{"class":170,"line":217},5,[168,219,220],{"class":181},"    \"avatar_image\"",[168,222,223],{"class":174},": { ",[168,225,226],{"class":181},"\"src\"",[168,228,185],{"class":174},[168,230,231],{"class":188},"\"https:\u002F\u002Fcdn.example.com\u002Favatar.jpg\"",[168,233,234],{"class":174}," }\n",[168,236,238],{"class":170,"line":237},6,[168,239,240],{"class":174},"  },\n",[168,242,244,247,249],{"class":170,"line":243},7,[168,245,246],{"class":181},"  \"format\"",[168,248,185],{"class":174},[168,250,251],{"class":188},"\"png\"\n",[168,253,255],{"class":170,"line":254},8,[168,256,257],{"class":174},"}\n",[43,259,260,276],{},[46,261,262],{},[49,263,264,267,270,273],{},[52,265,266],{},"Field",[52,268,269],{},"Type",[52,271,272],{},"Default",[52,274,275],{},"Notes",[61,277,278,294,312,346,373,393],{},[49,279,280,285,288,291],{},[66,281,282],{},[22,283,284],{},"templateId",[66,286,287],{},"string",[66,289,290],{},"— required",[66,292,293],{},"The UUID from the template's editor URL. Must belong to your account.",[49,295,296,301,304,309],{},[66,297,298],{},[22,299,300],{},"data",[66,302,303],{},"object",[66,305,306],{},[22,307,308],{},"{}",[66,310,311],{},"Keys are the input-field names you defined in Studio. Anything you omit keeps its design-time default.",[49,313,314,319,340,344],{},[66,315,316],{},[22,317,318],{},"format",[66,320,321,324,325,324,328,324,331,324,334,324,337],{},[22,322,323],{},"png"," | ",[22,326,327],{},"jpeg",[22,329,330],{},"pdf",[22,332,333],{},"svg",[22,335,336],{},"webp",[22,338,339],{},"gif",[66,341,342],{},[22,343,323],{},[66,345],{},[49,347,348,353,361,365],{},[66,349,350],{},[22,351,352],{},"engine",[66,354,355,324,358],{},[22,356,357],{},"puppeteer",[22,359,360],{},"resvg",[66,362,363],{},[22,364,357],{},[66,366,367,368,372],{},"See ",[30,369,371],{"href":370},"\u002Fdocs\u002Fautomate-indesign-projects#engine-fidelity-vs-throughput","engine trade-offs"," — same choice applies here.",[49,374,375,384,387,390],{},[66,376,377,380,381],{},[22,378,379],{},"width"," \u002F ",[22,382,383],{},"height",[66,385,386],{},"number",[66,388,389],{},"template size",[66,391,392],{},"Override the rendered pixel size.",[49,394,395,403,405,408],{},[66,396,397,380,400],{},[22,398,399],{},"dpi",[22,401,402],{},"quality",[66,404,386],{},[66,406,407],{},"—",[66,409,410],{},"Resolution and compression, where the format supports them.",[26,412,413,414,417,418,421],{},"Response is the rendered file's raw bytes with a matching ",[22,415,416],{},"Content-Type"," — no wrapper JSON, no polling. Fetch it, save it, or pipe it straight into an ",[22,419,420],{},"\u003Cimg>"," or email attachment.",[15,423,427],{"className":424,"code":425,"language":426,"meta":24,"style":24},"language-js shiki shiki-themes github-dark","const res = await fetch('https:\u002F\u002Fapi.bluepic.io\u002Fapi\u002Frender', {\n  method: 'POST',\n  headers: { Authorization: apiKey, 'Content-Type': 'application\u002Fjson' },\n  body: JSON.stringify({\n    templateId: 'efa8ff2c-262b-4488-b8cf-e01521c6fbb5',\n    data: { headline_text_content: 'Ship it Friday' },\n  }),\n});\nconst png = await res.blob();\n","js",[22,428,429,457,467,483,500,510,520,525,530],{"__ignoreMap":24},[168,430,431,435,438,441,444,448,451,454],{"class":170,"line":171},[168,432,434],{"class":433},"snl16","const",[168,436,437],{"class":181}," res",[168,439,440],{"class":433}," =",[168,442,443],{"class":433}," await",[168,445,447],{"class":446},"svObZ"," fetch",[168,449,450],{"class":174},"(",[168,452,453],{"class":188},"'https:\u002F\u002Fapi.bluepic.io\u002Fapi\u002Frender'",[168,455,456],{"class":174},", {\n",[168,458,459,462,465],{"class":170,"line":178},[168,460,461],{"class":174},"  method: ",[168,463,464],{"class":188},"'POST'",[168,466,192],{"class":174},[168,468,469,472,475,477,480],{"class":170,"line":195},[168,470,471],{"class":174},"  headers: { Authorization: apiKey, ",[168,473,474],{"class":188},"'Content-Type'",[168,476,185],{"class":174},[168,478,479],{"class":188},"'application\u002Fjson'",[168,481,482],{"class":174}," },\n",[168,484,485,488,491,494,497],{"class":170,"line":204},[168,486,487],{"class":174},"  body: ",[168,489,490],{"class":181},"JSON",[168,492,493],{"class":174},".",[168,495,496],{"class":446},"stringify",[168,498,499],{"class":174},"({\n",[168,501,502,505,508],{"class":170,"line":217},[168,503,504],{"class":174},"    templateId: ",[168,506,507],{"class":188},"'efa8ff2c-262b-4488-b8cf-e01521c6fbb5'",[168,509,192],{"class":174},[168,511,512,515,518],{"class":170,"line":237},[168,513,514],{"class":174},"    data: { headline_text_content: ",[168,516,517],{"class":188},"'Ship it Friday'",[168,519,482],{"class":174},[168,521,522],{"class":170,"line":243},[168,523,524],{"class":174},"  }),\n",[168,526,527],{"class":170,"line":254},[168,528,529],{"class":174},"});\n",[168,531,533,535,538,540,542,545,548],{"class":170,"line":532},9,[168,534,434],{"class":433},[168,536,537],{"class":181}," png",[168,539,440],{"class":433},[168,541,443],{"class":433},[168,543,544],{"class":174}," res.",[168,546,547],{"class":446},"blob",[168,549,550],{"class":174},"();\n",[10,552,554],{"id":553},"render-a-raw-idml-file","Render a raw IDML file",[15,556,559],{"className":557,"code":558,"language":20},[18],"POST \u002Fapi\u002Fidml\u002Frender\nContent-Type: multipart\u002Fform-data\n",[22,560,558],{"__ignoreMap":24},[26,562,563,564,567],{},"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 ",[22,565,566],{},".idml"," export and whatever assets it links to, on every request.",[15,569,572],{"className":570,"code":571,"language":20},[18],"idml=@certificate.idml\nassets=@seal.png\nassets=@Signature-Font.ttf\n",[22,573,571],{"__ignoreMap":24},[26,575,576,577,580],{},"Assets are matched back to the document ",[69,578,579],{},"by filename",". Options go as query params:",[43,582,583,593],{},[46,584,585],{},[49,586,587,590],{},[52,588,589],{},"Param",[52,591,592],{},"What it does",[61,594,595,612,628,642,653],{},[49,596,597,601],{},[66,598,599],{},[22,600,318],{},[66,602,603,77,605,77,607,609,610],{},[22,604,323],{},[22,606,327],{},[22,608,330],{}," or ",[22,611,333],{},[49,613,614,619],{},[66,615,616],{},[22,617,618],{},"pages",[66,620,621,624,625],{},[22,622,623],{},"all",", or a 1-based list like ",[22,626,627],{},"1,3,5",[49,629,630,634],{},[66,631,632],{},[22,633,352],{},[66,635,636,638,639,641],{},[22,637,357],{}," (default, full fidelity) or ",[22,640,360],{}," (faster raster, no Chromium)",[49,643,644,650],{},[66,645,646,380,648],{},[22,647,399],{},[22,649,402],{},[66,651,652],{},"Output resolution \u002F compression",[49,654,655,660],{},[66,656,657],{},[22,658,659],{},"textOverrides",[66,661,662,663,666,667,671],{},"JSON ",[22,664,665],{},"{\"\u003CpageIndex>:\u003CelementId>\": \"value\"}"," — see ",[30,668,670],{"href":669},"\u002Fdocs\u002Fautomate-indesign-projects","Automate InDesign projects"," for the full walkthrough",[26,673,674,675,678,679,493],{},"Multiple pages come back as one merged PDF (",[22,676,677],{},"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 ",[30,680,670],{"href":669},[10,682,684],{"id":683},"check-your-balance","Check your balance",[15,686,689],{"className":687,"code":688,"language":20},[18],"GET \u002Fapi\u002Fidml\u002Fme\nAuthorization: Bearer \u003Cstudio session token>\n",[22,690,688],{"__ignoreMap":24},[15,692,694],{"className":162,"code":693,"language":164,"meta":24,"style":24},"{\n  \"plan\": \"free\",\n  \"monthlyCredits\": 100,\n  \"period\": \"2026-07\",\n  \"used\": 34,\n  \"remaining\": 66,\n  \"resetsAt\": \"2026-08-01T00:00:00.000Z\",\n  \"upgradeUrl\": \"https:\u002F\u002Fbluepic.io\u002Fpricing\"\n}\n",[22,695,696,700,712,724,736,748,760,772,782],{"__ignoreMap":24},[168,697,698],{"class":170,"line":171},[168,699,175],{"class":174},[168,701,702,705,707,710],{"class":170,"line":178},[168,703,704],{"class":181},"  \"plan\"",[168,706,185],{"class":174},[168,708,709],{"class":188},"\"free\"",[168,711,192],{"class":174},[168,713,714,717,719,722],{"class":170,"line":195},[168,715,716],{"class":181},"  \"monthlyCredits\"",[168,718,185],{"class":174},[168,720,721],{"class":181},"100",[168,723,192],{"class":174},[168,725,726,729,731,734],{"class":170,"line":204},[168,727,728],{"class":181},"  \"period\"",[168,730,185],{"class":174},[168,732,733],{"class":188},"\"2026-07\"",[168,735,192],{"class":174},[168,737,738,741,743,746],{"class":170,"line":217},[168,739,740],{"class":181},"  \"used\"",[168,742,185],{"class":174},[168,744,745],{"class":181},"34",[168,747,192],{"class":174},[168,749,750,753,755,758],{"class":170,"line":237},[168,751,752],{"class":181},"  \"remaining\"",[168,754,185],{"class":174},[168,756,757],{"class":181},"66",[168,759,192],{"class":174},[168,761,762,765,767,770],{"class":170,"line":243},[168,763,764],{"class":181},"  \"resetsAt\"",[168,766,185],{"class":174},[168,768,769],{"class":188},"\"2026-08-01T00:00:00.000Z\"",[168,771,192],{"class":174},[168,773,774,777,779],{"class":170,"line":254},[168,775,776],{"class":181},"  \"upgradeUrl\"",[168,778,185],{"class":174},[168,780,781],{"class":188},"\"https:\u002F\u002Fbluepic.io\u002Fpricing\"\n",[168,783,784],{"class":170,"line":532},[168,785,257],{"class":174},[26,787,788,789,792],{},"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 ",[22,790,791],{},"\u002Fidml\u002F"," in the path, it covers both render endpoints — 1 credit is 1 rendered page, regardless of which one produced it.",[10,794,33],{"id":795},"credits",[26,797,798,799,802,803,806,807,810,811,814,815,818],{},"Every account gets ",[69,800,801],{},"100 free credits a month",", shared across ",[22,804,805],{},"\u002Fapi\u002Frender"," and ",[22,808,809],{},"\u002Fapi\u002Fidml\u002Frender",". A render that produces multiple pages costs one credit per page. Once you're out, both endpoints return ",[22,812,813],{},"402"," until the next monthly reset (see ",[22,816,817],{},"resetsAt"," above) or an upgrade.",[10,820,822],{"id":821},"errors","Errors",[43,824,825,835],{},[46,826,827],{},[49,828,829,832],{},[52,830,831],{},"Status",[52,833,834],{},"Meaning",[61,836,837,847,861,873,885],{},[49,838,839,844],{},[66,840,841],{},[22,842,843],{},"400",[66,845,846],{},"Malformed request — check the field against the tables above.",[49,848,849,854],{},[66,850,851],{},[22,852,853],{},"401",[66,855,856,857,860],{},"Missing or invalid ",[22,858,859],{},"Authorization"," header.",[49,862,863,867],{},[66,864,865],{},[22,866,813],{},[66,868,869,870,493],{},"Out of credits this period. Body includes ",[22,871,872],{},"upgradeUrl",[49,874,875,880],{},[66,876,877],{},[22,878,879],{},"404",[66,881,882,884],{},[22,883,284],{}," doesn't exist, or isn't owned by your account.",[49,886,887,892],{},[66,888,889],{},[22,890,891],{},"500",[66,893,894,895,898],{},"Render failed server-side. Body includes ",[22,896,897],{},"details"," — worth attaching to a support request.",[10,900,902],{"id":901},"next-steps","Next steps",[904,905,906,915,923],"ul",{},[907,908,909,912,913,493],"li",{},[30,910,911],{"href":157},"Build a template visually in Bluepic Studio",", then drive it with ",[22,914,805],{},[907,916,917,919,920,922],{},[30,918,670],{"href":669}," for the full ",[22,921,809],{}," walkthrough, including a batch-pipeline example.",[907,924,925,926,493],{},"Try requests live, with your own key, in the ",[30,927,929],{"href":928},"\u002Fidml\u002Fapi","interactive playground",[931,932,933],"style",{},"html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .snl16, html code.shiki .snl16{--shiki-default:#F97583}html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}",{"title":24,"searchDepth":178,"depth":178,"links":935},[936,937,938,939,940,941,942,943],{"id":12,"depth":178,"text":13},{"id":37,"depth":178,"text":38},{"id":144,"depth":178,"text":145},{"id":553,"depth":178,"text":554},{"id":683,"depth":178,"text":684},{"id":795,"depth":178,"text":33},{"id":821,"depth":178,"text":822},{"id":901,"depth":178,"text":902},"platform","2026-07-16","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.","md","\u002Fdocs-images\u002Fapi-reference.svg",{},true,"\u002Fdocs\u002Fapi-reference",{"title":5,"description":946},"docs\u002Fapi-reference","L-oE8LxWLSXAhpqtO9gGFel4RvIfCzSB-mpWlWPID6I",1784233655641]