Billing Guide

How Is an AI API Billed? Understand Tokens, Usage, and Multipliers

Estimate costs with live console prices and verify input and output Tokens, group multipliers, and request records.

Cost Estimate

Estimate Text Request Costs Using Live Unit Prices

No prices are preset. Enter the unit prices shown in the console at the time and the actual Token usage.

Console Price Basis

How AI API Costs Are Calculated

KHaiXAPI models, unit prices, pricing units, multipliers, and availability can change. This page does not store fixed prices. Refer to the console information and request record at the time of the request for actual costs.

AI APIs are usually billed by actual usage, not by the number of chats. Tokens are the most common usage unit for text models, and input and output often have different unit prices. Some models also record caching, reasoning, multimodal input, or tool calls separately.

Base text cost = Input Tokens ÷ Pricing unit × Input unit price + Output Tokens ÷ Pricing unit × Output unit price

If the console shows final unit prices, use them directly for the estimate. Apply a multiplier to the base cost only when the page explicitly shows a base price and settlement multiplier. Do not apply a multiplier again to a final unit price.

How Much Text Equals One Token?

A Token is a unit a model uses to process text. It is not equivalent to a fixed number of Chinese characters, words, or characters. Language, punctuation, numbers, code, spaces, and the model's tokenization all affect the result, so there is no permanently accurate conversion table for “one Token equals this many Chinese characters.”

In an AI application, input usage usually includes more than the final sentence visible in the input box. The application may also send system instructions, role settings, chat history, file contents, tool definitions, and other context, all of which affect input Tokens.

Billing Items That May Appear on Your Bill

Input Tokens

Content sent to the model, including user content, system instructions, chat history, file-processing results, and tool definitions.

Output Tokens

Text, code, or structured results actually generated by the model. Longer answers usually use more output Tokens.

Caching and Reasoning

Some models distinguish cache reads, cache writes, or reasoning-related usage. Whether these are billed separately depends on the model's rules.

Multimodal Input and Tools

Images, audio, video, files, web access, or tool calls may use different measurement methods and cannot be calculated directly with the text formula.

What an API Relay Multiplier Means

A multiplier usually represents the conversion between a base cost and the actual settlement cost. For example, 0.8x means settlement at 80% of the base cost, while 1.2x means settlement at 120% of the base cost. However, services may differ in how they define the “base cost” and whether the displayed price already includes the multiplier.

Console DisplayEstimation MethodImportant Note
Final input and output unit prices shown directlyCalculate Token usage using the final unit pricesDo not multiply again
Base unit prices and settlement multiplier shownCalculate the base cost first, then apply the multiplierConfirm which billing items the multiplier applies to

How CNY Recharge Converts to USD Service Credit

Recharge Conversion CNY 1 = USD 1 in usage credit
Payment Method Alipay

This USD value is account credit used by the platform to bill model requests. It is not a live foreign-exchange rate, nor is it US currency that can be withdrawn or transferred. Balance deductions are still settled according to the model, Token usage, group multiplier, and other actual billing items.

When recharging, select Alipay and enter the amount in CNY. After payment, usage credit is added at the conversion rate shown above.

Why the Same Question Can Cost Different Amounts

The same final question visible to the user does not mean the complete request sent to the model is identical. The following factors most commonly cause differences.

Longer Chat History

Ongoing conversations may repeatedly send earlier content, causing input Tokens to increase with each turn.

Additional Application Instructions

Different applications add system prompts, role settings, knowledge-base excerpts, or tool descriptions.

Different Models and Output

Models have different unit prices, and the length of generated content will not be exactly the same.

Retries and Parallel Requests

Network interruptions, automatic application retries, or multiple simultaneous requests may create several request records.

Verify a Request Record in Five Steps

After making a few test requests, check the model, Tokens, multiplier, and request status in order. Using a separate API key for each application makes the source easier to identify.

  1. Confirm that the model name actually used matches the application setting.
  2. Review the request time, status, and input and output Tokens.
  3. Verify the model unit price, pricing unit, and multiplier basis at the time of the request.
  4. Check for retries, parallel requests, or duplicate requests around the same time.
  5. Record the request details and to investigate unexplained costs.

How to Reduce AI API Usage Costs

  • Choose a model for the task: Simple organization and classification do not always require the most expensive model.
  • Control context: Start a new session when appropriate in long conversations to avoid repeatedly sending history that is no longer needed.
  • Limit output length: Clearly specify the required scope to reduce lengthy output unrelated to the task.
  • Reduce repeated files: Check whether the application attaches the complete document or knowledge-base content again with every request.
  • Check automatic retries: Understand the application's concurrency, retry, and background-task settings to avoid unintended duplicate requests.
  • Manage keys separately: Create an API key for each application and review usage and balance changes regularly.

What to Do When You Find Unusual Usage

First pause any application or related API key that may continue sending requests. Then record the request time, model, status, Token usage, and cost. Whether a failed, interrupted, or timed-out request incurs a charge depends on whether the upstream service actually processed it, whether usage data was returned, whether automatic retries occurred, and what the platform recorded.

If you cannot confirm the cause, prepare the request details and for investigation. For specific billing boundaries, also review the Terms of Service and Service-Specific Terms.

Frequently Asked Questions

What does an API relay multiplier mean?

A multiplier usually converts a base cost into a settlement cost, but different services may present prices differently. If the console already shows the final unit price, do not multiply it again.

How is Token billing calculated?

Text requests usually calculate input and output costs separately: divide input Tokens by the pricing unit and multiply by the input price, then divide output Tokens by the pricing unit and multiply by the output price. Apply multipliers or other billing items according to the actual rules.

How many Chinese characters equal one Token?

There is no fixed conversion. Token counts depend on language, punctuation, numbers, code, tokenization, and model implementation. Refer to the actual request record.

Why can the same question cost different amounts?

An application may also send system instructions, chat history, file contents, or tool definitions. Output length, retry count, and the model actually used may also differ, so the same visible question does not imply identical request usage.

Are failed or interrupted requests always free?

Not necessarily. Records depend on whether the upstream service processed the request, whether it returned usage data, and whether the application retried automatically. Check request status and usage in the console, and with the request details if anything is unclear.

Why is there no fixed model price list here?

Models, pricing units, multipliers, and availability can change, so static prices quickly become outdated. Refer to the live KHaiXAPI console information at the time of the request for actual prices.

Why does a CNY 1 recharge provide USD 1 in credit?

Recharging CNY 1 provides USD 1 in usage credit, with Alipay supported for payment. This USD value is account credit used to bill model requests, not foreign-currency exchange or withdrawable US dollars.