Handling 401 and 403 Errors
401 Unauthorized
Meaning: the server does not recognize your identity, usually a key issue.
| Cause | Check | Fix |
|---|---|---|
| Key mistyped/incompletely copied | Compare against the original key | Copy it again (the original shown at creation), or delete and recreate |
| Key disabled/deleted | Status in the key list in the console | Re-enable it or create a new one |
| Wrong request header format | Should be Authorization: Bearer sk-xxx | Correct the request header |
| Login password entered instead of API Key | Confirm you entered a key starting with sk- | Switch to the API Key |
| Key expired | Check the key's expiration time | Recreate it or extend the validity period |
403 Forbidden
Meaning: the server recognizes you but refuses to let you access that resource.
| Cause | Check | Fix |
|---|---|---|
| The group bound to the key has no access to this model | Group model list | Switch groups or switch models |
| Group disabled/removed | Site announcements | Wait for it to be restored or switch groups |
| Channel rejection (risk control) | Retry later | Lower concurrency, or contact support (support@kuaiapi.net) |
| IP restricted | Key IP whitelist | Check your outbound IP, and contact support (support@kuaiapi.net) |
Troubleshooting Tools
- First-call check: a feature on the key page that pinpoints the problem in one click
- Single request details: see the status code and reason for failed requests in usage records
- Raw curl test (to rule out client interference):
bash
curl https://kuaiapi.net/v1/models \
-H "Authorization: Bearer sk-your-key"Fallback Advice
- Make sure the key matches the group's platform protocol (don't use an Anthropic key to call an OpenAI endpoint)
- If it still cannot be resolved, keep the request ID / time / status code and contact support (support@kuaiapi.net)
