Skip to main content
Every request to the Deepshi API is authenticated with an API key sent as a bearer token.

API keys

You create and manage keys from your Deepshi dashboard. A key:
  • Is shown only once, at creation. Store it immediately, because Deepshi can’t show it to you again.
  • Does not expire. It stays valid until you rotate, revoke, or delete it.
Your key is a secret. Keep it server-side, load it from an environment variable, and never ship it in browser or mobile client code. If a key leaks, rotate or delete it from the dashboard right away.

Authenticating requests

Send the key in the Authorization header as a bearer token:
The SDK examples read the key from DEEPSHI_API_KEY in your environment. Set it with:

Rotating and revoking keys

From the dashboard you can:
  • Rotate a key to issue a new value and immediately invalidate the old one. Use this if a key may be compromised.
  • Revoke a key to disable it without deleting it. Requests with a revoked key return 403.
  • Delete a key to remove it permanently.

Authentication errors

See Errors & status codes for the full list.

Next steps

Credits & billing

How your prepaid balance and top-ups work.

Errors & status codes

The full list of status codes and how to handle them.