Local configuration does not prove production configuration
A successful local test establishes that one process had a usable credential at that time. The deployed worker may use another environment, a stale secret version or a process that was not restarted. Diagnose without printing the full key into build output or placing it in a browser-accessible variable.
What to do next
- 01
Verify presence privately
Check that the server reads a non-empty value from the intended secret setting. Compare safe key identifiers with the account inventory and inspect expiry or revocation status.
- 02
Inspect header construction
Send exactly Authorization: Bearer followed by the account-created secret. Ensure a library does not add a second prefix or retain surrounding quotation marks and whitespace.
- 03
Repeat only a read-only call
After correcting deployment configuration, request /models from the same runtime path. This isolates authentication without creating media or consuming generation credits.
A concrete example
Illustrative failure: a hosting dashboard contains the correct secret, but the running worker started before it was saved. Restarting the intended worker loads the value; raising max_credits would not have changed the 401.
Before you call it ready
- The deployed process uses the intended setting.
- No secret is printed during diagnosis.
- The verification request does not create a job.
When to stop or choose another method
If the key is valid but the environment remains uncertain, pause generation and investigate configuration loading. Repeated paid requests are unnecessary authentication tests.
