authentication_error
HTTP 401. The request carried no usable credential.
{ "error": { "type": "authentication_error", "message": "Missing API key.", "docs_url": "https://galleyrender.com/docs/errors/authentication_error", "details": { "how_to_authenticate": "Send `Authorization: Bearer glr_sk_…` or `X-API-Key: glr_sk_…`.", "get_a_key": "https://galleyrender.com/docs/quickstart" } }}{ "error": { "type": "authentication_error", "message": "Invalid or revoked API key.", "docs_url": "https://galleyrender.com/docs/errors/authentication_error", "details": { "header": "Authorization: Bearer glr_sk_…", "get_a_key": "https://galleyrender.com/docs/quickstart" } }}Why this happens
Section titled “Why this happens”Three raise sites:
- Missing key — neither
AuthorizationnorX-API-Keywas present on a/v1request. Note thatX-API-Keyis only consulted whenAuthorizationis absent or empty. - Unknown or revoked key — the presented key’s hash matches no live key. Mistyped, truncated, from another environment, or revoked. The two cases are deliberately not distinguished.
- Invalid internal secret — the service-to-service onboarding routes under
/v1/internal/*reject a badX-Galley-Internal-Secret. Those routes are not public API.
A common cause is shell quoting: -H "Authorization: Bearer $GALLEY_API_KEY" with an unset
variable sends the literal string Bearer .
How to fix it
Section titled “How to fix it”Confirm the variable is set and is the whole key, glr_sk_ prefix included. Check you are calling
api.galleyrender.com and not the MCP host, which takes X-Galley-Api-Key instead. If the key
was revoked, issue a new one and redeploy. Full detail: Authentication.
Does retrying help?
Section titled “Does retrying help?”No. Nothing about the credential changes between attempts.