[{"data":1,"prerenderedAt":483},["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":473,"extension":474,"eyebrow":475,"meta":476,"navTitle":475,"navigation":477,"path":478,"seo":479,"stem":480,"updatedAt":481,"__hash__":482},"docs_en\u002Fguides\u002Fbilling.md",{"type":55,"value":56,"toc":460},"minimark",[57,67,72,116,119,131,134,138,141,218,221,225,228,241,251,255,262,277,284,288,299,306,362,365,369,372,397,401,423,427,433,440,444],[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,269,272,273,276],{},"The hold is sized to the most the request could cost: an upper bound on its prompt, worked out from the size of the request (each image counts at a fixed allowance), at the cache-miss price, plus your output cap at the output price, once for each answer you ask for with ",[129,266,267],{},"n"," (at most 128). It is usually several times the actual cost. A short request holds a few cents; a long coding-agent conversation holds more: up to about $0.41 on ",[129,270,271],{},"deepseek-v4.1-flash"," with the default cap of 8,192 output tokens, and up to about $1.80 on ",[129,274,275],{},"glm-5.3",", whose prices and default cap (32,768) are higher. You are only ever charged for actual usage; the hold just reserves room.",[58,278,279,280,283],{},"Your ",[203,281,282],{},"available balance"," is your balance minus the holds of requests still running.",[68,285,287],{"id":286},"overdraft","Overdraft",[58,289,290,291,294,295,298],{},"A request is admitted as long as your available balance is ",[203,292,293],{},"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,296,297],{},"at most $1.00",". The negative amount is deducted from your next top-up.",[58,300,301,302,305],{},"While your available balance is $0.00 or below, new requests fail with ",[129,303,304],{},"402 insufficient_credit"," until you top up.",[73,307,308,318],{},[76,309,310],{},[79,311,312,315],{},[82,313,314],{},"Moment",[82,316,317],{},"Available balance",[89,319,320,328,336,344,354],{},[79,321,322,325],{},[94,323,324],{},"Before the request",[94,326,327],{},"$0.030000",[79,329,330,333],{},[94,331,332],{},"Request admitted, hold of $0.409830 placed",[94,334,335],{},"−$0.379830 while it runs",[79,337,338,341],{},[94,339,340],{},"Request settles, actual charge $0.050000",[94,342,343],{},"−$0.020000",[79,345,346,349],{},[94,347,348],{},"Next request",[94,350,351,352],{},"refused: ",[129,353,304],{},[79,355,356,359],{},[94,357,358],{},"You top up $5.00",[94,360,361],{},"$4.980000",[58,363,364],{},"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,366,368],{"id":367},"key-budgets","Key budgets",[58,370,371],{},"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,373,374,381,384,391,394],{},[232,375,376,377,380],{},"A key's month-to-date spend is its settled charges ",[203,378,379],{},"plus the holds of its requests still running",".",[232,382,383],{},"Months are calendar months in Jakarta time (WIB, UTC+7).",[232,385,386,387,390],{},"A request is admitted while the key's month-to-date spend is below its budget. Once the spend reaches the budget, requests fail with ",[129,388,389],{},"402 key_budget_exceeded"," before they reach the model, and nothing is charged. The message names the budget.",[232,392,393],{},"The budget is a soft cap: a request admitted just below the budget can take the spend past it, by at most that request's cost. For example, with $9.95 of a $10.00 budget used, one more request is admitted; if it costs $0.08, the month ends at $10.03 and the next request is refused.",[232,395,396],{},"A budget only limits one key. It never lets a key spend more than your wallet balance.",[68,398,400],{"id":399},"failed-requests","Failed requests",[229,402,403,406,413,420],{},[232,404,405],{},"Requests refused by Laras Router (bad key, empty wallet, rate limit, invalid body) are never charged.",[232,407,408,409,412],{},"A request the model provider rejects with a ",[129,410,411],{},"4xx"," error is not charged; its hold is released.",[232,414,415,416,419],{},"A request that fails before any of the answer reaches you — the provider cannot be reached, answers ",[129,417,418],{},"5xx",", or times out — is not charged, and its hold is released at once.",[232,421,422],{},"A stream that is cut off after part of the answer has reached you ends with an error event and 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,424,426],{"id":425},"low-balance-email","Low-balance email",[58,428,429,430,380],{},"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 that amount and dropped again. Owners and admins can change the amount (from $0.50 to $100.00) or turn the alert off in the console under ",[203,431,432],{},"Settings → Profile → Email alerts",[58,434,435,436,439],{},"The same place controls the ",[203,437,438],{},"key budget"," alert: one email when a key reaches 80% of its monthly budget, at most once per key per month. Top-up receipts are always emailed, since they are your billing record.",[68,441,443],{"id":442},"where-to-see-charges","Where to see charges",[58,445,446,447,450,451,454,455,459],{},"The console shows your balance, every top-up and charge in the wallet history, and each request under ",[203,448,449],{},"Usage"," with its token split and exact cost. Include the ",[129,452,453],{},"X-Laras-Request-ID"," header value when you ask ",[62,456,458],{"href":457},"\u002Fsupport","support"," about a specific charge.",{"title":127,"searchDepth":461,"depth":461,"links":462},3,[463,465,466,467,468,469,470,471,472],{"id":70,"depth":464,"text":71},2,{"id":136,"depth":464,"text":137},{"id":223,"depth":464,"text":224},{"id":253,"depth":464,"text":254},{"id":286,"depth":464,"text":287},{"id":367,"depth":464,"text":368},{"id":399,"depth":464,"text":400},{"id":425,"depth":464,"text":426},{"id":442,"depth":464,"text":443},"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":473},"guides\u002Fbilling","2026-11-15","jyROG5ptMYOPdGQYfenvotzreUDktCCGuwdWbZfraVY",1796424410887]