Base URL
All API requests should be made to:Authentication
The hans.ai API uses Bearer token authentication. Include your API key in the Authorization header:Getting your API Key
- Sign in to your hans.ai account
- Navigate to Settings → API Keys
- Create a new API key or copy an existing one
Request Format
All POST and PUT requests should include:Response Format
All responses are returned as JSON:Rate Limiting
API requests are rate limited to:- Free tier: 100 requests per hour
- Pro tier: 1,000 requests per hour
- Enterprise: Custom limits
Pagination
List endpoints support pagination:Error Codes
| Code | Description |
|---|---|
UNAUTHORIZED | Invalid or missing API key |
FORBIDDEN | Insufficient permissions |
NOT_FOUND | Resource not found |
VALIDATION_ERROR | Invalid request data |
RATE_LIMITED | Too many requests |
SERVER_ERROR | Internal server error |
SDK Libraries
Official SDKs are coming soon for:- JavaScript/TypeScript
- Python
- Go
- Ruby