Symptoms
- The response says authorization is required or no API key was supplied.
- The same key works in a client that adds headers automatically.
Likely causes
- Authorization was omitted, stripped by a proxy, or attached to a different request.
- The client used a query parameter on a route that expects a Bearer header.
How to diagnose
- Inspect the outgoing request headers without printing the full secret.
- Confirm the final hop still contains Authorization: Bearer sk-… .
- Compare against the minimal curl example in the API key guide.
Fixes
- Send Authorization: Bearer followed by the TokenReply API key.
- Allow the Authorization header through reverse proxies and browser CORS configuration.
- Keep the key in a credential store or environment variable.
How to verify
Repeat a small non-streaming request and confirm the response is no longer an authentication error.