Billing and Pricing
XSI bills in real time from the actual usage reported by the upstream: tokens, cache, images, video seconds, audio duration, and search and tool calls can each be priced separately. Balances and charges are always in Chinese yuan (CNY).
Where prices come from
| Source | Description |
|---|---|
api/pricing.json | Default system price table, shipped with the image and loaded at startup; changes require a restart |
Tenant PRICING | Tenants override or add model prices through /x-config; each model's entry is replaced as a whole and takes effect immediately |
GET /x-pricing shows the system list price, the price after tenant overrides, and the account's final CNY price. See Pricing catalog API.
Currency and multipliers
The price table records the provider's list price in its original currency, which multipliers then convert to CNY:
Charge = list price Γ usage Γ model Rates Γ (fast tier multiplier, tokens only) Γ account Rates Γ account Factor| Multiplier | Set by | Description |
|---|---|---|
Model Rates | Price table | Conversion and markup factor. In the default price table, it is 7 for models priced in USD and 1 for models priced in CNY |
Account Rates | Parent account | A sub-account's value is not lower than its parent's; the difference between parent and child is the parent's resale margin |
Account Factor | Tenant owner | Price coefficient, useful for discounts and markups for different customers or channels |
Charges are deducted only from the calling account's own balance, never level by level up the ancestor chain. The parent's margin is realized when it transfers credit to a sub-account, converted at child.Rates Γ· parent.Rates.
Price table structure
{
"ChatPricing": {
"gpt-6.2-sol": {
"InputText": 2, "CachedText": 0.1, "CacheWrite": 2.5, "OutputText": 10,
"FastTokenMultiplier": 2, "Rates": 7,
"ContextTiers": [{"InputThreshold": 272000, "InputText": 4, "CachedText": 0.2, "CacheWrite": 5, "OutputText": 15}]
}
},
"ImgPricing": {"grok-imagine-image-quality": {"Sizes": {"1k": 0.05, "2k": 0.07}, "InputImage": 0.01, "Rates": 7}},
"VideoPricing": {"grok-imagine-video": {"Resolutions": {"480p": 0.05, "720p": 0.07}, "InputImage": 0.002, "Rates": 7}},
"AudioPricing": {"gpt-live-1": {"Unit": "per_minute", "Input": 0.05, "Rates": 7}}
}Chat models ChatPricing
| Field | Unit | Billed for |
|---|---|---|
InputText, InputAudio, InputImage | Per million tokens | Input that misses the cache |
CachedText, CachedAudio, CachedImage | Per million tokens | Cache reads (not counted again as input) |
CacheWrite | Per million tokens | Cache writes |
OutputText, OutputAudio, OutputImage | Per million tokens | Output |
ReasonText | Per million tokens | Prices reasoning tokens separately; if unset, reasoning tokens are included in output and billed at OutputText |
Query | Per call | Tool calls such as web search, x_search, and code execution; DeepSeek search and fetch |
Find | Per call | File search |
Page | Per page | Document pages |
SizeHigh, SizeMedium, SizeLow | Per call | Tiered tool calls in Responses |
Call | Per request | Fixed fee in CNY, not multiplied by the model Rates |
FastTokenMultiplier | Multiplier | Token multiplier for the fast tier (applies when greater than 1) |
ContextTiers | β | Long-context tiers, see below |
Other categories
| Category | Billing |
|---|---|
ImgPricing | (Sizes[size] Γ image count + InputImage Γ input image count + Call) Γ rate multiplier; sizes not configured use Call as the per-image price, and the grok-imagine series uses the highest configured price |
VideoPricing | (Resolutions[resolution] Γ seconds + InputImage Γ input image count + Call) Γ rate multiplier; duration 1β15 seconds, default 6 seconds; resolution defaults to 480p, and unknown resolutions are billed at the highest price |
AudioPricing | By duration (per-second billing) when Unit: "per_minute"; otherwise by tokens or characters |
RerankPricing | By token |
CallPricing | Fixed price per request |
FineTuningPricing | By token, for ft: models |
Image models that also appear in ChatPricing (such as gpt-image-2.6-*) are billed by token.
Caching
- Cache reads are billed separately at the
Cached*rates and are no longer counted as input. - Anthropic cache writes (
cache_creation_input_tokens, both 5-minute and 1-hour) are billed atCacheWrite. - OpenAI cache writes (
input_tokens_details.cache_write_tokens) are included in input: 30-minute writes are billed atCacheWriteand 12-hour writes at 2 ΓCacheWrite; if the model has noCacheWrite, the input price applies.
Fast tiers
| Value in request or response | Tier | Token multiplier |
|---|---|---|
speed: fast, service_tier: priority or fast | fast | The model's FastTokenMultiplier |
speed: ultrafast, service_tier: ultrafast | ultrafast | 6 |
default, standard, flex | Standard | 1 |
The tier reported in the upstream response takes precedence; if the response does not report one, the request value is used. Multipliers apply only to token charges.
Long-context tiers
When a request's total input tokens (including cache reads and writes) exceed a tier's InputThreshold, all tokens in that request are billed at that tier's prices; fields not set in the tier fall back to the base prices. For example, when input to gpt-6.2-sol exceeds 272000 tokens, the input and output prices become 4 and 15.
What gets billed
| Case | Billed |
|---|---|
POST request where the upstream returns 200 (any 2xx for video creation) | By actual usage |
| Streaming request disconnected midway | By usage generated so far |
| Upstream response missing usage | Estimated from output content and the conversation |
| GET, DELETE (fetching results, polling video, deleting files, etc.) | Not billed |
| Upstream error (non-200) | Not billed |
POST rejected by the resource allowlist, POST rejected by the model allowlist or a model-level limit (403/429), or a request body that cannot be parsed | XAPI_FEE (default Β₯0.012); a 429 from account-level rate limits is not charged |
| Successful, but the model is not in the price table | XAPI_FEE, and the operator is notified |
| Some management queries (see each endpoint) | XAPI_FEE |
XAPI_FEE appears on the bill under the model name XAPI and is capped at Β₯0.24.
Credit and expiry
- A balance is made up of multiple credits, each with its own amount, remaining balance, source note, and expiry time; the available balance is the sum of unexpired credits.
- Validity: admin top-ups follow
Days(default and maximum 365 days); initial credit granted when a tenant owner creates a sub-account lasts 1 year (100 years above 100 million); credit transferred by a regular manager expires no later than its source credit; signup bonuses last 1 month; subscription credit follows the plan period. - Credits come in two fund types: pay-as-you-go and subscription. Role 3 (subscription) accounts use subscription credit first and can fall back to the pay-as-you-go balance once it runs out.
- A charge can push the balance briefly negative; the debt is recorded as negative credit and is offset first by subsequent top-ups.
- When the balance drops below
USER_MIN_BALANCE β 0.01, the account is frozen (429) and recovers automatically after a top-up.