PDFAccessibility.ai
← Docs
API keys

API Authentication

How to authenticate Developer API requests with API keys using the X-API-Key header.

X-API-Key header

Send API credentials with server-side requests using the X-API-Key header. Keep keys out of public repositories, static pages, and browser-visible code.

Key storage

Store API keys in environment variables or a secure secrets manager. Avoid hard-coding credentials in frontend bundles or mobile apps.

Rotation basics

If a key is exposed, rotate it and update the service using the key. Keep old keys disabled once traffic has moved to the replacement.

Checklist

Implementation checklist

  1. 1Create an API key
  2. 2Store it securely
  3. 3Attach it to server-side requests
  4. 4Monitor usage
  5. 5Rotate if exposed
FAQ

Questions about API Authentication

Should I call the API directly from browser JavaScript?+

Prefer server-side calls so API keys are not exposed to end users.

What should I do if a key leaks?+

Rotate the key, remove the exposed value, and update your application to use the replacement secret.