Billing in DEEIX Chat combines a billing mode, a per-model price, stacked multipliers, and separate tool pricing. This page shows how those pieces combine, which fields to set, and what each usage log records.
Where to find it#
Admin console > Billing. The page is one scroll with sections in this order:
- Billing mode and Payment settings
- Redemption codes
- Plans
- Model pricing
- Tool pricing (native tools)
- MCP tool pricing
Usage logs are read in the Logs, not on this page.
How a charge is calculated#
The final rate is the base price multiplied by every applicable multiplier:
base × service multiplier × permission group rate × time-of-day rate
The order matters:
- Pick the base price from the model's
pricingMode: token, call, duration, or tiered. - Apply the provider service multiplier (Anthropic fast mode, OpenAI
flexorpriority). - Multiply by the permission group Rate multiplier when the user's effective group matches the model. The lowest matching group rate wins.
- Multiply by the time-of-day rate if a period matches the server's local clock.
- For token and tiered pricing, resolve the cache write rate from the cache basis and cache timeout.
- Add per-call native tool and MCP tool items.
- Free models zero out the model charge. Self-use mode records usage without deducting.
Billing modes#
| Mode | What it does | User side |
|---|---|---|
| Self-use | Records usage only. No purchase, top-up, or plan deduction. | Usage records only. |
| Subscription billing | Plans grant period credit; calls consume it. | Subscription and remaining credit. |
| Usage billing | Calls deduct from the account balance. | Balance and top-up. |
Per-request reservation (billing.prepaid_amount_usd) is a risk budget reserved before each paid call in subscription and usage modes. The final bill still uses actual usage. Set it to 0 to distribute the available budget across up to 5 concurrent paid calls. After the request shape is known, the platform raises the reservation to the estimated cost so an underfunded request is rejected before any upstream charge.
Display currency (billing.display_currency) controls the currency users see. Accounting, deductions, and API fields stay in USD / nanousd. USD -> CNY rate (billing.usd_to_cny_rate) is used for CNY display and CNY payment amounts.
Model pricing modes#
| Mode | Basis | Use for |
|---|---|---|
Usage billing (token) | Input, output, cache read, cache write per 1M tokens. | Text and multimodal models. |
Per call (call) | Fixed price per call. | Fixed-cost operations. |
Per second (duration) | Price per generated second. | Video generation models only. |
Tiered (tiered) | A different token price per input-size range. | Long-context or provider tiered prices. |
A model can also be marked Free. Free models are not charged, and native tool billing is skipped for them. Setting duration on a model that does not support video generation is rejected.
Token and cache pricing#
Token pricing has four independent fields: input, output, cache read, and cache write. Cache pricing matches providers that charge differently for cached tokens.
Cache write price basis decides how the configured cache write rate is interpreted:
| Basis | Behavior |
|---|---|
direct | The configured rate is used as-is on every provider. |
anthropic_5m | The configured rate already includes the 5-minute premium. A 1-hour write costs 8/5 of it. |
When the basis is unset, Anthropic cache writes cost 5/4 of the configured rate for 5-minute writes and 2× for 1-hour writes. Non-Anthropic providers always use the configured rate. The usage snapshot records cache_timeout, cache_write_5m_multiplier, and cache_write_1h_multiplier so a bill can be explained later.
Service multipliers#
| Source | Multiplier |
|---|---|
Anthropic fast mode (speed: fast) | 6× |
OpenAI service_tier: flex | 0.5× |
OpenAI service_tier: priority | 2× |
OpenAI service_tier: priority on GPT-5.5 series | 2.5× |
| Permission group Rate multiplier | Percentage 1–10000, where 100 is base |
The permission group multiplier is set in Permission Groups. When model access control is on, the platform takes the lowest rate among the user's effective groups that intersect the model's groups. 0 means unset and is treated as 100.
Time-of-day multipliers#
Time-of-day multipliers apply a percentage on top of the base price by the server's local time. They work with every pricing mode.
- A period has a Name (max 32 characters), one or more Weekdays, a Start and End time, and a Rate.
100is the base price;120is 120%. The rate must be an integer from 1 to 10000.- An end time that is not after the start wraps past midnight. The weekday is judged by the start time's calendar day.
- Periods for the same model must not overlap, so at most one applies at any moment. Up to 32 periods are allowed.
- The result is stored in the billing snapshot as
schedule_period_nameandschedule_rate_percent, and shown in usage logs.
Tiered pricing#
Tiered pricing charges a different token price per input-size range. Each tier has an upToTokens limit and input, output, cache read, and cache write prices. Enter the full token count; 0 on the last tier means unlimited. Up to 100 tiers are allowed, and each limit must be larger than the previous one.
Tier matching uses the input-side total: input tokens plus cache read tokens plus cache write tokens. The snapshot records tiered_from_tokens and tiered_up_to_tokens.
Native tool billing#
Open Tool pricing. Native tool billing (billing.native_tool_billing_enabled) is on by default.
- Prices are per call. Set a price of
0to keep the tool recorded but not charged. - Only successful calls are billed; failed calls are not.
- Self-use mode records usage only.
- Free models are exempt from native tool billing, but MCP tool pricing still applies.
- Model tokens around the tool still follow model pricing.
- If the upstream reports no call count, no tool charge is created.
MCP tool pricing is configured separately under MCP tool pricing. It is not exempt for free models because the MCP call is an external upstream cost.
Plans#
A plan has a Name, Description, Price, Interval (month, year, or lifetime), Period credit, and a Permission group. Users subscribed to the plan automatically gain that group's model access. Plans are identified by a stable code; the built-in free plan cannot be used as a redemption reward.
Renewals, upgrades, and switches create subscription entitlement segments. New entitlements may take effect immediately or queue behind an existing segment depending on its end time.
Redemption codes#
A redemption code grants balance (usage) or a plan entitlement (period). Create codes in Redemption codes.
| Field | Notes |
|---|---|
| Code | 3–64 letters, numbers, hyphens, or underscores. Leave blank to generate a UUID. A manual code can only be created once. |
| Quantity | 1–100 codes per batch. |
| Billing mode | usage or period. It must match the current platform mode. |
| Redemption amount | For usage, must be greater than 0. |
| Plan | For period, must be an active non-Free plan. |
| Duration days | For period, must be greater than 0, up to 3660. |
| Total limit | Positive integer, or empty for unlimited. |
| Per-user limit | 1–100, and never greater than the total limit. |
| Expires at | Must be later than the current time. |
| Description | Free text. |
A code cannot be redeemed while the platform is in self-use mode, and a code only works in its own mode. Redemption history is kept even after a code is deleted.
Billing snapshots and usage logs#
Price changes affect future calls. Each call writes a snapshot with the prices and multipliers that were actually applied, so historical bills stay explainable. The Logs shows these fields in the usage detail:
| Group | Fields |
|---|---|
| Identity | platform_model_name, model_vendor, provider_protocol, upstream_name, upstream_model_name, routed_binding_code |
| Mode | billing_mode, pricing_mode, service_only, is_free_model, currency |
| Multipliers | rate_multiplier, billing_service_tier, fast_mode, schedule_period_name, schedule_rate_percent |
| Cache | cache_timeout, cache_write_5m_multiplier, cache_write_1h_multiplier |
| Rates | input_nanousd_per_m_tokens, cache_read_nanousd_per_m_tokens, cache_write_nanousd_per_m_tokens, output_nanousd_per_m_tokens, call_nanousd_per_call, duration_nanousd_per_second |
| Tiered | tiered_pricing_json, tiered_from_tokens, tiered_up_to_tokens |
| Charged | input_billed_nanousd, cache_read_billed_nanousd, cache_write_billed_nanousd, output_billed_nanousd, call_billed_nanousd, duration_billed_nanousd |
| Tools | server_side_tool_usage, native_tool_billing_enabled, native_tool_billed_nanousd, mcp_tool_usage, mcp_tool_billed_nanousd, service_items |
To explain a bill, open the usage detail and read the snapshot instead of comparing the current price table.
Import and export model pricing#
Import and Export move model prices as JSON. The root is an object keyed by platform model name:
json
Rules:
pricingModemust betoken,call,duration, ortiered.durationis accepted only for video generation models.- Tiered pricing accepts a
tieredPricingobject or atieredPricingJSONstring. - Time-of-day multipliers accept a
schedulePricingobject or aschedulePricingJSONstring, with no overlapping periods. cacheWritePriceBasisisdirectoranthropic_5m.- Unknown platform model names reject the import.
Troubleshooting#
| Symptom | Cause | Fix |
|---|---|---|
| A paid call is rejected before it starts | The reservation is higher than the remaining balance or period credit. | Lower billing.prepaid_amount_usd or top up the account. |
| A model shows no charge | It is marked Free, the billing mode is self-use, or no price is configured. | Check the free status, the billing mode, and the model price. |
| Cost is higher than the price table | A service tier, permission group rate, or time-of-day period multiplied the base. | Read rate_multiplier, schedule_rate_percent, and billing_service_tier in the snapshot. |
| Similar token counts cost differently | Cache read, cache write, or cache timeout differ. | Compare cache_* fields and cache_write_*_multiplier in the snapshot. |
| A tool call is not billed | Billing is off, the price is 0, the model is free, or no count was returned. | Check Tool pricing and the snapshot's server_side_tool_usage. |
| A redemption code cannot be redeemed | The mode does not match, the code is inactive, expired, or exhausted. | Check the code mode and status against the current billing mode. |
Reference#
| Item | Key or field |
|---|---|
| Billing mode | billing.mode (self, period, usage) |
| Per-request reservation | billing.prepaid_amount_usd |
| Display currency | billing.display_currency (USD, CNY) |
| USD -> CNY rate | billing.usd_to_cny_rate |
| Native tool billing | billing.native_tool_billing_enabled, billing.native_tool_pricing_json |
| Payment providers | billing.payment_providers, billing.stripe_publishable_key, billing.stripe_secret_key, billing.stripe_webhook_secret, billing.epay_gateway_url, billing.epay_types, billing.epay_pid, billing.epay_key |
| Model pricing API | platformModelName, currency, isFree, pricingMode, inputUSDPerMTokens, cacheReadUSDPerMTokens, cacheWriteUSDPerMTokens, cacheWritePriceBasis, outputUSDPerMTokens, callUSDPerCall, durationUSDPerSecond, tieredPricingJSON, schedulePricingJSON |