Skip to content

Handling 401 and 403 Errors

401 Unauthorized

Meaning: the server does not recognize your identity, usually a key issue.

CauseCheckFix
Key mistyped/incompletely copiedCompare against the original keyCopy it again (the original shown at creation), or delete and recreate
Key disabled/deletedStatus in the key list in the consoleRe-enable it or create a new one
Wrong request header formatShould be Authorization: Bearer sk-xxxCorrect the request header
Login password entered instead of API KeyConfirm you entered a key starting with sk-Switch to the API Key
Key expiredCheck the key's expiration timeRecreate it or extend the validity period

403 Forbidden

Meaning: the server recognizes you but refuses to let you access that resource.

CauseCheckFix
The group bound to the key has no access to this modelGroup model listSwitch groups or switch models
Group disabled/removedSite announcementsWait for it to be restored or switch groups
Channel rejection (risk control)Retry laterLower concurrency, or contact support (support@kuaiapi.net)
IP restrictedKey IP whitelistCheck 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)

Ready to get started?

Sign up and get $0.30 in trial credit; usage is billed per token in real time, so you pay only for what you use.

Sign up freeSee model pricing

For lawful and compliant use only. Please follow our Terms of Service and your local laws and regulations.