[{"data":1,"prerenderedAt":337},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fapi":3,"docs-section-API":329},{"id":4,"title":5,"body":6,"description":320,"extension":321,"meta":322,"navigation":323,"order":102,"path":324,"section":325,"seo":326,"stem":327,"__hash__":328},"docs\u002Fdocs\u002Fapi\u002Findex.md","Video API",{"type":7,"value":8,"toc":314},"minimark",[9,17,22,89,206,210,225,229,232,260,270,274,310],[10,11,12,13,16],"p",{},"The video API makes the same short promo videos as the editor and your site's Videos screen. You pick a template, give it your words and photos, and ",[14,15],"brand-name",{}," makes an MP4 in your brand's logo, web address and colors.",[18,19,21],"h2",{"id":20},"how-it-works","How it works",[23,24,25,39,54,67],"ol",{},[26,27,28,32,33,38],"li",{},[29,30,31],"strong",{},"Make a key"," in Dashboard › API. Owners and developers can make one, and the account needs a plan or credits. See ",[34,35,37],"a",{"href":36},"\u002Fdocs\u002Fapi\u002Fauthentication","Authentication",".",[26,40,41,44,45,49,50,38],{},[29,42,43],{},"Pick a template."," ",[46,47,48],"code",{},"GET \u002Ftemplates"," lists them with the names each one is filled in by. See ",[34,51,53],{"href":52},"\u002Fdocs\u002Fapi\u002Ftemplates","Templates",[26,55,56,44,59,62,63,38],{},[29,57,58],{},"Start a render.",[46,60,61],{},"POST \u002Frenders"," with the brand, the template and your words. See ",[34,64,66],{"href":65},"\u002Fdocs\u002Fapi\u002Frenders","Renders",[26,68,69,72,73,76,77,80,81,84,85,88],{},[29,70,71],{},"Check on it"," with ",[46,74,75],{},"GET \u002Frenders\u002F{id}"," every few seconds. When its ",[46,78,79],{},"status"," is ",[46,82,83],{},"ready",", its ",[46,86,87],{},"url"," is your video.",[90,91,96],"pre",{"className":92,"code":93,"language":94,"meta":95,"style":95},"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\": \"1x1\",\n    \"modifications\": {\n      \"quote\": \"They fixed our furnace the same afternoon. Honest people.\",\n      \"count\": 214,\n      \"label\": \"happy clients\"\n    }\n  }'\n","bash","",[46,97,98,115,133,143,152,158,164,170,176,182,188,194,200],{"__ignoreMap":95},[99,100,103,107,111],"span",{"class":101,"line":102},"line",1,[99,104,106],{"class":105},"sScJk","curl",[99,108,110],{"class":109},"sZZnC"," {{base}}\u002Frenders",[99,112,114],{"class":113},"sj4cs"," \\\n",[99,116,118,121,124,128,131],{"class":101,"line":117},2,[99,119,120],{"class":113},"  -H",[99,122,123],{"class":109}," \"Authorization: Bearer ",[99,125,127],{"class":126},"sVt8B","$API_KEY",[99,129,130],{"class":109},"\"",[99,132,114],{"class":113},[99,134,136,138,141],{"class":101,"line":135},3,[99,137,120],{"class":113},[99,139,140],{"class":109}," \"Content-Type: application\u002Fjson\"",[99,142,114],{"class":113},[99,144,146,149],{"class":101,"line":145},4,[99,147,148],{"class":113},"  -d",[99,150,151],{"class":109}," '{\n",[99,153,155],{"class":101,"line":154},5,[99,156,157],{"class":109},"    \"brand\": \"cm9x2brand0001\",\n",[99,159,161],{"class":101,"line":160},6,[99,162,163],{"class":109},"    \"template\": \"quote-reel\",\n",[99,165,167],{"class":101,"line":166},7,[99,168,169],{"class":109},"    \"ratio\": \"1x1\",\n",[99,171,173],{"class":101,"line":172},8,[99,174,175],{"class":109},"    \"modifications\": {\n",[99,177,179],{"class":101,"line":178},9,[99,180,181],{"class":109},"      \"quote\": \"They fixed our furnace the same afternoon. Honest people.\",\n",[99,183,185],{"class":101,"line":184},10,[99,186,187],{"class":109},"      \"count\": 214,\n",[99,189,191],{"class":101,"line":190},11,[99,192,193],{"class":109},"      \"label\": \"happy clients\"\n",[99,195,197],{"class":101,"line":196},12,[99,198,199],{"class":109},"    }\n",[99,201,203],{"class":101,"line":202},13,[99,204,205],{"class":109},"  }'\n",[18,207,209],{"id":208},"the-basics","The basics",[211,212,213,219,222],"ul",{},[26,214,215,216,38],{},"Every address in these docs starts with ",[46,217,218],{},"{{base}}",[26,220,221],{},"Requests and replies are JSON, except photo uploads, which send the photo itself.",[26,223,224],{},"The API is for your server. Never put a key in a web page or an app, where anyone could read it.",[18,226,228],{"id":227},"what-it-costs","What it costs",[10,230,231],{},"A video made through the API costs the same as one made anywhere else:",[211,233,234,241,247,257],{},[26,235,236,237,240],{},"It uses your plan's ",[29,238,239],{},"server minutes"," first, counted per second.",[26,242,243,244,38],{},"Past them, each minute is ",[29,245,246],{},"10¢ from credits",[26,248,249,250,253,254,38],{},"The minutes and credits are checked ",[29,251,252],{},"before"," the video is made. If they don't cover it, the render isn't started and you get a ",[46,255,256],{},"402",[26,258,259],{},"A video that fails costs nothing.",[10,261,262,265,266,38],{},[46,263,264],{},"GET \u002Fusage"," shows what's left this month. See ",[34,267,269],{"href":268},"\u002Fdocs\u002Fapi\u002Fusage","Usage",[18,271,273],{"id":272},"in-these-docs","In these docs",[211,275,276,281,286,293,298,303],{},[26,277,278,280],{},[34,279,37],{"href":36},": keys and how to send them",[26,282,283,285],{},[34,284,53],{"href":52},": the videos you can make and what fills them",[26,287,288,292],{},[34,289,291],{"href":290},"\u002Fdocs\u002Fapi\u002Fbrands-and-photos","Brands and photos",": whose video it is, and your own photos",[26,294,295,297],{},[34,296,66],{"href":65},": making a video and getting it back",[26,299,300,302],{},[34,301,269],{"href":268},": minutes and credits",[26,304,305,309],{},[34,306,308],{"href":307},"\u002Fdocs\u002Fapi\u002Ferrors-and-limits","Errors and limits",": what can go wrong and how much you can do",[311,312,313],"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);}",{"title":95,"searchDepth":117,"depth":117,"links":315},[316,317,318,319],{"id":20,"depth":117,"text":21},{"id":208,"depth":117,"text":209},{"id":227,"depth":117,"text":228},{"id":272,"depth":117,"text":273},"Make your brand's promo videos from your own code, with the same templates, minutes and credits as the editor.","md",{},true,"\u002Fdocs\u002Fapi","API",{"title":5,"description":320},"docs\u002Fapi\u002Findex","_3f6Fm5CJkE8kxxMRsCmGpHfHOEPjOe9Ht3HxoVrt08",[330,331,332,333,334,335,336],{"path":324,"title":5},{"path":36,"title":37},{"path":52,"title":53},{"path":290,"title":291},{"path":65,"title":66},{"path":268,"title":269},{"path":307,"title":308},1793740287614]