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