AiCredits
Pricing Decoded

How to Read an AI API Pricing Page Without Getting Confused: A Developer's Method

AI API pricing pages hide billing units, cache rates, and context cliffs. Learn a repeatable method to decode any pricing page and estimate real cost.

Published 2026-10-09 Updated 2026-10-09 9 min

Why AI API Pricing Pages Are Hard to Read on Purpose

A pricing page is not documentation. It is a contract summary written for whoever signs off on the invoice, not for whoever is shipping code on a Friday afternoon. The information you actually need, what the billing unit is, when it changes, and what counts toward it, is usually present. It is just scattered across model tabs, footnote asterisks, and a collapsible details panel that nobody opens.

The second problem is worse: comparing two pricing pages by their headline rate means comparing two different rulers. Every provider tokenizes text with its own vocabulary, so the same paragraph can produce a different token count on two different APIs. A page can truthfully claim a lower per-token rate and still cost you more per finished task. The fix is not to read harder, it is to read in a fixed order: find the unit, find the cliffs, then measure your own traffic.

Step 1: Find the Unit Being Billed

Before you compare anything, answer one question: what is the unit, and is it one unit or several? Modern APIs almost never bill a single number. Look for these line items, even when they are buried:

  • Input tokens: everything you send. System prompt, chat history, retrieved documents, tool schemas, images, and any boilerplate you paste on every call.

  • Output tokens: everything the model writes, including the preamble you planned to strip out.

  • Cached input tokens: a reused prefix billed at a lower rate than fresh input. Real savings, but only for the exact prefix you recycled.

  • Cache writes or storage: some pages charge to populate or retain a cache, others fold it into the input rate.

  • Reasoning tokens: on models that think before answering, the thinking can be billed even when it never appears in the response text.

  • Per-request minimums: a floor per call that quietly punishes the small, cheap-looking prompts you send most often.

  • Non-token units: images, audio seconds, embeddings, reranking, or per-seat fees that sit outside the token math entirely.

Step 2: Map the Axes, Not the Headline

A single number on a pricing page is one point on a multi-dimensional surface. Your workload moves around that surface, so you need to know which axes exist before you decide anything is cheap.

Line on the pageWhat it actually meansWhat to check
InputTokens you send, re-sent on every turn of a chatDoes conversation history get re-billed on each call?
OutputTokens the model generatesAre reasoning tokens counted in this column?
Cached inputA reused prefix billed at a lower rateWhat qualifies: exact prefix match, a minimum length, a time window?
Off-peak or batchThe same work, scheduled differentlyCan your workload tolerate a delay in exchange for a lower rate?
Context tierLong prompts can move into a higher rate bandWhere is the cliff, and does your prompt cross it?
Model tierA stronger model carries a higher rateDoes this task actually need the stronger model?

If a pricing page cannot tell you the cost of one call from your own codebase, you are not finished reading it.

Step 3: Measure Your Own Workload Instead of Guessing

The most reliable way to decode a pricing page is to stop reading it and log some usage. The response object tells you exactly what the provider counted, often with more precision than the page describes. Run one representative call and print every usage field.

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["AICREDITS_API_KEY"],
    base_url="https://api.aicreditsapi.com/v1",
)

def probe(prompt: str) -> None:
    resp = client.chat.completions.create(
        model="deepseek-v4-flash",
        messages=[{"role": "user", "content": prompt}],
        temperature=0.2,
    )

    usage = resp.usage
    prompt_tokens = usage.prompt_tokens or 0
    completion_tokens = usage.completion_tokens or 0
    total_tokens = usage.total_tokens or (prompt_tokens + completion_tokens)

    details = getattr(usage, "prompt_tokens_details", None)
    cached_tokens = getattr(details, "cached_tokens", 0) if details else 0

    print(f"prompt={prompt_tokens}  cached={cached_tokens}  output={completion_tokens}  total={total_tokens}")
    if prompt_tokens:
        print(f"output-to-input ratio: {completion_tokens / prompt_tokens:.2f}")
    print(resp.choices[0].message.content[:300])

if __name__ == "__main__":
    probe("In four bullets, list what a token-based API bills for.")

Two things matter in that output. First, the output-to-input ratio. If your workload is output-heavy, like drafting or code generation, then a page with an attractive input rate tells you nearly nothing about your bill. Second, watch whether prompt_tokens grows on turn two, turn three, and turn five of a conversation. If it does, you are re-buying your own history on every call, and any pricing page you read afterwards should be read through that lens.

Step 4: Test Whether Caching Actually Applies to You

The cache line is the most misunderstood row on any pricing page. A cache hit is cheaper than fresh input, but only when requests share a stable, byte-identical prefix. Long system prompts, fixed tool definitions, and a document preamble all qualify. Chat history that changes on every message generally does not. Send the same prefix twice and see what the provider reports.

import os
import time
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["AICREDITS_API_KEY"],
    base_url="https://api.aicreditsapi.com/v1",
)

# A long, identical prefix is what a cache hit needs.
PREFIX = "Context block used only to keep the prefix stable. " * 200

