thairouter
Account

Billing & credits

Prepaid, per token, no subscriptions. Every charge traceable to a usage id.

Credits

Your account holds a credit balance. One credit equals one Thai baht of token usage, and balances are tracked in millionths of a credit so tiny requests are billed exactly rather than rounded up. All API keys on the account, and the playground, spend from the same balance.

Prices

Per one million tokens. Input is what you send (all messages, including history); output is what the model generates, reasoning included.

ModelInputOutput
thairouter/glm-5.3-flash฿5฿15

Worked example on GLM 5.3 Flash: a request with 1,200 prompt tokens and 400 completion tokens costs 1200/1e6 × 5 + 400/1e6 × 15 = ฿0.0120.

Reserve, then settle

Reserve

Before the request reaches the model, we estimate prompt tokens (roughly one token per two bytes of the messages JSON, plus 32 for template overhead) and assume the completion will use all of max_tokens, or the model's full output budget if you omitted it. That amount is deducted. If the balance is too low the request stops with 402 insufficient_quota and nothing is charged.

Settle

When the model server reports real usage, we compute the true cost and credit the difference back. If the prompt estimate was low, the shortfall is debited instead. Either way, the ledger ends at the real cost.

Failure

  • Model server error or unreachable: full refund, request logged with status error.
  • Client disconnects mid-stream before the usage chunk: charged the reservation, because we never learn the real count. Keep max_tokens realistic.
  • Rejected before the reservation (400, 401, 404, 413, 429): never charged, never logged.
Because max_tokens drives the reservation, omitting it on GLM 5.3 Flash reserves 131,072 output tokens, about ฿1.97 plus the prompt, even for a one-line answer. A low balance will see 402 until you set max_tokens to something realistic or top up. Reasoning tokens count as output, including when reasoning.exclude hides them.

Reading the cost

Non-streaming responses carry the settled cost in credits.

"thairouter": { "usage_id": "7d0a2b6c-…", "cost": 0.002975 }

Streams return only the x-thairouter-usage-id header; compute cost from the final usage chunk and the prices above, or look the id up in your logs once it settles.

Topping up

  • Go to Dashboard → Credits. Payment is by Stripe Checkout: cards and PromptPay.
  • Presets of ฿100, ฿300, ฿500, ฿1000, or any amount from ฿50 to ฿100,000.
  • Credits appear on the balance as soon as Stripe confirms the payment, usually within seconds.
  • Credits don't expire. There is no auto-recharge yet; watch the balance on the dashboard.

Ledger and logs

Logs show one row per request: model, key, tokens, cost, status, latency and the usage id. Credits shows the ledger: top-ups, adjustments and one net usage entry per request, tied to the same usage id. A reservation is rewritten into its final cost when the request settles and removed when it is refunded, so the ledger is what actually changed your balance. Prompt and response text are never part of either. See Privacy & logging.