Baiyun API Tutorial: Get Started Quickly
From logging in, depositing, and creating keys to the first plaintext API request. Includes complete inspection steps, practical verification, and error handling.
Let's get started
This page helps you start using the site from website chat or API calls. The current scope of services is:Complete, verifiable plaintext requests。
Experience it on the website
- Register or log in to this site account.
- OpenWalletAfter confirming the Doken (WordKnife, DK) amount and the actual RMB payment amount, recharge via Alipay or WeChat; Current unit price is 0.30 RMB/DK.
- OpenChatting experienceSelect the open model and first submit a short, normal text question.
- ExistControl consoleView usage and consumption records.
Currently, consumption is based on balance; no membership subscription is required. Please read before recharging or calling the gameUsage rules。
Create a call key for the application
ExistKey managementCreate API keys for model calls; Set balance and model limits according to actual needs, and store them properly after saving.
The app uses theModel call key, not a web login password. Do not write keys into public code, screenshots, chat content, or browser-accessible frontend code. Leaked keys should be revoked and recreated in key management.
Configure the client
| Configuration items | Current filled content |
|---|---|
| API Base URL | https://api.baiyun.si/v1 |
| API Key | The call key created by the site's key management |
| Model | For example, gpt-6-luna; For the exact list, see Model Square |
| Interface | Text mode for Chat Completions or Responses |
Different clients define addresses differently: fill it in Base URL It is usually retained at that time /v1; If you are required to fill in the full Chat address, please fill it in https://api.baiyun.si/v1/chat/completions。 Don't put it away /v1 Repeat the splicing twice. Not all clients, plugins, and functions are compatible by default.
The first API request
Set environment variables on the local terminal to avoid entering the shared terminal or recording screen when entering the key:
read -r -s -p '请输入本站 API 密钥:' BAIYUN_API_KEY
printf '\n'
export BAIYUN_API_KEY
curl --fail-with-body https://api.baiyun.si/v1/chat/completions \
-H "Authorization: Bearer $BAIYUN_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "gpt-6-luna",
"messages": [{"role": "user", "content": "你好,请用一句话介绍你能帮我做什么。"}],
"stream": false
}'
A successful request returns the generated text and usage information, and deduct the DK balance from the listed reference unit price. 1 DK refers to the batch of tokens priced at 1 USD according to selected commercial API reference quotes, not fixed token quantities or cash convertible to US dollars. The above normal requests also generate a small amount of consumption.
The current 0.30 RMB/DK is the recharge price on this site, not the exact subscription cost proven by actual testing; Reference value and subscription cost for the same batch of tokens are shown in RMB or JPY conversionThree-step billing instructions。
If you want to continuously receive output, check itChat streaming example; When using Responses, the app can view itExamples of Responses。
Check the callable models
The model list interface also requires key authentication:
curl --fail-with-body https://api.baiyun.si/v1/models \
-H "Authorization: Bearer $BAIYUN_API_KEY"
The model that actually returns the current key shall prevail. If the model does not exist or is unavailable, please check the model name, key limits, and balance, and do not repeatedly retry unsupported requests.
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 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.