Authentication
All API requests require authentication via API key.
API Keys
Get your API key from the dashboard. Include it in the X-API-Key header.
# Include API key in header
curl -X POST "https://api.aiscan.io/v2/measurements/extract" \
-H "X-API-Key: pk_test_placeholder" \
-F "front=@front.jpg" \
-F "side=@side.jpg" \
-F "height=175"
Key Types
| Type | Prefix | Description |
|---|---|---|
| Live | pk_test_placeholder |
Production use |
| Test | sk_test_ |
Testing only |
SDK Authentication
# Python SDK
import aiscan
client = aiscan.Client("pk_test_placeholder_api_key")
# JavaScript SDK
const aiscan = require('@aiscan/sdk');
const client = new aiscan.Client({ apiKey: 'pk_test_placeholder_api_key' });
Security
- Never expose API keys in client-side code
- Use environment variables to store keys
- Rotate keys periodically
- Revoke compromised keys immediately