[{"data":1,"prerenderedAt":461},["ShallowReactive",2],{"docs-nav-titles":3,"page-docs_en-\u002Fguides\u002Fbilling":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":7,"body":54,"description":452,"extension":453,"eyebrow":454,"meta":455,"navTitle":454,"navigation":456,"path":457,"seo":458,"stem":459,"__hash__":460},"docs_en\u002Fguides\u002Fbilling.md",{"type":55,"value":56,"toc":439},"minimark",[57,67,72,116,119,131,134,138,141,218,221,225,228,241,251,255,262,269,276,280,291,298,354,357,361,364,389,393,412,416,419,423],[58,59,60,61,66],"p",{},"Your organization has one prepaid wallet in US dollars. You fund it with ",[62,63,65],"a",{"href":64},"\u002Fguides\u002Ftop-up","QRIS top-ups"," in Rupiah, and every API request is charged to it per token. There are no subscriptions and no monthly fees.",[68,69,71],"h2",{"id":70},"prices","Prices",[73,74,75,88],"table",{},[76,77,78],"thead",{},[79,80,81,85],"tr",{},[82,83,84],"th",{},"Token type",[82,86,87],{},"Price per 1M tokens",[89,90,91,100,108],"tbody",{},[79,92,93,97],{},[94,95,96],"td",{},"Input, cache hit",[94,98,99],{},"$0.010",[79,101,102,105],{},[94,103,104],{},"Input, cache miss",[94,106,107],{},"$0.400",[79,109,110,113],{},[94,111,112],{},"Output (including reasoning)",[94,114,115],{},"$1.600",[58,117,118],{},"Prices are fixed: they do not change by time of day or with exchange rates. Each request is charged from the usage the model provider reports in the response:",[120,121,128],"pre",{"className":122,"code":124,"filename":125,"language":126,"meta":127},[123],"language-text","cost = prompt_cache_hit_tokens  × $0.010 \u002F 1,000,000\n     + prompt_cache_miss_tokens × $0.400 \u002F 1,000,000\n     + completion_tokens        × $1.600 \u002F 1,000,000\n","Cost formula","text","",[129,130,124],"code",{"__ignoreMap":127},[58,132,133],{},"Charges are computed to a billionth of a dollar, rounded up, and shown to six decimal places ($0.000001) in the console.",[68,135,137],{"id":136},"worked-example","Worked example",[58,139,140],{},"A support chatbot sends a 12,400-token prompt. The system prompt and earlier turns were seen recently, so 8,000 tokens are a cache hit and 4,400 are a cache miss. The model writes 1,800 output tokens, reasoning included.",[73,142,143,159],{},[76,144,145],{},[79,146,147,150,153,156],{},[82,148,149],{},"Part",[82,151,152],{},"Tokens",[82,154,155],{},"Price per 1M",[82,157,158],{},"Cost",[89,160,161,173,185,198],{},[79,162,163,165,168,170],{},[94,164,96],{},[94,166,167],{},"8,000",[94,169,99],{},[94,171,172],{},"$0.000080",[79,174,175,177,180,182],{},[94,176,104],{},[94,178,179],{},"4,400",[94,181,107],{},[94,183,184],{},"$0.001760",[79,186,187,190,193,195],{},[94,188,189],{},"Output",[94,191,192],{},"1,800",[94,194,115],{},[94,196,197],{},"$0.002880",[79,199,200,206,211,213],{},[94,201,202],{},[203,204,205],"strong",{},"Total",[94,207,208],{},[203,209,210],{},"14,200",[94,212],{},[94,214,215],{},[203,216,217],{},"$0.004720",[58,219,220],{},"A thousand requests like this cost $4.72. Without the cache, the same 12,400 input tokens would all be billed at $0.400 per 1M, and each request would cost $0.007840 — the cache saves about 40% here.",[68,222,224],{"id":223},"cache-pricing","Cache pricing",[58,226,227],{},"The provider caches prompt prefixes automatically; you do not have to enable anything. When the beginning of a prompt matches a recent request, those tokens are billed at the cache-hit price. To benefit:",[229,230,231,235,238],"ul",{},[232,233,234],"li",{},"Put stable content first: system prompt, tool definitions, reference documents.",[232,236,237],{},"Put the parts that change — the latest user message — at the end.",[232,239,240],{},"Keep the stable prefix byte-for-byte identical between requests.",[58,242,243,246,247,250],{},[129,244,245],{},"usage.prompt_cache_hit_tokens"," and ",[129,248,249],{},"usage.prompt_cache_miss_tokens"," in each response tell you exactly how the prompt was split.",[68,252,254],{"id":253},"holds","Holds",[58,256,257,258,261],{},"Before a request is sent to the model, Laras Router places a ",[203,259,260],{},"hold"," on your wallet: an amount reserved for that request, so that requests running at the same time can never spend the same money twice. When the request finishes, the hold is settled to the actual charge and the rest is released immediately.",[58,263,264,265,268],{},"The hold is sized to the most the request could cost — the largest prompt the model accepts at the cache-miss price, plus your output cap at the output price. With the default cap of 8,192 output tokens, that is about $0.41. With ",[129,266,267],{},"max_tokens"," at 384,000, about $0.86. You are only ever charged for actual usage; the hold just reserves room.",[58,270,271,272,275],{},"Your ",[203,273,274],{},"available balance"," is your balance minus the holds of requests still running.",[68,277,279],{"id":278},"overdraft","Overdraft",[58,281,282,283,286,287,290],{},"A request is admitted as long as your available balance is ",[203,284,285],{},"above $0.00",", even when it is smaller than the request's hold. When that request settles, its charge may take your balance below zero — by ",[203,288,289],{},"at most $1.00",". The negative amount is deducted from your next top-up.",[58,292,293,294,297],{},"While your available balance is $0.00 or below, new requests fail with ",[129,295,296],{},"402 insufficient_credit"," until you top up.",[73,299,300,310],{},[76,301,302],{},[79,303,304,307],{},[82,305,306],{},"Moment",[82,308,309],{},"Available balance",[89,311,312,320,328,336,346],{},[79,313,314,317],{},[94,315,316],{},"Before the request",[94,318,319],{},"$0.030000",[79,321,322,325],{},[94,323,324],{},"Request admitted, hold of $0.409830 placed",[94,326,327],{},"−$0.379830 while it runs",[79,329,330,333],{},[94,331,332],{},"Request settles, actual charge $0.050000",[94,334,335],{},"−$0.020000",[79,337,338,341],{},[94,339,340],{},"Next request",[94,342,343,344],{},"refused: ",[129,345,296],{},[79,347,348,351],{},[94,349,350],{},"You top up $5.00",[94,352,353],{},"$4.980000",[58,355,356],{},"This lets you spend your whole balance instead of stranding a few cents. It also means that with a small balance, one running request can hold all of it: further requests are refused until it settles.",[68,358,360],{"id":359},"key-budgets","Key budgets",[58,362,363],{},"Each API key can have an optional monthly budget in USD, set in the console. It protects your wallet from one runaway environment or leaked key.",[229,365,366,373,376,383,386],{},[232,367,368,369,372],{},"A key's month-to-date spend is its settled charges ",[203,370,371],{},"plus the holds of its requests still running",".",[232,374,375],{},"Months are calendar months in Jakarta time (WIB, UTC+7).",[232,377,378,379,382],{},"A request whose hold would take the key past its budget fails with ",[129,380,381],{},"402 key_budget_exceeded"," before it reaches the model, and nothing is charged.",[232,384,385],{},"Because the hold counts, a key can be refused shortly before its budget is fully spent. For example, with $9.70 of a $10.00 budget used, a request holding $0.41 is refused.",[232,387,388],{},"A budget only limits one key. It never lets a key spend more than your wallet balance.",[68,390,392],{"id":391},"failed-requests","Failed requests",[229,394,395,398,405],{},[232,396,397],{},"Requests refused by Laras Router (bad key, empty wallet, rate limit, invalid body) are never charged.",[232,399,400,401,404],{},"A request the model provider rejects with a ",[129,402,403],{},"4xx"," error is not charged; its hold is released.",[232,406,407,408,411],{},"A request that fails with a ",[129,409,410],{},"5xx",", times out, or is interrupted keeps its hold while we reconcile it with the provider. You are charged only for usage the provider reports; otherwise the hold is released without a charge.",[68,413,415],{"id":414},"low-balance-email","Low-balance email",[58,417,418],{},"When your available balance drops below $1.00, the owners and admins of your organization receive one email with a link to top up. The next alert is sent only after the balance has gone back above $1.00 and dropped again.",[68,420,422],{"id":421},"where-to-see-charges","Where to see charges",[58,424,425,426,429,430,433,434,438],{},"The console shows your balance, every top-up and charge in the wallet history, and each request under ",[203,427,428],{},"Usage"," with its token split and exact cost. Include the ",[129,431,432],{},"X-Laras-Request-ID"," header value when you ask ",[62,435,437],{"href":436},"\u002Fsupport","support"," about a specific charge.",{"title":127,"searchDepth":440,"depth":440,"links":441},3,[442,444,445,446,447,448,449,450,451],{"id":70,"depth":443,"text":71},2,{"id":136,"depth":443,"text":137},{"id":223,"depth":443,"text":224},{"id":253,"depth":443,"text":254},{"id":278,"depth":443,"text":279},{"id":359,"depth":443,"text":360},{"id":391,"depth":443,"text":392},{"id":414,"depth":443,"text":415},{"id":421,"depth":443,"text":422},"How requests are charged from your prepaid USD wallet — per-token prices, cache pricing, holds, the $1.00 overdraft, and per-key budgets.","md",null,{},true,"\u002Fguides\u002Fbilling",{"title":7,"description":452},"guides\u002Fbilling","lspSI4QiOfxAsiCgBlNUnJi5-Y1OBoGAjFXGgNXEdQE",1793333617471]