Billing Description
Understanding QCode.cc's billing methods, pricing data sources, and fee calculation logic
Billing Description¶
This document provides a detailed introduction to QCode.cc's billing methods and pricing logic, helping you understand how costs are calculated.
Billing Principles¶
QCode.cc bills based on token usage. Each time you call an AI model, the cost consists of two parts:
-
Input Tokens: The content you send to the model, including prompts, context, file content, etc.
-
Output Tokens: The response content generated by the model.
What is a Token? A token is the basic unit of text processed by the model. In English, 1 token is approximately 4 characters or ¾ of a word; in Chinese, 1 character typically corresponds to 1-2 tokens.
Cost calculation formula:
Total Cost = Input Tokens × Input Unit Price + Output Tokens × Output Unit Price
Pricing Data Source¶
Why not use official prices directly?¶
Prices publicly listed by model providers like Anthropic and OpenAI are for API calls, but they have not disclosed their complete internal token counting calculation rules (for example: whether system prompts are included, how tool use tokens are counted, how cache hits are priced, etc.). This causes discrepancies between estimates based on official prices and actual bills.
qcode.cc/models Pricing Table¶
To ensure transparency and fairness in billing, QCode.cc uses the model pricing table maintained on the official qcode.cc/models page as the billing benchmark:
Data source address: qcode.cc/models
Why use qcode.cc/models?
-
Real-Time Sync: Pricing on the models page is updated promptly when providers adjust prices.
-
Single Source of Truth: Uses the same pricing data as console billing and plan quotas.
-
Comprehensive Coverage: Covers all models from major providers like Anthropic, OpenAI, and Google.
-
Open and Transparent: All pricing is publicly accessible for anyone to view and verify.
-
Timely Updates: When model providers adjust prices, pricing data is updated promptly.
Main Model Pricing Reference¶
Pricing for commonly used models (unit: USD / million tokens):
Current model pricing¶
For live per-model rates (input / output / cache) always refer to qcode.cc/models — it is the single billing data source; this page no longer maintains a copy of the numbers to avoid drift from actual billing.
Rough magnitude (Haiku 4.5 input price = 1×):
- Claude family: Haiku 4.5 (1×) < Sonnet 4.6 / Sonnet 5 (≈3×) < Opus 4.8 / 4.7 (≈5×) < Fable 5 (≈10×)
- GPT family: see the models page for gpt-5.6 family (terra / sol / luna / mini / nano), gpt-5.5 and gpt-5.4 rates
You can list available models any time with an authenticated GET
https://api.qcode.cc/v1/models.
About Cache Pricing¶
Some models (such as the Claude series) support Prompt Caching, which caches repeated context content. Cache-related pricing:
-
Cache Write: The cost of writing content to cache for the first time, usually slightly higher than regular input prices.
-
Cache Read: The cost when hitting the cache, usually around 10% of regular input prices.
The caching mechanism can significantly reduce usage costs in scenarios with repeated context.
Billing Examples¶
Assume you use claude-sonnet-4-6 for a code Q&A session:
| Item | Quantity | Unit Price | Cost |
|---|---|---|---|
| Input tokens | 5,000 | $3.00 / million | $0.015 |
| Output tokens | 2,000 | $15.00 / million | $0.030 |
| Total | $0.045 |
In actual usage, a complete interaction with Claude Code usually involves multiple API calls (analyzing code, generating solutions, executing operations, etc.), so the actual cost will be higher than a single call.
Price Update Mechanism¶
-
QCode.cc regularly syncs with the latest pricing data from qcode.cc/models.
-
When a model provider announces price adjustments, qcode.cc/models updates pricing promptly, and we sync accordingly.
-
Price updates do not affect historical charges that have already been incurred; they only affect new usage after the update.
How to View Usage¶
Dashboard (Recommended)¶
Log in to the QCode.cc Console and navigate to the "Usage Statistics" page to view:
-
Model Call Details: Model, token count, and cost for each call.
-
Cost Summary: Daily and monthly cost statistics.
-
Plan Consumption Progress: Current subscription plan quota usage.
Viewing in CLI¶
Use the /cost command in Claude Code to quickly view the usage overview for the current session:
/cost
Tip: The cost shown by
/costis an approximate value. For accurate data, please refer to the Dashboard.
FAQ¶
Is your price the same as the official price?¶
Our token unit prices come directly from the qcode.cc/models pricing table and are consistent with the API prices publicly listed by each provider. The main difference lies in the token counting method—providers' internal token counting rules are not fully disclosed, so there may be minor discrepancies with the /cost estimate in the CLI.
How often is pricing data updated?¶
We sync with the qcode.cc/models data source regularly. Updates are typically completed within a few days after a provider announces price adjustments.
How can I verify the prices myself?¶
You can directly view the qcode.cc/models pricing data:
-
Visit qcode.cc/models.
-
Search for the model name you use (e.g.,
claude-sonnet-4-6). -
Check its input price and output price.
-
Prices are listed per million tokens.
Why use a public pricing table instead of custom prices?¶
Choosing an open, transparent single source of truth ensures fairness. The qcode.cc/models pricing table is publicly accessible, and anyone can review and verify it, avoiding pricing disputes.
Related Pages¶
- Plans & Pricing — View current plans and discounts
- Models & Pricing — View real-time pricing and rates for all supported models