Authentication
The Annie Insights API uses API key authentication via the x-api-key HTTP header.
How It Works​
Include your API key in every request as an HTTP header:
x-api-key: YOUR_API_KEY
Example​
curl -X POST \
https://api.annie-insights.com/api/v2/clinical-images \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"PatientID": "P-001", "TimeStamp": "2026-05-24", "ImageName": "https://..."}'
Obtaining an API Key​
| Type | How to Get | Use Case |
|---|---|---|
| Sandbox Key | Available on the Sandbox page | Testing & development |
| Production Key | Contact api-support@hcds.ai | Production integration |
Security Best Practices​
warning
Never expose your API key in client-side code. Always make API calls from your backend server.
- Store keys securely — Use environment variables or a secrets manager
- Rotate keys periodically — Request a new key if you suspect compromise
- Use HTTPS only — All API endpoints require TLS encryption
- Monitor usage — Track your request count via response headers
Error Responses​
If authentication fails, the API returns:
{
"error": "Unauthorized",
"message": "Invalid or missing API key",
"statusCode": 401
}
See Error Handling for all error codes.