Skip to main content

Prepaid wallet

AtlasFlux uses a prepaid wallet system. You add credit (MYR) to your wallet, and each API request deducts the actual cost.

Adding credit

Add credit via the Billing Dashboard or through the API:

How billing works

  1. Reservation — Before execution, AtlasFlux estimates the cost and reserves it from your balance
  2. Execution — The request is processed by the selected model
  3. Settlement — Actual cost is charged; excess reservation is released
  4. If request fails — The complete reservation is released and the request cost is RM0.000000, including requests that already attempted search or content extraction

Cost components

The model provider reports reasoning tokens as part of its completion-token total. AtlasFlux separates that total into visible output_tokens and reasoning_tokens for observability, but reasoning tokens are not billed separately: they are folded into the output bucket and billed at the output rate. total_tokens is input_tokens + output_tokens + reasoning_tokens.

Per-request cost cap

Set max_total_cost_myr to impose a hard maximum for one request. AtlasFlux estimates the maximum cost before execution. If the configured output, search, and content limits could exceed your cap, the request is rejected with spend_limit_exceeded before model execution. Reduce max_output_tokens, search limits, or content pages, or raise the cap.

Unit system

All internal values use micro-MYR (1 RM = 1,000,000 micro-MYR). Per-request API costs are returned as MYR strings with six decimal places, such as "0.000431". Wallet and ledger calculations retain the underlying integer micro-MYR value; a small request is not rounded down to zero.

Cached input tokens

cached_tokens is populated only from token usage reported by the model provider. AtlasFlux does not estimate a positive cached-token count. A value of 0 means the provider did not report cached input for that request. Cached tokens are included in the provider’s total input-token count and are currently billed at the standard AtlasFlux input-token rate. The cached count is exposed separately for observability; it does not currently apply a customer billing discount.

Failed requests

A request recorded with status failed has costMicroMyr: 0 and does not deduct wallet credit. Any temporary reservation is released in full. A successful response remains billable even when its finish reason is a normal model limit such as length or cost_cap.

Insufficient balance

If your wallet balance is insufficient, the request returns:

Usage tracking

Every request is logged with:
  • Token counts (input, output, reasoning, cached)
  • Cost in micro-MYR
  • Latency
  • Routing category
  • Public model and customer-facing routing category
max_output_tokens, max_tokens, and max_completion_tokens cap the complete generated-token budget, including reasoning tokens; AtlasFlux does not add a second reasoning allowance when reserving balance. View usage in the Dashboard. The Logs dashboard displays individual request costs to six decimal places. Use the Refresh action on Overview, Usage, Logs, or Billing to fetch current server data; refreshing Usage preserves the active filters.