Baiyun API tutorial: Usage, logs, and fee verification
Usage units, cache, actual consumption, and anomaly verification. Includes complete inspection steps, practical verification, and error handling.
Usage, logs, and cost reconciliation
Three different figures
Token is the unit of measurement used for model processing; DK is the station's balance and reference unit of valuation; RMB is the actual currency for topping up the payment. 1 DK corresponds to the batch of 1 USD tokens priced according to the selected commercial API reference price. The number of tokens is not fixed and cannot be exchanged for US dollars.
Start with a record
ExistUsage logSet call times, check models, inputs, outputs, caches, time consumption, and actual deductions. A single client operation may send multiple requests; Agent's multi-turn tool calls may also be billed separately. Don't estimate the total amount based solely on the last sentence length shown on the interface.
Model and contextual pricing
Prices are based on the model plaza. Different models, inputs, outputs, caches, and vertical and up/down document bits may use different rates. If the tool does not display a cache field, you should also check the server-side usage records; do not treat cache as free for all inputs.
Recharge and verify
Currently, the principal is converted at 0.30 yuan/DK, and the payment channel fee is shown at the cashier; For example, if you buy 10 DK, the principal is 3 yuan, plus a 5% channel fee, which is 3.15 yuan. The final amount is based on the actual amount on the order page. Channel fees do not enter DK balances, and order creation does not mean payment has been received.
Encountering an abnormality
Records time, model, anonymized request information, and order number, and checks whether multiple sends, automatic retrys, or other clients are running simultaneously. Do not submit full keys, passwords, or verification codes. If your balance is insufficient, you should recharge or stop calling the account. Do not attempt to reset the upstream limit to replace the site's balance.
Checklist before practical use
- Prepare your own account and access keys, and do not use others' shared credentials.
- Records client versions, systems, and models to be used for easy reproduction during troubleshooting.
- Save the original configuration or screenshot, hide keys, verification codes, and private content.
- Confirm that testing may consume a small amount of DK, starting with a single sentence and a single request.
- Review the current model plaza and status page before deciding whether to enable more features.
Detailed troubleshooting: There may be multiple requests in one round of operations
Client-side automatic summarization, title generation, retrys, and Agent tool rounds all add requests. First, record the start and end times of the test, then use the corresponding interval control logs. Check if multiple clients are running simultaneously to avoid counting usage from other programs as the current call.
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.