Integration guide
Quickstart | From Registration to Your First AI API Call
Go from registration and a top-up to your first model request: obtain your ZHUAN API key, configure the endpoint, then check a small request and its charge.
1. Register and top up
Register with a 5–32 character username and a password of at least 8 characters; no email address is needed. New accounts start at zero. In the console, top up by bank card or cryptocurrency. Your first top-up starts at USD 1. After it is credited, further top-ups start at USD 10. The maximum is USD 5,000 per order. Continue once the order is marked paid and credited.
2. Generate and save your API key
Select Generate on the API keys page. Each account has one effective key; later top-ups increase the balance of the same account. Store the key in a server-side ZHUAN_API_KEY environment variable, never in frontend code, screenshots or a public repository. Replace the placeholder below with your own key.
# macOS / Linux
export ZHUAN_API_KEY='sk-zhuan-your-key'
# PowerShell
$env:ZHUAN_API_KEY = 'sk-zhuan-your-key'
3. Check the model ID and price
Copy an exact model ID from the price catalog. You can also query the read-only model list below; listing models is not a generation request. The catalog syncs daily. Validate the parameters and API supported by the model during integration.
curl --fail-with-body https://key.zhuan.xyz/v1/models \
-H "Authorization: Bearer $ZHUAN_API_KEY"
4. Send a small first request
This request uses the OpenAI-compatible Chat Completions API with claude-sonnet-4-6 as an example. Generation requests incur usage charges. Verify the status and returned text before trying long context, streaming or tool calls.
curl --fail-with-body https://key.zhuan.xyz/v1/chat/completions \
-H "Authorization: Bearer $ZHUAN_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"model":"claude-sonnet-4-6","max_tokens":128,"messages":[{"role":"user","content":"Hello"}]}'
5. Check usage and troubleshoot
Check the model, tokens, charge and duration in the console request history. For errors, first verify the key, model ID and balance, then follow the status code. For 429, reduce load and back off rather than repeatedly resending concurrent requests. Share a request ID with support, not your complete key.