def call(question: str) -> tuple[int, int]:
    resp = client.chat.completions.create(
        model="deepseek-v4-flash",
        messages=[
            {"role": "system", "content": PREFIX},
            {"role": "user", "content": question},
        ],
        temperature=0,
    )
    details = getattr(resp.usage, "prompt_tokens_details", None)
    cached = getattr(details, "cached_tokens", 0) if details else 0
    return resp.usage.prompt_tokens, cached

for i in range(2):
    prompt_tokens, cached_tokens = call("Name two billing units a pricing page might not label.")
    print(f"call {i + 1}: prompt_tokens={prompt_tokens} cached_tokens={cached_tokens}")
    time.sleep(1)

If the cached count stays at zero, the cache row on that pricing page is decoration for your workload, and you should budget at the fresh-input rate. If it climbs on the second call, that row just became the most important line on the page. One clarification worth keeping straight: caching changes how a prefix is billed, not how much context it occupies. The full prompt still has to fit inside the model's context limit.

Sentences That Should Make You Slow Down

Almost every pricing page contains a handful of phrases that are technically accurate and practically misleading. When you see one, go find the footnote before you estimate anything.

  • Starting at. The lowest tier of model, the highest tier of usage, with everything cached. Almost never your workload.

  • Free tier. Often a rate limit wearing a budget costume. Heavy use hits the limit long before it exhausts the allowance.

  • Volume discounts. Check whether tiers apply retroactively to all usage or only forward from the crossing point. One token over a boundary can change the cost of the whole month.

  • Cached input, unexplained. If the page does not say what qualifies for a hit, or how long a cache survives, assume the best case will not apply to you.

  • Prices subject to change. A short or absent notice window is a real risk for a long-running batch job.

  • Per-request minimums. A floor per call means your cheapest-looking prompts, the tiny classification calls, may be the ones billed furthest above their token count.

A Ten-Minute Decode Checklist

  • Circle the unit. Tokens, requests, seconds, seats, or a mix of all four.

  • Split input from output, then find where cached input sits and what qualifies for it.

  • List every tier and cliff: model, context length, time of day, batch versus interactive.

  • Hunt for minimum charges, rounding rules, and whether failed or retried calls are billed.

  • Check whether reasoning tokens are billed in the output column.

  • Run a few hundred representative calls and log the usage fields from each response.

  • Compute your output-to-input ratio and your cache-hit rate from that sample.

  • Re-read the page. If you can now predict the cost of one call, it is decoded.

Where AiCredits Fits In

AiCredits exists for developers outside China who want DeepSeek models without a Chinese phone number or bank account. You pay with a card or PayPal and call an OpenAI-compatible endpoint, which is why every sample in this post uses the standard SDK with a custom base URL. The pricing structure is the one described above: input and output are separate, cache hits cost less than fresh input, off-peak work costs less than peak, and deepseek-v4-pro costs more than deepseek-v4-flash. Current rates live at aicreditsapi.com/pricing, and that page, not any blog post, is the source of truth.

As a default, reach for deepseek-v4-flash for nearly everything, including the measurement scripts above, and move a task to deepseek-v4-pro only when the quality difference justifies the higher rate. If you publish code samples like these, AiCredits also offers linting tools that catch the small breakages which make a snippet fail the moment someone copies it into their own project.

FAQ: Reading Pricing Pages

Are input and output tokens always priced the same?

Rarely. Generating text is more compute-bound than reading it, so output usually carries the higher rate. Finding the input-output split should be the first thing you do on any pricing page, because a model with an attractive input rate can still be expensive for output-heavy work such as drafting or code generation.

Why do two providers count a different number of tokens for the same text?

Tokenizers differ. Each model has its own vocabulary, so an identical sentence can map to different token counts on different vendors. That means headline per-token rates are not directly comparable across pages. The only fair comparison is estimated cost for your own prompts on each API.

Does cached input still count against my context window?

Yes. Caching changes how a prefix is billed, not how much room it occupies. The whole prompt still has to fit inside the model's context limit; a cache hit simply means part of it is charged at the lower cached rate.

Is the strongest model always the most expensive choice?

The direction is usually that stronger models cost more per token, and deepseek-v4-pro costs more than deepseek-v4-flash. But per finished task the picture can flip: a weaker model that needs retries, longer prompts, or a human re-check can end up costing more. Measure cost per completed task, not per token.

Do failed or retried requests cost anything?

Sometimes. A request that fails after the provider has already processed your prompt can still consume tokens, and a retry sends that prompt again. This is exactly why the checklist says to look for retry and minimum-charge language, and why logging usage from every response, including retries, is the only way to reconcile your estimate with reality.

Where can I see current AiCredits rates?

At aicreditsapi.com/pricing. Rates change over time, so treat that page as the source of truth rather than any figure quoted in an article, including this one, which deliberately quotes none.

Try Lint in 2 seconds

Wrote something? Paste it here for a free grammar check. No account needed.

More Tools →

Related Tools

💻Code Explainer

Was this article helpful?

| Share on X Reddit Copy link

服务器宕机了?别等用户告诉你

Wakeless 梦哨 帮你 30 秒监控网站 / API / SSL 证书,宕机秒级告警到邮箱、飞书、Slack。免费档 30 个监控,永久免费,无需信用卡。

免费开始监控 →
💬
反馈意见 / Feedback ×