[{"data":1,"prerenderedAt":491},["ShallowReactive",2],{"docs-nav-titles":3,"page-docs_en-\u002Fintegrations\u002Fpi":52},{"en":4,"id":39},{"\u002Fauthentication":5,"\u002Fchangelog":6,"\u002Fguides\u002Fbilling":7,"\u002Fguides\u002Ferrors":8,"\u002Fguides\u002Fjson-output":9,"\u002Fguides\u002Frate-limits":10,"\u002Fguides\u002Freasoning":11,"\u002Fguides\u002Fstreaming":12,"\u002Fguides\u002Ftool-calling":13,"\u002Fguides\u002Ftop-up":14,"\u002F":15,"\u002Fintegrations\u002Faider":16,"\u002Fintegrations\u002Fclaude-code":17,"\u002Fintegrations\u002Fcline":18,"\u002Fintegrations\u002Fcontinue":19,"\u002Fintegrations\u002Fgoose":20,"\u002Fintegrations\u002Fhermes":21,"\u002Fintegrations":22,"\u002Fintegrations\u002Fkilo-code":23,"\u002Fintegrations\u002Flangchain":24,"\u002Fintegrations\u002Foh-my-pi":25,"\u002Fintegrations\u002Fopenai-sdk":26,"\u002Fintegrations\u002Fopenclaw":27,"\u002Fintegrations\u002Fopencode":28,"\u002Fintegrations\u002Fpi":29,"\u002Fintegrations\u002Fvercel-ai-sdk":30,"\u002Fintegrations\u002Fzed":31,"\u002Fmodels":32,"\u002Fquickstart":33,"\u002Freference\u002Fchat-completions":34,"\u002Freference":22,"\u002Freference\u002Fmessages":35,"\u002Freference\u002Fmodels":36,"\u002Freference\u002Fmodels-retrieve":37,"\u002Fsupport":38},"Authentication","Changelog","Billing","Errors & retries","JSON output","Rate limits","Reasoning content","Streaming","Tool calling","Topping up with QRIS","Introduction","Aider","Claude Code","Cline","Continue","Goose","Hermes Agent","Overview","Kilo Code","LangChain (Python)","Oh My Pi","OpenAI SDKs","OpenClaw","OpenCode","Pi","Vercel AI SDK","Zed","Models","Quickstart","Chat completions","Messages","List models","Retrieve a model","Support",{"\u002Fauthentication":40,"\u002Fchangelog":6,"\u002Fguides\u002Fbilling":7,"\u002Fguides\u002Ferrors":41,"\u002Fguides\u002Fjson-output":42,"\u002Fguides\u002Frate-limits":43,"\u002Fguides\u002Freasoning":44,"\u002Fguides\u002Fstreaming":12,"\u002Fguides\u002Ftool-calling":13,"\u002Fguides\u002Ftop-up":45,"\u002F":46,"\u002Fintegrations\u002Faider":16,"\u002Fintegrations\u002Fclaude-code":17,"\u002Fintegrations\u002Fcline":18,"\u002Fintegrations\u002Fcontinue":19,"\u002Fintegrations\u002Fgoose":20,"\u002Fintegrations\u002Fhermes":21,"\u002Fintegrations":47,"\u002Fintegrations\u002Fkilo-code":23,"\u002Fintegrations\u002Flangchain":24,"\u002Fintegrations\u002Foh-my-pi":25,"\u002Fintegrations\u002Fopenai-sdk":48,"\u002Fintegrations\u002Fopenclaw":27,"\u002Fintegrations\u002Fopencode":28,"\u002Fintegrations\u002Fpi":29,"\u002Fintegrations\u002Fvercel-ai-sdk":30,"\u002Fintegrations\u002Fzed":31,"\u002Fmodels":49,"\u002Fquickstart":33,"\u002Freference\u002Fchat-completions":34,"\u002Freference":47,"\u002Freference\u002Fmessages":35,"\u002Freference\u002Fmodels":50,"\u002Freference\u002Fmodels-retrieve":51,"\u002Fsupport":38},"Autentikasi","Error & retry","Output JSON","Rate limit","Konten reasoning","Isi saldo dengan QRIS","Pengantar","Ringkasan","OpenAI SDK","Model","Daftar model","Ambil satu model",{"id":53,"title":29,"body":54,"description":482,"extension":483,"eyebrow":484,"meta":485,"navTitle":484,"navigation":486,"path":487,"seo":488,"stem":489,"__hash__":490},"docs_en\u002Fintegrations\u002Fpi.md",{"type":55,"value":56,"toc":473},"minimark",[57,69,80,85,415,419,458,469],[58,59,60,61,68],"p",{},"This guide connects Pi to Laras Router. Every step was checked against the ",[62,63,67],"a",{"href":64,"rel":65},"https:\u002F\u002Fpi.dev\u002Fdocs\u002Flatest",[66],"nofollow","Pi documentation",".",[58,70,71,72,76,77,68],{},"You need an API key (",[73,74,75],"code",{},"lr_live_…",") and a topped-up balance. New to Laras Router? Start with the ",[62,78,33],{"href":79},"\u002Fquickstart",[81,82,84],"h2",{"id":83},"set-up","Set up",[86,87,88,93,99,131,135,138,159,163,174,381,385],"steps",{},[89,90,92],"h3",{"id":91},"install-pi","Install Pi",[58,94,95,96,68],{},"Install Pi with npm. The command is ",[73,97,98],{},"pi",[100,101,106],"pre",{"className":102,"code":103,"language":104,"meta":105,"style":105},"language-bash shiki shiki-themes github-dark-default github-light-default","npm install -g --ignore-scripts @earendil-works\u002Fpi-coding-agent\n","bash","",[73,107,108],{"__ignoreMap":105},[109,110,113,117,121,125,128],"span",{"class":111,"line":112},"line",1,[109,114,116],{"class":115},"sjwWW","npm",[109,118,120],{"class":119},"sHdZ9"," install",[109,122,124],{"class":123},"sYnYM"," -g",[109,126,127],{"class":123}," --ignore-scripts",[109,129,130],{"class":119}," @earendil-works\u002Fpi-coding-agent\n",[89,132,134],{"id":133},"set-your-api-key","Set your API key",[58,136,137],{},"Put your key in an environment variable.",[100,139,141],{"className":102,"code":140,"language":104,"meta":105,"style":105},"export LARAS_API_KEY=\"lr_live_your_key_here\"\n",[73,142,143],{"__ignoreMap":105},[109,144,145,149,153,156],{"class":111,"line":112},[109,146,148],{"class":147},"s1PA9","export",[109,150,152],{"class":151},"sUq8j"," LARAS_API_KEY",[109,154,155],{"class":147},"=",[109,157,158],{"class":119},"\"lr_live_your_key_here\"\n",[89,160,162],{"id":161},"add-the-provider","Add the provider",[58,164,165,166,169,170,173],{},"Create ",[73,167,168],{},"~\u002F.pi\u002Fagent\u002Fmodels.json",". Pi reads that folder by default. Set ",[73,171,172],{},"PI_CODING_AGENT_DIR"," to use another folder.",[100,175,179],{"className":176,"code":177,"filename":168,"language":178,"meta":105,"style":105},"language-json shiki shiki-themes github-dark-default github-light-default","{\n  \"$schema\": \"https:\u002F\u002Fpi.dev\u002Fschemas\u002Fmodels.schema.json\",\n  \"providers\": {\n    \"laras\": {\n      \"baseUrl\": \"https:\u002F\u002Fapi.larasrouter.com\u002Fv1\",\n      \"api\": \"openai-completions\",\n      \"apiKey\": \"$LARAS_API_KEY\",\n      \"models\": [\n        {\n          \"id\": \"deepseek-flash\",\n          \"name\": \"DeepSeek-V4.1-Flash\",\n          \"reasoning\": true,\n          \"input\": [\"text\"],\n          \"contextWindow\": 1000000,\n          \"maxTokens\": 8192\n        }\n      ]\n    }\n  }\n}\n","json",[73,180,181,186,202,211,219,232,245,258,267,273,286,299,312,327,340,351,357,363,369,375],{"__ignoreMap":105},[109,182,183],{"class":111,"line":112},[109,184,185],{"class":151},"{\n",[109,187,189,193,196,199],{"class":111,"line":188},2,[109,190,192],{"class":191},"sGSaJ","  \"$schema\"",[109,194,195],{"class":151},": ",[109,197,198],{"class":119},"\"https:\u002F\u002Fpi.dev\u002Fschemas\u002Fmodels.schema.json\"",[109,200,201],{"class":151},",\n",[109,203,205,208],{"class":111,"line":204},3,[109,206,207],{"class":191},"  \"providers\"",[109,209,210],{"class":151},": {\n",[109,212,214,217],{"class":111,"line":213},4,[109,215,216],{"class":191},"    \"laras\"",[109,218,210],{"class":151},[109,220,222,225,227,230],{"class":111,"line":221},5,[109,223,224],{"class":191},"      \"baseUrl\"",[109,226,195],{"class":151},[109,228,229],{"class":119},"\"https:\u002F\u002Fapi.larasrouter.com\u002Fv1\"",[109,231,201],{"class":151},[109,233,235,238,240,243],{"class":111,"line":234},6,[109,236,237],{"class":191},"      \"api\"",[109,239,195],{"class":151},[109,241,242],{"class":119},"\"openai-completions\"",[109,244,201],{"class":151},[109,246,248,251,253,256],{"class":111,"line":247},7,[109,249,250],{"class":191},"      \"apiKey\"",[109,252,195],{"class":151},[109,254,255],{"class":119},"\"$LARAS_API_KEY\"",[109,257,201],{"class":151},[109,259,261,264],{"class":111,"line":260},8,[109,262,263],{"class":191},"      \"models\"",[109,265,266],{"class":151},": [\n",[109,268,270],{"class":111,"line":269},9,[109,271,272],{"class":151},"        {\n",[109,274,276,279,281,284],{"class":111,"line":275},10,[109,277,278],{"class":191},"          \"id\"",[109,280,195],{"class":151},[109,282,283],{"class":119},"\"deepseek-flash\"",[109,285,201],{"class":151},[109,287,289,292,294,297],{"class":111,"line":288},11,[109,290,291],{"class":191},"          \"name\"",[109,293,195],{"class":151},[109,295,296],{"class":119},"\"DeepSeek-V4.1-Flash\"",[109,298,201],{"class":151},[109,300,302,305,307,310],{"class":111,"line":301},12,[109,303,304],{"class":191},"          \"reasoning\"",[109,306,195],{"class":151},[109,308,309],{"class":123},"true",[109,311,201],{"class":151},[109,313,315,318,321,324],{"class":111,"line":314},13,[109,316,317],{"class":191},"          \"input\"",[109,319,320],{"class":151},": [",[109,322,323],{"class":119},"\"text\"",[109,325,326],{"class":151},"],\n",[109,328,330,333,335,338],{"class":111,"line":329},14,[109,331,332],{"class":191},"          \"contextWindow\"",[109,334,195],{"class":151},[109,336,337],{"class":123},"1000000",[109,339,201],{"class":151},[109,341,343,346,348],{"class":111,"line":342},15,[109,344,345],{"class":191},"          \"maxTokens\"",[109,347,195],{"class":151},[109,349,350],{"class":123},"8192\n",[109,352,354],{"class":111,"line":353},16,[109,355,356],{"class":151},"        }\n",[109,358,360],{"class":111,"line":359},17,[109,361,362],{"class":151},"      ]\n",[109,364,366],{"class":111,"line":365},18,[109,367,368],{"class":151},"    }\n",[109,370,372],{"class":111,"line":371},19,[109,373,374],{"class":151},"  }\n",[109,376,378],{"class":111,"line":377},20,[109,379,380],{"class":151},"}\n",[89,382,384],{"id":383},"pick-the-model","Pick the model",[58,386,387,388,391,392,394,395,398,399,403,404,407,408,410,411,414],{},"Export ",[73,389,390],{},"LARAS_API_KEY"," in the terminal where you start Pi. Pi lists a provider only when it has usable authentication. Start Pi with ",[73,393,98],{},", run ",[73,396,397],{},"\u002Fmodel",", and choose ",[400,401,402],"strong",{},"DeepSeek-V4.1-Flash"," from the ",[400,405,406],{},"laras"," provider. Opening ",[73,409,397],{}," reloads ",[73,412,413],{},"models.json",", so you can edit the file without restarting Pi.",[81,416,418],{"id":417},"good-to-know","Good to know",[420,421,422,429,435,445,450],"ul",{},[423,424,425,428],"li",{},[73,426,427],{},"contextWindow"," states the full 1,000,000-token window. Without it, Pi uses its own smaller default.",[423,430,431,434],{},[73,432,433],{},"maxTokens"," is the output cap Pi asks for on each request. The cap also sets how much balance a request must hold while it runs, so a larger value needs more balance. 8,192 is the default output cap.",[423,436,437,440,441,444],{},[73,438,439],{},"input"," lists ",[73,442,443],{},"text"," only. deepseek-flash does not accept image input, so do not send images to this model.",[423,446,447,449],{},[73,448,255],{}," reads the variable from your environment, so the key itself stays out of the file.",[423,451,452,453,457],{},"Create a separate API key for Pi with a ",[62,454,456],{"href":455},"\u002Fguides\u002Fbilling#key-budgets","monthly budget",", so you can see and cap what it spends.",[58,459,460,461,464,465,68],{},"Settings and screens can change between versions. If something looks different, check the ",[62,462,67],{"href":64,"rel":463},[66],". For other tools, see all ",[62,466,468],{"href":467},"\u002Fintegrations","integrations",[470,471,472],"style",{},"html pre.shiki code .sjwWW, html code.shiki .sjwWW{--shiki-default:#FFA657;--shiki-light:#953800}html pre.shiki code .sHdZ9, html code.shiki .sHdZ9{--shiki-default:#A5D6FF;--shiki-light:#0A3069}html pre.shiki code .sYnYM, html code.shiki .sYnYM{--shiki-default:#79C0FF;--shiki-light:#0550AE}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 .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html pre.shiki code .s1PA9, html code.shiki .s1PA9{--shiki-default:#FF7B72;--shiki-light:#CF222E}html pre.shiki code .sUq8j, html code.shiki .sUq8j{--shiki-default:#E6EDF3;--shiki-light:#1F2328}html pre.shiki code .sGSaJ, html code.shiki .sGSaJ{--shiki-default:#7EE787;--shiki-light:#116329}",{"title":105,"searchDepth":204,"depth":204,"links":474},[475,481],{"id":83,"depth":188,"text":84,"children":476},[477,478,479,480],{"id":91,"depth":204,"text":92},{"id":133,"depth":204,"text":134},{"id":161,"depth":204,"text":162},{"id":383,"depth":204,"text":384},{"id":417,"depth":188,"text":418},"Terminal coding agent with custom providers in models.json. Step-by-step setup with Laras Router.","md",null,{},true,"\u002Fintegrations\u002Fpi",{"title":29,"description":482},"integrations\u002Fpi","ix3GLKR1NBntk9oVSTrdSZiQNOerjsUnRoawh2O8pYw",1793333618609]