Skip to main content
Every request to the AutosnapAI API is authenticated with an API key. You can pass the key in any of the following ways:
  • Body parameter (POST/PATCH/DELETE): "api_key": "as_live_..."
  • Query parameter (GET): ?api_key=as_live_...
  • Authorization header: Authorization: Bearer as_live_...
  • X-API-Key header: X-API-Key: as_live_...
All methods are equivalent. Use whichever fits your architecture best.
For GET endpoints, pass the key as a query parameter:

API key format

Keys begin with one of two prefixes that make the key type obvious at a glance: Both key types work against the same production database.
Use test keys in development. Test quota overruns don’t disrupt your live traffic.

Creating and managing keys

Go to Dashboard -> API Keys at ai.autosnap.com:
  • Create key — generates a new key and shows it once. Copy immediately.
  • Deactivate — disables a key. It can no longer be used for API requests.
You can have multiple live and test keys active at once.

Securing keys

Never commit API keys to source control. If a key is leaked, deactivate it immediately from the dashboard and create a new one.
  • Store keys in environment variables or a secrets manager, not in code.
  • Use server-side calls only. Never expose a live key in a browser, mobile app, or public client-side code.

Response on invalid or missing keys

A missing API key and an invalid API key return different status codes: See Errors for the full error response format.

Next steps

Errors

Error response format and common error codes.