Billing Description

Understanding QCode.cc's billing methods, pricing data sources, and fee calculation logic

Updated 2026-10-22

Need an API key? Sign up →Endpoints & base URLs →

On This Page

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

How the price is calculated

QCode price = official API price × service rate

The service rate is the routing and proxy service fee. The platform sets it per provider, so it can differ between providers. Each model's final unit price and the current rate are shown in the rate cards at the top of qcode.cc/models — that page is also the single source of truth used for billing.

Separately, providers publish list prices for API calls but have not disclosed their complete internal token-counting rules (for example: whether system prompts are counted, how tool-use tokens are counted, how cache hits are priced). That is why an estimate and the actual bill can still differ slightly.

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.

Supported Model Families

QCode supports seven model families: Claude, GPT / Codex, Gemini, GLM, Kimi, DeepSeek and Qwen. There is no grok.

The four Chinese families (GLM / Kimi / DeepSeek / Qwen) share the same cr_ key and the same endpoints as the first three. For the ids currently on sale (such as glm-5.2, kimi-k3, deepseek-v4-pro, qwen3.7-max) rely on qcode.cc/models; for how to fill in the protocol and model name see Chinese Models.

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 5 (≈2×) < Sonnet 4.6 (≈3×) < Opus 5 / 4.8 (≈5×) < Fable 5 (≈10×)
  • GPT family: see the models page for gpt-6 family (sol / astra) and gpt-5.6-sol / gpt-5.6-terra 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.

Long-context billing for GPT models

The GPT series (gpt-6.1-sol, gpt-6-sol, gpt-6-astra, gpt-5.6-sol, gpt-5.6-terra) follows the same rule as OpenAI and uses two tiers based on the input length of a single request:

  • Input tokens of one request (including the part served from cache) at or below 272K: billed at the standard unit prices

  • Above 272K: the entire request is billed at long-context prices — input and cache-read unit prices are 2×, the output unit price is 1.5× (the factors apply to the whole request, not only to the part above 272K)

Per-model long-context prices are listed on qcode.cc/models in the ">272K" line under each GPT price. The Claude series and all other families have no long/short tiers.

Long conversations keep growing. When the context approaches 272K, use your client's compaction feature (such as /compact in Codex) or start a new session, so the request stays in the standard tier.

Billing Examples

Assume you use claude-sonnet-5 for a code Q&A session:

Item Quantity Unit Price Cost
Input tokens 5,000 $2.00 / million $0.010
Output tokens 2,000 $10.00 / million $0.020
Total $0.030

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.

Plans and Quota

Billing is always per token; the plans differ only in how the quota is granted:

Plan Quota form Reset / validity
Personal plan Daily quota Resets at 00:00 Beijing time
Booster pack Extra quota for the day Resets separately at 02:00 Beijing time the next day
Pay-as-you-go Pack Total quota for the validity period Small / Medium / Large / XL Pack, all valid for 7 days; renewal stacks, leftovers void on expiry
Enterprise Team Per account See the Enterprise guide

For pack prices, renewal and expiry rules see Pay-as-you-go Packs; to compare the options see How to Choose a Plan. When the quota runs out the response is HTTP 402, see the error reference.

On a cloud server the spend splits in two: the server is charged for the term you pick (1, 3, 6 or 12 months), the models per token. Picking the machine is covered in Cloud Servers: Picking, Buying and Using, the server-side rules in Cloud Server Billing and Rules, and running agents on it in Run agents on a cloud server.

How to View Usage

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 /cost is an approximate value. For accurate data, please refer to the Dashboard.

FAQ

Is your price the same as the official price?

Not exactly. QCode price = official API price × service rate, where the service rate is the routing and proxy service fee that the platform sets per provider. Each model's final unit price and the current rate are on qcode.cc/models, which is the single source of truth used for billing.

Separately, providers' internal token-counting rules are not fully disclosed, so the CLI's built-in /cost estimate and the actual charge shown in the Dashboard can still differ slightly.

Why is a long-context request more expensive than usual?

For the GPT series, once a single request's input (including the cached part) exceeds 272K tokens, the entire request is billed at long-context prices (input and cache read 2×, output 1.5×), which matches OpenAI's own rule. See "Long-context billing for GPT models" above. The Claude series has no tiers.

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:

  1. Visit qcode.cc/models.

  2. Search for the model name you use (e.g., claude-sonnet-5).

  3. Check its input price and output price.

  4. 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.

How is a Pay-as-you-go Pack's quota deducted?

Billed per token like every other plan, with per-model rates on qcode.cc/models; the cost is deducted from the pack's total quota, which does not reset daily and lasts until it is used up. See Pay-as-you-go Packs.

Can I get a refund on a Pay-as-you-go Pack?

No. Packs are not refundable, and remaining quota is void after expiry.

Enterprise customers: the QCode Enterprise Team plan supports corporate bank transfer, and we can sign a formal service agreement. From ¥320 per person per month — see the Enterprise Guide or ask at qcode.cc/enterprise.

Get started with QCode

One API key for Claude Code, Codex and more — billed per token, per-model prices on qcode.cc/models

Enterprise →