[{"data":1,"prerenderedAt":510},["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":500,"extension":501,"eyebrow":502,"meta":503,"navTitle":502,"navigation":504,"path":505,"seo":506,"stem":507,"updatedAt":508,"__hash__":509},"docs_en\u002Fintegrations\u002Fpi.md",{"type":55,"value":56,"toc":491},"minimark",[57,69,80,85,418,422,476,487],[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,129,133,136,157,161,172,384,388],"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 laras-ink","npm install -g --ignore-scripts @earendil-works\u002Fpi-coding-agent\n","bash","",[73,107,108],{"__ignoreMap":105},[109,110,113,117,120,123,126],"span",{"class":111,"line":112},"line",1,[109,114,116],{"class":115},"sIGQv","npm",[109,118,119],{"class":115}," install",[109,121,122],{"class":115}," -g",[109,124,125],{"class":115}," --ignore-scripts",[109,127,128],{"class":115}," @earendil-works\u002Fpi-coding-agent\n",[89,130,132],{"id":131},"set-your-api-key","Set your API key",[58,134,135],{},"Put your key in an environment variable.",[100,137,139],{"className":102,"code":138,"language":104,"meta":105,"style":105},"export LARAS_API_KEY=\"lr_live_your_key_here\"\n",[73,140,141],{"__ignoreMap":105},[109,142,143,147,151,154],{"class":111,"line":112},[109,144,146],{"class":145},"sifj9","export",[109,148,150],{"class":149},"snt3o"," LARAS_API_KEY",[109,152,153],{"class":145},"=",[109,155,156],{"class":115},"\"lr_live_your_key_here\"\n",[89,158,160],{"id":159},"add-the-provider","Add the provider",[58,162,163,164,167,168,171],{},"Create ",[73,165,166],{},"~\u002F.pi\u002Fagent\u002Fmodels.json",". Pi reads that folder by default. Set ",[73,169,170],{},"PI_CODING_AGENT_DIR"," to use another folder.",[100,173,177],{"className":174,"code":175,"filename":166,"language":176,"meta":105,"style":105},"language-json shiki shiki-themes laras-ink","{\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-v4.1-flash\",\n          \"name\": \"DeepSeek V4.1 Flash\",\n          \"reasoning\": true,\n          \"input\": [\"text\", \"image\"],\n          \"contextWindow\": 1000000,\n          \"maxTokens\": 8192\n        }\n      ]\n    }\n  }\n}\n","json",[73,178,179,184,199,208,216,229,242,255,264,270,283,296,309,330,343,354,360,366,372,378],{"__ignoreMap":105},[109,180,181],{"class":111,"line":112},[109,182,183],{"class":149},"{\n",[109,185,187,190,193,196],{"class":111,"line":186},2,[109,188,189],{"class":149},"  \"$schema\"",[109,191,192],{"class":149},": ",[109,194,195],{"class":115},"\"https:\u002F\u002Fpi.dev\u002Fschemas\u002Fmodels.schema.json\"",[109,197,198],{"class":149},",\n",[109,200,202,205],{"class":111,"line":201},3,[109,203,204],{"class":149},"  \"providers\"",[109,206,207],{"class":149},": {\n",[109,209,211,214],{"class":111,"line":210},4,[109,212,213],{"class":149},"    \"laras\"",[109,215,207],{"class":149},[109,217,219,222,224,227],{"class":111,"line":218},5,[109,220,221],{"class":149},"      \"baseUrl\"",[109,223,192],{"class":149},[109,225,226],{"class":115},"\"https:\u002F\u002Fapi.larasrouter.com\u002Fv1\"",[109,228,198],{"class":149},[109,230,232,235,237,240],{"class":111,"line":231},6,[109,233,234],{"class":149},"      \"api\"",[109,236,192],{"class":149},[109,238,239],{"class":115},"\"openai-completions\"",[109,241,198],{"class":149},[109,243,245,248,250,253],{"class":111,"line":244},7,[109,246,247],{"class":149},"      \"apiKey\"",[109,249,192],{"class":149},[109,251,252],{"class":115},"\"$LARAS_API_KEY\"",[109,254,198],{"class":149},[109,256,258,261],{"class":111,"line":257},8,[109,259,260],{"class":149},"      \"models\"",[109,262,263],{"class":149},": [\n",[109,265,267],{"class":111,"line":266},9,[109,268,269],{"class":149},"        {\n",[109,271,273,276,278,281],{"class":111,"line":272},10,[109,274,275],{"class":149},"          \"id\"",[109,277,192],{"class":149},[109,279,280],{"class":115},"\"deepseek-v4.1-flash\"",[109,282,198],{"class":149},[109,284,286,289,291,294],{"class":111,"line":285},11,[109,287,288],{"class":149},"          \"name\"",[109,290,192],{"class":149},[109,292,293],{"class":115},"\"DeepSeek V4.1 Flash\"",[109,295,198],{"class":149},[109,297,299,302,304,307],{"class":111,"line":298},12,[109,300,301],{"class":149},"          \"reasoning\"",[109,303,192],{"class":149},[109,305,306],{"class":115},"true",[109,308,198],{"class":149},[109,310,312,315,318,321,324,327],{"class":111,"line":311},13,[109,313,314],{"class":149},"          \"input\"",[109,316,317],{"class":149},": [",[109,319,320],{"class":115},"\"text\"",[109,322,323],{"class":149},", ",[109,325,326],{"class":115},"\"image\"",[109,328,329],{"class":149},"],\n",[109,331,333,336,338,341],{"class":111,"line":332},14,[109,334,335],{"class":149},"          \"contextWindow\"",[109,337,192],{"class":149},[109,339,340],{"class":115},"1000000",[109,342,198],{"class":149},[109,344,346,349,351],{"class":111,"line":345},15,[109,347,348],{"class":149},"          \"maxTokens\"",[109,350,192],{"class":149},[109,352,353],{"class":115},"8192\n",[109,355,357],{"class":111,"line":356},16,[109,358,359],{"class":149},"        }\n",[109,361,363],{"class":111,"line":362},17,[109,364,365],{"class":149},"      ]\n",[109,367,369],{"class":111,"line":368},18,[109,370,371],{"class":149},"    }\n",[109,373,375],{"class":111,"line":374},19,[109,376,377],{"class":149},"  }\n",[109,379,381],{"class":111,"line":380},20,[109,382,383],{"class":149},"}\n",[89,385,387],{"id":386},"pick-the-model","Pick the model",[58,389,390,391,394,395,397,398,401,402,406,407,410,411,413,414,417],{},"Export ",[73,392,393],{},"LARAS_API_KEY"," in the terminal where you start Pi. Pi lists a provider only when it has usable authentication. Start Pi with ",[73,396,98],{},", run ",[73,399,400],{},"\u002Fmodel",", and choose ",[403,404,405],"strong",{},"DeepSeek V4.1 Flash"," from the ",[403,408,409],{},"laras"," provider. Opening ",[73,412,400],{}," reloads ",[73,415,416],{},"models.json",", so you can edit the file without restarting Pi.",[81,419,421],{"id":420},"good-to-know","Good to know",[423,424,425,432,438,452,463,468],"ul",{},[426,427,428,431],"li",{},[73,429,430],{},"contextWindow"," states the full 1,000,000-token window. Without it, Pi uses its own smaller default.",[426,433,434,437],{},[73,435,436],{},"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.",[426,439,440,443,444,447,448,451],{},[73,441,442],{},"input"," lists ",[73,445,446],{},"text"," and ",[73,449,450],{},"image",": deepseek-v4.1-flash reads images, such as the screenshots and image files Pi reads. Each image is billed as input tokens.",[426,453,454,455,458,459,462],{},"A request can be up to 16 MB, and images count toward it. Pi sends the whole conversation, every image included, on each turn, so a session with many screenshots reaches 16 MB long before it fills the context window. Laras Router then answers ",[73,456,457],{},"413 request_too_large",", and Pi compacts the conversation and retries. Run ",[73,460,461],{},"\u002Fcompact"," sooner in a screenshot-heavy session.",[426,464,465,467],{},[73,466,252],{}," reads the variable from your environment, so the key itself stays out of the file.",[426,469,470,471,475],{},"Create a separate API key for Pi with a ",[62,472,474],{"href":473},"\u002Fguides\u002Fbilling#key-budgets","monthly budget",", so you can see and cap what it spends.",[58,477,478,479,482,483,68],{},"Settings and screens can change between versions. If something looks different, check the ",[62,480,67],{"href":64,"rel":481},[66],". For other tools, see all ",[62,484,486],{"href":485},"\u002Fintegrations","integrations",[488,489,490],"style",{},"html pre.shiki code .sIGQv, html code.shiki .sIGQv{--shiki-default:#F7F8F8}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 .sifj9, html code.shiki .sifj9{--shiki-default:#8A8F98}html pre.shiki code .snt3o, html code.shiki .snt3o{--shiki-default:#B4B8BF}",{"title":105,"searchDepth":201,"depth":201,"links":492},[493,499],{"id":83,"depth":186,"text":84,"children":494},[495,496,497,498],{"id":91,"depth":201,"text":92},{"id":131,"depth":201,"text":132},{"id":159,"depth":201,"text":160},{"id":386,"depth":201,"text":387},{"id":420,"depth":186,"text":421},"Terminal coding agent with custom providers in models.json. Step-by-step setup with Laras Router.","md",null,{},true,"\u002Fintegrations\u002Fpi",{"title":29,"description":500},"integrations\u002Fpi","2026-11-15","VCsApgWeGYUndgZFInwcZvguHUVGhKDn-EFm2AVxRRg",1796424411499]