First Request

Prerequisites

Send a Request

Install the SDK for your language. For Python, run pip install openai (or pip install anthropic for the Anthropic SDK). For Node.js, run npm install openai.

Then send a chat completion request. The curl example uses the OpenAI protocol; Python and Node.js use the OpenAI SDK; the last example uses the Anthropic SDK with the native protocol:

terminal
bash
curl https://api.chuizi.ai/v1/chat/completions \
  -H "Authorization: Bearer ck-your-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-sonnet-4-6",
    "messages": [
      {"role": "user", "content": "What is the capital of France?"}
    ]
  }'

Verify in the Dashboard

After sending a request, go to app.chuizi.ai and check:

  • Logs — your request appears with model, token count, cost, and latency
  • Billing — the cost has been deducted from your balance
  • Overview — request count and token usage charts update

If the request shows up in the dashboard, your integration is working correctly.

Troubleshooting

ErrorCauseFix
401 UnauthorizedInvalid or missing API keyCheck that the key starts with ck- and is correctly set
402 Insufficient quotaBalance is zeroTop up at app.chuizi.ai/billing
404 Model not foundIncorrect model nameUse provider/model format (e.g., anthropic/claude-sonnet-4-6)
429 Rate limitedToo many requestsWait and retry, or adjust your rate limit settings

Next Steps