Baiyun Super Intelligence BAIYUN.SI
API integration tutorial

Baiyun API Tutorial: Understand Docen in Three Minutes

Free to read

RMB payments, DK balance, token usage: use small amounts to distinguish reference prices, subscription costs, and site selling prices. Includes complete inspection steps, practical verification, and error handling.

Three-Minute Lite Knife: How Does Doken (DK) Actually Calculate Money?

Update date: October 4, 2026 (Japan time)

1 Word Knife (1 DK) = the amount of tokens used at $1 based on the selected commercial API reference quote.

The full English name of Cidao is Doken, Writing by the organization DK。 First, use commercial API quotes to estimate how many DKs there are for the same batch of tokens, then calculate the cost of Codex subscriptions allocated to these tokens, and finally convert the actual cost in USD to RMB or Japanese yen.

These three steps are always about what you should look atExactly the same batch of tokens, just answering "how much is used," "how much the platform spends," and "how much is the cost converted to local currency?" Currently, this site 0.30 yuan/DK It's the recharge price; you can't say it's the exact cost without actual testing.

Step 1: First, use the commercial API to quote volume and generate DK

A token is a small fragment of AI-read and generated content, not necessarily equivalent to a Chinese character or an English word. Input, output, cache, and other categories are calculated based on their respective reference unit prices, and the history reread during multiple chats is also counted toward the input usage.

All of the following are teaching assumptions, not real model quotes, subscription packages, measured costs, or real-time exchange rates.

We fix a batch of text usage:100,000 input tokens, plus 80,000 output tokens。 Suppose the input price for the selected commercial API reference table is $2 per million token, and the output price is $10 per million token:

text
输入参考价值:100000 ÷ 1000000 × 2 = 0.2 参考美元
输出参考价值: 80000 ÷ 1000000 × 10 = 0.8 参考美元
这批用量合计:0.2 + 0.8 = 1 参考美元 = 1 DK

Here, the $1 is the reading on the commercial API quotation ruler,It's not the subscription fee the platform actually pays for this batch of tokens, and it's not your RMB payment amount.

Changing models, input-output ratios, hit caches, or entering different context price levels can also result in different token counts for 1 DK. Therefore,1 DK is not a fixed number of tokens and cannot be exchanged for 1 USD in cash。

Step 2: For the same batch of tokens, how much to share the subscription cost in USD

Now keep exactly the same input and output amounts as above, without changing the number of tokens or changing the batch of content. We then ask: How much does the platform actually allocate to this usage through Codex subscriptions?

Let's continue with a simple assumption: a full subscription period is paid $20, actually completed 500 batches of the same type and amount of the above text processing, no other dosage required. Each batch is measured according to step 1 to get 1 DK:

text
周期内完成的参考用量:500 批 × 1 DK = 500 DK
每批分摊的订阅费:20 实际美元 ÷ 500 批 = 0.04 实际美元

同一批 Token:API 参考价值是 1 美元,也就是 1 DK
同一批 Token:订阅费分摊成本是假设的 0.04 美元

For example, printing the same sheet of paper can result in different amounts between "pay-per-sheet" and "splitting costs from a limited monthly package." The paper hasn't changed, and the token usage here hasn't changed either; What has changed is the charging method and usage conditions.

This is the pressActual amount usedSubscription fees are evenly split, excluding servers, transaction fees, and other costs. If fewer batches are actually completed, the average cost will be higher. True accounting requires subscription bills, actual available and used records of the full cycle, and uses allocation methods suitable for the model and workload; The above assumptions cannot be directly applied.

Just because you pay $50 for a subscription, you can't guarantee it will definitely get a few hundred DK. Codex subscriptions have their own available scope and limits, not official commercial API balances; A higher API reference amount does not mean subscription fees have become more cash.

Step 3: Convert the actual cost in US dollars into RMB or Japanese yen

The real exchange is the second step 0.04 real dollar cost, not the first step for the 1 reference dollar for the fixed scale.

Assuming 1 USD = 7 RMB, 160 JPY during calculation:

text
同一批 Token 的人民币订阅成本:0.04 × 7 = 0.28 元
同一批 Token 的日元订阅成本:  0.04 × 160 = 6.4 日元

This is just a cost conversion for teaching examples, not real-time exchange rates or current measured costs, and does not mean accepting payments in yen. True accounting should clearly specify the source of exchange rates, timing, and actual payment criteria.

The cost is calculated, so what is the price on this site?

What we see is the same batch of tokens The numbers in this example The use of numbers
Commercial API Reference Value 1 reference USD = 1 DK Unified measurement for usage
Codex subscription cost sharing Assuming 0.04 actual US dollars, equivalent to 0.28 yuan or 6.4 yen Platform cost calculation
Current price on this site 0.30 yuan/DK Users recharge and spend expenses

Reference value, actual cost, and the price on this site are three different figures. The current price of 0.30 RMB/DK is the site's price, not the exact cost proven by the assumptions in this article, nor does it mean that 1 USD of the official commercial API is only sold for 0.30 RMB in cash.

The user grouping multiplier on this site is uniformly set at 1, with no recharge tier discounts. Models and input, output, cache, and long upper and lower document positions are still measured at the publicly announced reference prices and cannot be counted repeatedly; See details for detailsModel Square。

