// troubleshooting guide · d-id
D-ID API 401 Unauthorized Error
- Status
- Workaround available
- platforms:
- API
- updated:
- November 15, 2026
- reports:
- 4
- Method
- how we research
RUNBOOK · d-id/api-401-unauthorized3 FIXES
// quick answer
A 401 from the D-ID API almost always means the Authorization header is malformed: D-ID uses Basic auth with the key from Account Settings in the form API_USERNAME:API_PASSWORD. Send it exactly as "Basic <key>" and regenerate the key if you lost the original.
Most likely fix: Use the exact header format
How to fix it
// try these in order, the most common fix is first
FIX 1Use the exact header format
- 01Copy the key from studio.d-id.com > Account Settings (format API_USERNAME:API_PASSWORD)
- 02Send Authorization: Basic <your key>
- 03Don't prefix with Bearer and don't add your email
Did this fix it?FIX 2Regenerate the key
- 01Generate a new API key in Account Settings
- 02Store it right away; it's only shown once
- 03Update every environment that used the old key
Did this fix it?FIX 3Test with a simple call
- 01Call GET https://api.d-id.com/credits with the header
- 02If it returns 200, the key works and the problem is in the specific endpoint call
- 03Check for hidden whitespace or quotes in your env variable
Did this fix it?
Symptoms
Calls to /talks, /talks/streams, /agents or /credits return 401 Unauthorized even though the account and plan are active.
Why it happens
- C-01Using Bearer instead of Basic
- C-02Key re-encoded or missing the colon between username and password
- C-03Email plus key used instead of the generated key
- C-04Old key after regenerating a new one (keys are shown only once)
- C-05Extra spaces or quotes in the environment variable
// this guide also covers
- d-id api 401
- d-id api unauthorized
- d-id api key not working
- d-id basic authentication
Still not working?
If D-ID keeps failing, you're not alone. See every D-ID problem users report or the alternatives people switch to.
Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.
Talk to usThe same problem in other apps
All not loading, error messages & connection guides →
Synthesia 'Something Went Wrong' Error (Synthesia)
Loom Upload Failed (Loom)
Other D-ID errors
- D-ID Face Detection Error (No Face Detected)
- D-ID Image Blocked by Moderation (Celebrity Flag)
- D-ID Failed to Generate Video (Something Went Wrong)
- D-ID Video Stuck Processing (Status Stuck on Started)
- D-ID Not Enough Credits Error (402)
- How to Remove D-ID Watermark
- D-ID Voice Clone Not Working
- D-ID Agent Not Working (Embed or Stream Connection Failed)