ERR_MARKER_API_KEY_INVALID — Marker API Key Invalid
HTTP Status: 502 Retryable: No Automatic retry: None. Authentication errors are permanent and not retried.
What the User Sees
Document processing service authentication failed. (ERR_MARKER_API_KEY_INVALID)
What Causes This Error
The MARKER_API_KEY Cloudflare Worker secret contains an invalid or expired Datalab API key. When the system submits a PDF to the Marker API, Marker returns 401 (Unauthorized) or 403 (Forbidden), indicating the API key is not recognized.
This is NOT retried since authentication errors are permanent — the same key will fail every time. The error is distinguished from ERR_MARKER_SUBMIT_FAILED (which handles transient 5xx errors) by checking the HTTP status code of the Marker response.
Common causes include: the Datalab account subscription lapsed, the API key was regenerated in the Datalab dashboard without updating the Worker secret, or the key was revoked due to abuse or billing issues.
Resolution Steps
For Users
- This error indicates a server configuration issue, not a problem with your document.
- There is nothing you can do to fix this on your end.
- Try again later or contact support if the error persists.
For Administrators
- Get a new API key from the Datalab dashboard at https://www.datalab.to/dashboard.
- Update the Worker secret:
Terminal window cd workers/api && echo "NEW_KEY" | npx wrangler secret put MARKER_API_KEY --env production - Verify the new key works:
Terminal window curl -X POST https://api.datalab.to/api/v1/marker \-H "X-Api-Key: $NEW_KEY" \ - Check the Datalab account billing status to ensure the subscription is active.
- After updating, trigger a test conversion to confirm the fix.
Related Errors
- ERR_AI_AUTH_INVALID — Similar issue with AI provider API keys