How do you view top-ups and deductions?

  1. You pay at the current selling price 3 yuan, gained 10 DK Balance.
  2. Suppose you get a single chat 0.2 DK, then deduct it 0.2 DK。
  3. The remaining balance remains 9.8 DK; The purchased balance used is equivalent to 0.2 × 0.30 = 0.06 yuan, which is 6 cents。

This example does not mean that every chat is fixed at 0.2 DK. After deducting DK, RMB will not be charged again, nor is there a need to use API references to US dollars and multiply the foreign exchange rate by the foreign exchange rate for charges.

If the recharge price changes later, the purchase cost of the balance should be understood based on the purchase price; Your purchase cost and platform subscription cost are two different things. Actual charges and system accuracy are subject to consumption records.

How do you trade DK with other units?

Writing style Meaning Calculated at the current price of 0.30 yuan/DK
1 DK 1. Ci knife Purchase price: 0.30 yuan
1 mDK A one-thousandth of a word knife, which is 0.001 DK Corresponding to a purchased balance of 0.0003 yuan
1 kDK One thousand word knives, that is, 1000 DK The purchase price is 300 yuan
1 MDK One million word knife, that is, 1,000,000 DK Purchase price: 300,000 yuan
Yuan/DK How much RMB is paid for every 1 DK purchased? Currently 0.30 yuan/DK
DK / million tokens How much DK does a certain class of one million tokens consume? Determined by model and pricing category
Yuan/million tokens The DK number in the previous row multiplied by the RMB purchase price Multiply the current unit price by 0.30

lowercase M is one-thousandth, uppercase M is one million; 1 kDK is not 1,000 tokens. These expressions only indicate usage volume, not the current minimum recharge, maximum order, or decimal precision; Daily wallet shows DK.

Usage conditions and historical description

The commercial API differs from Codex subscription availability, credit cycle cycles, and usage conditions. Even if the model name is the same, it cannot guarantee that the actual version, context, tools, stability, and usage rights are exactly the same. "Business tokens" are not officially classified as a type of technology and cannot be understood as either inherently smarter or dumber.

This site does not sell as an official OpenAI API commercial resale service; Pricing and measurement via commercial APIs does not mean subscribing to official APIs, nor does it mean obtaining authorization or service guarantees equivalent to official APIs. Currently, only compliant is availableUsage rulesplain text request.

Reference prices are based on the versions selected and published on this site; prices on the official website will not automatically sync with all models. Upstream information can be viewedOfficial API quotesGive meOfficial subscription usage instructions。

Currently, when using Alipay or WeChat RMB for top-ups, only the balance is used; no membership subscription is available on this site. The platform's subscription cycle will not add new user balances to weekly or monthly reset rules.

The existing fixed four-coin quote remains in placeQuotation announcement, these are not real-time exchange rate tables, nor do they mean that the corresponding currency is available for payment. The original text of the initial $200, 10x and four-week estimates remainsHistorical announcements archived; For current billing understanding, please read this page firstRecharge instructions。

Checklist before practical use

  1. Prepare your own account and access keys, and do not use others' shared credentials.
  2. Records client versions, systems, and models to be used for easy reproduction during troubleshooting.
  3. Save the original configuration or screenshot, hide keys, verification codes, and private content.
  4. Confirm that testing may consume a small amount of DK, starting with a single sentence and a single request.
  5. Review the current model plaza and status page before deciding whether to enable more features.

Detailed investigation: narrow down the scope of the problem in order

First, confirm that the account is complete, the key is valid, and the DK balance is sufficient, then verify the protocol, address, and model. Make a minimum text request using the same key; Only after it succeeds does it restore attachments, tools, or automatically retry each item. After saving the client configuration, reopen the session to avoid using the previous vendor in the old session.

How to confirm that this section has been learned

Don't just check the "Configuration saved successfully" prompt. You should be able to clearly state the current Base URL, key usage, chosen model, and request protocol, and be able to verify your operation results on the corresponding console. The client-side tutorial uses a single actual plain text response and corresponding logs as the initial completion standard; Account tutorials are based on comprehensive security information; The billing tutorial uses the correspondence between principal, channel fees, and DK as the standard.

If an error occurs, record the occurrence time, HTTP status, content of the anonymized error, and the actual expected result. Do not screenshot the entire page key, and do not give the password or verification code to others. For 401, authentication should be resolved first; for 400, parameters should be resolved first; for 429, intensive retries should be stopped; for 404, request paths and upstream verification should be verified; recharging cannot resolve all errors.

A small task suitable for practice

Complete the minimum steps in this section in your own testing environment, recording in text "how you originally set it, which item you modified, and what results you saw." Do not treat production data, real payments, or irrecoverable commands as exercises. If you encounter features beyond what this section offers, first check the corresponding protocol tutorial before considering adding features; Changing only one configuration at a time makes it easy to judge which step leads to errors.

The next step is the boundary of the version

Return to the full learning map · Streamlined API site configuration · Real-time status of this site。

The tutorial was compiled on October 9, 2026. The specific interface and capabilities may vary depending on the client and upstream versions; The configuration guidelines do not mean that all client versions have passed the test. For balance payments, QQ / Alipay login, and open channels, please refer to the actual page page; Compression interfaces: Previously, upstream 404 and raw image channels were not available, so don't assume configuration files can be automatically removed.

Once you've learned it, give it a try.

Use SIN1's 100 questions to check your foundation.

Take the test

Contact Baiyun SI Community

Contact via email.

For inquiries, needs exchange, or cooperation discussions, please send an email.