[{"data":1,"prerenderedAt":943},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fapi\u002Frenders":3,"docs-section-API":925},{"id":4,"title":5,"body":6,"description":917,"extension":918,"meta":919,"navigation":600,"order":156,"path":920,"section":921,"seo":922,"stem":923,"__hash__":924},"docs\u002Fdocs\u002Fapi\u002Frenders.md","Renders",{"type":7,"value":8,"toc":911},"minimark",[9,13,18,25,91,220,227,399,420,428,432,439,464,523,527,889,893,907],[10,11,12],"p",{},"A render is one video: a template filled in for a brand, at one size.",[14,15,17],"h2",{"id":16},"start-a-render","Start a render",[10,19,20,24],{},[21,22,23],"code",{},"POST \u002Frenders"," with:",[26,27,28,42,52,72],"ul",{},[29,30,31,37,38,41],"li",{},[32,33,34],"strong",{},[21,35,36],{},"brand",": the brand's ",[21,39,40],{},"id",".",[29,43,44,49,50,41],{},[32,45,46],{},[21,47,48],{},"template",": the template's ",[21,51,40],{},[29,53,54,59,60,63,64,67,68,71],{},[32,55,56],{},[21,57,58],{},"ratio",": ",[21,61,62],{},"9x16",", ",[21,65,66],{},"1x1"," or ",[21,69,70],{},"16x9",". Leave it out for the template's own size (tall).",[29,73,74,79,80,83,84,87,88,41],{},[32,75,76],{},[21,77,78],{},"modifications",": the template's names and what fills them. Text names take text (or a number), image names take a photo's ",[21,81,82],{},"name",", and ",[21,85,86],{},"palette.\u003Cname>"," takes a color like ",[21,89,90],{},"#1a73e8",[92,93,98],"pre",{"className":94,"code":95,"language":96,"meta":97,"style":97},"language-bash shiki shiki-themes github-light github-dark","curl {{base}}\u002Frenders \\\n  -H \"Authorization: Bearer $API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"brand\": \"cm9x2brand0001\",\n    \"template\": \"quote-reel\",\n    \"ratio\": \"9x16\",\n    \"modifications\": {\n      \"tag\": \"Google review\",\n      \"quote\": \"The best sourdough in town. We drive 40 minutes for it.\",\n      \"count\": 1200,\n      \"label\": \"loaves a week\",\n      \"palette.bg\": \"#1f2937\"\n    }\n  }'\n","bash","",[21,99,100,117,135,145,154,160,166,172,178,184,190,196,202,208,214],{"__ignoreMap":97},[101,102,105,109,113],"span",{"class":103,"line":104},"line",1,[101,106,108],{"class":107},"sScJk","curl",[101,110,112],{"class":111},"sZZnC"," {{base}}\u002Frenders",[101,114,116],{"class":115},"sj4cs"," \\\n",[101,118,120,123,126,130,133],{"class":103,"line":119},2,[101,121,122],{"class":115},"  -H",[101,124,125],{"class":111}," \"Authorization: Bearer ",[101,127,129],{"class":128},"sVt8B","$API_KEY",[101,131,132],{"class":111},"\"",[101,134,116],{"class":115},[101,136,138,140,143],{"class":103,"line":137},3,[101,139,122],{"class":115},[101,141,142],{"class":111}," \"Content-Type: application\u002Fjson\"",[101,144,116],{"class":115},[101,146,148,151],{"class":103,"line":147},4,[101,149,150],{"class":115},"  -d",[101,152,153],{"class":111}," '{\n",[101,155,157],{"class":103,"line":156},5,[101,158,159],{"class":111},"    \"brand\": \"cm9x2brand0001\",\n",[101,161,163],{"class":103,"line":162},6,[101,164,165],{"class":111},"    \"template\": \"quote-reel\",\n",[101,167,169],{"class":103,"line":168},7,[101,170,171],{"class":111},"    \"ratio\": \"9x16\",\n",[101,173,175],{"class":103,"line":174},8,[101,176,177],{"class":111},"    \"modifications\": {\n",[101,179,181],{"class":103,"line":180},9,[101,182,183],{"class":111},"      \"tag\": \"Google review\",\n",[101,185,187],{"class":103,"line":186},10,[101,188,189],{"class":111},"      \"quote\": \"The best sourdough in town. We drive 40 minutes for it.\",\n",[101,191,193],{"class":103,"line":192},11,[101,194,195],{"class":111},"      \"count\": 1200,\n",[101,197,199],{"class":103,"line":198},12,[101,200,201],{"class":111},"      \"label\": \"loaves a week\",\n",[101,203,205],{"class":103,"line":204},13,[101,206,207],{"class":111},"      \"palette.bg\": \"#1f2937\"\n",[101,209,211],{"class":103,"line":210},14,[101,212,213],{"class":111},"    }\n",[101,215,217],{"class":103,"line":216},15,[101,218,219],{"class":111},"  }'\n",[10,221,222,223,226],{},"The answer is ",[21,224,225],{},"201"," with the render:",[92,228,232],{"className":229,"code":230,"language":231,"meta":97,"style":97},"language-json shiki shiki-themes github-light github-dark","{\n  \"render\": {\n    \"id\": \"cm9x2render001\",\n    \"status\": \"rendering\",\n    \"brand\": \"cm9x2brand0001\",\n    \"template\": \"quote-reel\",\n    \"ratio\": \"9x16\",\n    \"seconds\": 8,\n    \"cents\": 0,\n    \"url\": null,\n    \"bytes\": null,\n    \"error\": null,\n    \"createdAt\": \"2026-10-29T18:00:00.000Z\",\n    \"finishedAt\": null\n  }\n}\n","json",[21,233,234,239,247,260,272,284,296,308,320,332,344,355,366,378,388,393],{"__ignoreMap":97},[101,235,236],{"class":103,"line":104},[101,237,238],{"class":128},"{\n",[101,240,241,244],{"class":103,"line":119},[101,242,243],{"class":115},"  \"render\"",[101,245,246],{"class":128},": {\n",[101,248,249,252,254,257],{"class":103,"line":137},[101,250,251],{"class":115},"    \"id\"",[101,253,59],{"class":128},[101,255,256],{"class":111},"\"cm9x2render001\"",[101,258,259],{"class":128},",\n",[101,261,262,265,267,270],{"class":103,"line":147},[101,263,264],{"class":115},"    \"status\"",[101,266,59],{"class":128},[101,268,269],{"class":111},"\"rendering\"",[101,271,259],{"class":128},[101,273,274,277,279,282],{"class":103,"line":156},[101,275,276],{"class":115},"    \"brand\"",[101,278,59],{"class":128},[101,280,281],{"class":111},"\"cm9x2brand0001\"",[101,283,259],{"class":128},[101,285,286,289,291,294],{"class":103,"line":162},[101,287,288],{"class":115},"    \"template\"",[101,290,59],{"class":128},[101,292,293],{"class":111},"\"quote-reel\"",[101,295,259],{"class":128},[101,297,298,301,303,306],{"class":103,"line":168},[101,299,300],{"class":115},"    \"ratio\"",[101,302,59],{"class":128},[101,304,305],{"class":111},"\"9x16\"",[101,307,259],{"class":128},[101,309,310,313,315,318],{"class":103,"line":174},[101,311,312],{"class":115},"    \"seconds\"",[101,314,59],{"class":128},[101,316,317],{"class":115},"8",[101,319,259],{"class":128},[101,321,322,325,327,330],{"class":103,"line":180},[101,323,324],{"class":115},"    \"cents\"",[101,326,59],{"class":128},[101,328,329],{"class":115},"0",[101,331,259],{"class":128},[101,333,334,337,339,342],{"class":103,"line":186},[101,335,336],{"class":115},"    \"url\"",[101,338,59],{"class":128},[101,340,341],{"class":115},"null",[101,343,259],{"class":128},[101,345,346,349,351,353],{"class":103,"line":192},[101,347,348],{"class":115},"    \"bytes\"",[101,350,59],{"class":128},[101,352,341],{"class":115},[101,354,259],{"class":128},[101,356,357,360,362,364],{"class":103,"line":198},[101,358,359],{"class":115},"    \"error\"",[101,361,59],{"class":128},[101,363,341],{"class":115},[101,365,259],{"class":128},[101,367,368,371,373,376],{"class":103,"line":204},[101,369,370],{"class":115},"    \"createdAt\"",[101,372,59],{"class":128},[101,374,375],{"class":111},"\"2026-10-29T18:00:00.000Z\"",[101,377,259],{"class":128},[101,379,380,383,385],{"class":103,"line":210},[101,381,382],{"class":115},"    \"finishedAt\"",[101,384,59],{"class":128},[101,386,387],{"class":115},"null\n",[101,389,390],{"class":103,"line":216},[101,391,392],{"class":128},"  }\n",[101,394,396],{"class":103,"line":395},16,[101,397,398],{"class":128},"}\n",[26,400,401,409],{},[29,402,403,408],{},[32,404,405],{},[21,406,407],{},"seconds",": the video's length, as counted against your minutes.",[29,410,411,416,417,419],{},[32,412,413],{},[21,414,415],{},"cents",": what it takes from credits past your minutes. ",[21,418,329],{}," while your plan's minutes cover it.",[10,421,422,423,41],{},"Before it starts, the request is checked: the names must be the template's, and your minutes and credits must cover the video. If something's wrong, nothing starts and nothing is charged. See ",[424,425,427],"a",{"href":426},"\u002Fdocs\u002Fapi\u002Ferrors-and-limits","Errors and limits",[14,429,431],{"id":430},"check-on-it","Check on it",[10,433,434,435,438],{},"Ask for the render every 5 seconds until its ",[21,436,437],{},"status"," changes:",[92,440,442],{"className":94,"code":441,"language":96,"meta":97,"style":97},"curl {{base}}\u002Frenders\u002Fcm9x2render001 \\\n  -H \"Authorization: Bearer $API_KEY\"\n",[21,443,444,453],{"__ignoreMap":97},[101,445,446,448,451],{"class":103,"line":104},[101,447,108],{"class":107},[101,449,450],{"class":111}," {{base}}\u002Frenders\u002Fcm9x2render001",[101,452,116],{"class":115},[101,454,455,457,459,461],{"class":103,"line":119},[101,456,122],{"class":115},[101,458,125],{"class":111},[101,460,129],{"class":128},[101,462,463],{"class":111},"\"\n",[465,466,467,481],"table",{},[468,469,470],"thead",{},[471,472,473,478],"tr",{},[474,475,476],"th",{},[21,477,437],{},[474,479,480],{},"What it means",[482,483,484,495,513],"tbody",{},[471,485,486,492],{},[487,488,489],"td",{},[21,490,491],{},"rendering",[487,493,494],{},"Being made. Most videos take a minute or two.",[471,496,497,502],{},[487,498,499],{},[21,500,501],{},"ready",[487,503,504,505,508,509,512],{},"Done. ",[21,506,507],{},"url"," is the MP4 and ",[21,510,511],{},"bytes"," its size.",[471,514,515,520],{},[487,516,517],{},[21,518,519],{},"failed",[487,521,522],{},"It couldn't be made. Nothing was charged; try again.",[14,524,526],{"id":525},"in-javascript","In JavaScript",[92,528,532],{"className":529,"code":530,"language":531,"meta":97,"style":97},"language-js shiki shiki-themes github-light github-dark","const api = '{{base}}';\nconst headers = { Authorization: `Bearer ${process.env.API_KEY}`, 'Content-Type': 'application\u002Fjson' };\n\nconst started = await fetch(`${api}\u002Frenders`, {\n  method: 'POST',\n  headers,\n  body: JSON.stringify({ brand: 'cm9x2brand0001', template: 'quote-reel', modifications: { quote: 'Honest people.', count: 214, label: 'happy clients' } }),\n});\nif (!started.ok) throw new Error((await started.json()).statusMessage);\nlet { render } = await started.json();\n\nwhile (render.status === 'rendering') {\n  await new Promise((r) => setTimeout(r, 5000));\n  ({ render } = await (await fetch(`${api}\u002Frenders\u002F${render.id}`, { headers })).json());\n}\nif (render.status === 'failed') throw new Error(render.error);\nconsole.log(render.url);\n","js",[21,533,534,552,596,602,632,642,647,693,698,735,755,759,776,810,851,855,877],{"__ignoreMap":97},[101,535,536,540,543,546,549],{"class":103,"line":104},[101,537,539],{"class":538},"szBVR","const",[101,541,542],{"class":115}," api",[101,544,545],{"class":538}," =",[101,547,548],{"class":111}," '{{base}}'",[101,550,551],{"class":128},";\n",[101,553,554,556,559,561,564,567,570,572,575,577,580,583,585,588,590,593],{"class":103,"line":119},[101,555,539],{"class":538},[101,557,558],{"class":115}," headers",[101,560,545],{"class":538},[101,562,563],{"class":128}," { Authorization: ",[101,565,566],{"class":111},"`Bearer ${",[101,568,569],{"class":128},"process",[101,571,41],{"class":111},[101,573,574],{"class":128},"env",[101,576,41],{"class":111},[101,578,579],{"class":115},"API_KEY",[101,581,582],{"class":111},"}`",[101,584,63],{"class":128},[101,586,587],{"class":111},"'Content-Type'",[101,589,59],{"class":128},[101,591,592],{"class":111},"'application\u002Fjson'",[101,594,595],{"class":128}," };\n",[101,597,598],{"class":103,"line":137},[101,599,601],{"emptyLinePlaceholder":600},true,"\n",[101,603,604,606,609,611,614,617,620,623,626,629],{"class":103,"line":147},[101,605,539],{"class":538},[101,607,608],{"class":115}," started",[101,610,545],{"class":538},[101,612,613],{"class":538}," await",[101,615,616],{"class":107}," fetch",[101,618,619],{"class":128},"(",[101,621,622],{"class":111},"`${",[101,624,625],{"class":128},"api",[101,627,628],{"class":111},"}\u002Frenders`",[101,630,631],{"class":128},", {\n",[101,633,634,637,640],{"class":103,"line":156},[101,635,636],{"class":128},"  method: ",[101,638,639],{"class":111},"'POST'",[101,641,259],{"class":128},[101,643,644],{"class":103,"line":162},[101,645,646],{"class":128},"  headers,\n",[101,648,649,652,655,657,660,663,666,669,672,675,678,681,684,687,690],{"class":103,"line":168},[101,650,651],{"class":128},"  body: ",[101,653,654],{"class":115},"JSON",[101,656,41],{"class":128},[101,658,659],{"class":107},"stringify",[101,661,662],{"class":128},"({ brand: ",[101,664,665],{"class":111},"'cm9x2brand0001'",[101,667,668],{"class":128},", template: ",[101,670,671],{"class":111},"'quote-reel'",[101,673,674],{"class":128},", modifications: { quote: ",[101,676,677],{"class":111},"'Honest people.'",[101,679,680],{"class":128},", count: ",[101,682,683],{"class":115},"214",[101,685,686],{"class":128},", label: ",[101,688,689],{"class":111},"'happy clients'",[101,691,692],{"class":128}," } }),\n",[101,694,695],{"class":103,"line":174},[101,696,697],{"class":128},"});\n",[101,699,700,703,706,709,712,715,718,721,724,727,730,732],{"class":103,"line":180},[101,701,702],{"class":538},"if",[101,704,705],{"class":128}," (",[101,707,708],{"class":538},"!",[101,710,711],{"class":128},"started.ok) ",[101,713,714],{"class":538},"throw",[101,716,717],{"class":538}," new",[101,719,720],{"class":107}," Error",[101,722,723],{"class":128},"((",[101,725,726],{"class":538},"await",[101,728,729],{"class":128}," started.",[101,731,231],{"class":107},[101,733,734],{"class":128},"()).statusMessage);\n",[101,736,737,740,743,746,748,750,752],{"class":103,"line":186},[101,738,739],{"class":538},"let",[101,741,742],{"class":128}," { render } ",[101,744,745],{"class":538},"=",[101,747,613],{"class":538},[101,749,729],{"class":128},[101,751,231],{"class":107},[101,753,754],{"class":128},"();\n",[101,756,757],{"class":103,"line":192},[101,758,601],{"emptyLinePlaceholder":600},[101,760,761,764,767,770,773],{"class":103,"line":198},[101,762,763],{"class":538},"while",[101,765,766],{"class":128}," (render.status ",[101,768,769],{"class":538},"===",[101,771,772],{"class":111}," 'rendering'",[101,774,775],{"class":128},") {\n",[101,777,778,781,783,786,788,792,795,798,801,804,807],{"class":103,"line":204},[101,779,780],{"class":538},"  await",[101,782,717],{"class":538},[101,784,785],{"class":115}," Promise",[101,787,723],{"class":128},[101,789,791],{"class":790},"s4XuR","r",[101,793,794],{"class":128},") ",[101,796,797],{"class":538},"=>",[101,799,800],{"class":107}," setTimeout",[101,802,803],{"class":128},"(r, ",[101,805,806],{"class":115},"5000",[101,808,809],{"class":128},"));\n",[101,811,812,815,817,819,821,823,825,827,829,831,834,837,839,841,843,846,848],{"class":103,"line":210},[101,813,814],{"class":128},"  ({ render } ",[101,816,745],{"class":538},[101,818,613],{"class":538},[101,820,705],{"class":128},[101,822,726],{"class":538},[101,824,616],{"class":107},[101,826,619],{"class":128},[101,828,622],{"class":111},[101,830,625],{"class":128},[101,832,833],{"class":111},"}\u002Frenders\u002F${",[101,835,836],{"class":128},"render",[101,838,41],{"class":111},[101,840,40],{"class":128},[101,842,582],{"class":111},[101,844,845],{"class":128},", { headers })).",[101,847,231],{"class":107},[101,849,850],{"class":128},"());\n",[101,852,853],{"class":103,"line":216},[101,854,398],{"class":128},[101,856,857,859,861,863,866,868,870,872,874],{"class":103,"line":395},[101,858,702],{"class":538},[101,860,766],{"class":128},[101,862,769],{"class":538},[101,864,865],{"class":111}," 'failed'",[101,867,794],{"class":128},[101,869,714],{"class":538},[101,871,717],{"class":538},[101,873,720],{"class":107},[101,875,876],{"class":128},"(render.error);\n",[101,878,880,883,886],{"class":103,"line":879},17,[101,881,882],{"class":128},"console.",[101,884,885],{"class":107},"log",[101,887,888],{"class":128},"(render.url);\n",[14,890,892],{"id":891},"the-video","The video",[26,894,895,901,904],{},[29,896,897,898,900],{},"The ",[21,899,507],{}," is an MP4 (H.264), 1080 pixels on its shorter side, 30 frames a second, with no sound.",[29,902,903],{},"Anyone with the address can watch it, so share it only where you mean to. Download it if you want your own copy.",[29,905,906],{},"The video is kept with the brand's files.",[908,909,910],"style",{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}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 .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":97,"searchDepth":119,"depth":119,"links":912},[913,914,915,916],{"id":16,"depth":119,"text":17},{"id":430,"depth":119,"text":431},{"id":525,"depth":119,"text":526},{"id":891,"depth":119,"text":892},"Start a video, check on it, and download it when it's ready.","md",{},"\u002Fdocs\u002Fapi\u002Frenders","API",{"title":5,"description":917},"docs\u002Fapi\u002Frenders","BGus49XjmtAHY6vAnlyXnwkMowhuzEgMaGC94SbSqpg",[926,929,932,935,938,939,942],{"path":927,"title":928},"\u002Fdocs\u002Fapi","Video API",{"path":930,"title":931},"\u002Fdocs\u002Fapi\u002Fauthentication","Authentication",{"path":933,"title":934},"\u002Fdocs\u002Fapi\u002Ftemplates","Templates",{"path":936,"title":937},"\u002Fdocs\u002Fapi\u002Fbrands-and-photos","Brands and photos",{"path":920,"title":5},{"path":940,"title":941},"\u002Fdocs\u002Fapi\u002Fusage","Usage",{"path":426,"title":427},1793740287691]