TL;DR, so you don't have to scroll to the end: an API doesn't bill by "number of calls" — it bills by token. For the same model, output costs 4× more than input; and in a multi-turn conversation, every previous round gets resent and rebilled each time. Nail these two facts and your bill stops being a mystery.
What follows is real measured billing, not an estimate.
The API is standard OpenAI-compatible. A minimal call looks like this:
curl https://ai.dijinlong.com/v1/chat/completions \
-H "Authorization: Bearer your-key" \
-H "Content-Type: application/json" \
-d '{"model":"deepseek-v4.1-flash",
"messages":[{"role":"user","content":"Reply with exactly two words: got it"}],
"max_tokens":20}'
This block in the response is what you're billed on:
"usage": {"prompt_tokens": 35, "completion_tokens": 16, "total_tokens": 51}
prompt_tokens is what you sent (input), completion_tokens is what the model returned (output). Multiply each by its own price and add them up — that's the cost of the call.
I ran three near-identical prompts in different forms, watching only prompt_tokens:
The conclusion is a bit counter-intuitive: each Chinese character is indeed "pricier," but there are fewer of them, so the whole sentence lands about even with English (52 vs 53). Hard-translating Chinese into English to save tokens is pure wasted effort — you just add a layer of translation drift.
What you should actually watch is long Chinese text: at 1.33 tokens/char, a 10,000-character document stuffed into the prompt is 13,000+ tokens in a single shot.
I set a 75-character system prompt (simulating a support bot), then asked 5 short questions in a row, resending the full history each turn — which is what nearly every chat client and agent does by default.
At deepseek-v4.1-flash's real price on the model plaza (¥0.20 in / ¥0.80 out per million tokens), those 5 turns cost:
The direct takeaway: if you want to save money, control the output first. Halving your question saves at most 18%; shrinking the answer from 200 to 50 words saves the big chunk.
Prices change; check the model plaza for the current rates.
One more gotcha from testing: set this model's max_tokens to 8 and ask for a two-word reply, and completion_tokens still comes back 128 — all of it in reasoning_tokens. A reasoning model's "thinking" is billed as output, and a small max_tokens won't cap it. To cut spending, shorten the task or switch to a non-reasoning model; don't count on that parameter.
These are actual responses captured from real calls, not copied from docs.
{"code":"INVALID_API_KEY","message":"Invalid API key"}Bearer, not two.{"error":{"message":"The request parameter input is invalid or missing. Please check the value of this parameter."}}{"error":{"message":"Model is not supported by composite groups"}}{"error":{"code":"model_not_found","message":"Model \"xxx\" is not available"}}{"error":{"message":"All upstream providers for this model are rate-limited. Please retry later."}}{"error":{"message":"Upstream service temporarily unavailable"}}As an aside, the model plaza shows how many sellers and what discount each model has. In this screenshot, the DeepSeek family has 6 models with 6/6 official-price coverage:
Cost per call = total input tokens × input price + total output tokens × output price. Note that "total input" isn't "the words you typed" — it's everything sent out across every turn, summed.
To verify, log the usage from every response and look at the totals after a day. To wire your own program in, just change base_url — LONG AI's API is fully OpenAI-compatible.
GPT-6.2 cuts list prices 20%, yet platform discounts run deeper: gpt-6-astra trades at under 1% of list. What this week's AI price war means for buyer
Prompt caching stores a repeated prompt prefix and bills cache reads at 5-12% of normal input. Real prices, hit conditions, and how to cut your API bi
Twelve Claude versions are on sale. The newest opus-5-5 costs $8.91 a month; the oldest opus-4-6 costs $49.50. Full table and a pick for each workload
gpt-5.6-terra and deepseek-v4.1-flash win on price and reliability; gemini-3.8-flash is fastest. Effective prices, measured speed, and a three-tier pi
Point your base URL at the platform and one key covers all 138 on-sale models across 51 vendors, in both OpenAI and Anthropic request formats. Copy-pa