A 401 Unauthorized response means the server could not verify the identity attached to the request. It is usually unrelated to model quality or service capacity. The most common causes are an incomplete key, a malformed authorization header, a client still using an old key, or an account password being used where an API key is required.
Work through these checks in order before reinstalling anything.
Confirm You Have an API Key
A Zivv API key is created on the API Keys page and normally starts with sk-. None of these are API keys:
- Your website password
- A browser cookie
- A payment or order number
- The display name you gave a key
Paste the key into a plain-text editor and check for leading spaces, trailing spaces, or line breaks. Rich-text apps sometimes add invisible characters.
Test the Key Without Your Client
Bypass Claude Code, Codex, or a desktop client and request the model list directly:
curl https://zivv.pro/v1/models \
-H "Authorization: Bearer sk-your-key"Interpret the result:
| Result | Meaning | Next step |
|---|---|---|
| Model list returned | The key works | Check whether your client cached an old key |
| Still returns 401 | Key or header problem | Copy the key again and check Bearer formatting |
| Cannot connect | Not an auth result | Check the domain, network, and proxy settings |
OpenAI-compatible requests use Authorization: Bearer <KEY>. There must be one space after Bearer.
Check the Endpoint
Different tools do not always use the same base URL:
- OpenAI SDKs, Codex, and most desktop clients normally use
https://zivv.pro/v1 - Claude Code uses
ANTHROPIC_BASE_URL=https://zivv.prowithout/v1
A wrong endpoint more often produces 404, but some clients construct an invalid path and surface it as a generic authentication failure. See the endpoint reference for current paths.
Make Sure the Client Uses the New Key
Many persistent 401 errors come from stale configuration:
- The terminal was not reopened after changing environment variables
- A system variable and shell variable contain different values
- The selected model still belongs to an older provider profile
- A Docker container or remote workspace never received the local variable
Claude Code users should reopen the terminal and compare both variables with the Claude Code guide. Codex users can follow the Codex guide.
Check Key Status and Access
In the console, verify that:
- The key has not been deleted or disabled
- Its expiry date has not passed
- Its group is allowed to use the target endpoint
- Account balance and key limits are available
Some clients turn several server responses into a generic “authentication failed” message. Usage records can show whether the request reached the platform.
If the Key May Be Exposed
Do not keep testing it and never send the complete key to support. Instead:
- Delete or disable the old key
- Create a replacement
- Update every place that used it
- Review recent usage for anything unexpected
Use separate keys for each teammate, project, and automation. If one key leaks, you can revoke it without interrupting everything else. Teams provides separate keys and spending limits.
Shortest Useful Checklist
- Confirm it is an
sk-API key - Request
/v1/modelswith curl - Check the Bearer header format
- Verify the endpoint for OpenAI tools versus Claude Code
- Restart the client or terminal
- Review key status, balance, and usage
If the issue remains, send support the time, client, endpoint, error text, and the last four key characters, never the full key. The error reference explains response fields, and the AI API quickstart covers a clean first setup.