API Overview
Everything you need to know about integrating with the AI Search API.
Base URL
All API requests should be made to:
https://search-api.atriai.chat
This endpoint requires Bearer token authentication.
Authentication
The AI Search API uses Bearer tokens for authentication. Include your Bearer token in the Authorization header.
Authorization
Authorization: Bearer your-bearer-token-here
- Bearer tokens are project-specific and must be active to function
- Each project has separate Bearer tokens for different services
- Keep your Bearer tokens secure and never share them publicly
- Different subscription plans have different usage limits
- Tokens are validated against the Supabase database and update last_used_at on each request
Request Format
The API accepts JSON requests with the following characteristics:
All requests must use JSON format
Currently, all endpoints use POST method
All text content should be UTF-8 encoded
Error Handling
The API uses standard HTTP status codes to indicate success or failure:
Request successful
Invalid request parameters or format
Invalid or missing Bearer token
Usage limits exceeded for your subscription plan
Server error during request processing
Error Response Format
Error responses follow this format:
Error Examples
Authentication Error
{ "detail": "Bearer token is required", "headers": { "WWW-Authenticate": "Bearer" } }
Usage Limit Error
{ "detail": "Searches limit exceeded. Upgrade your plan to continue searching." }
Bad Request Error
{ "detail": "search_type must be 'keyword' or 'hybrid'" }
Rate Limits
API usage is limited based on your subscription plan:
- Rate limits are applied per Bearer token
- Limits vary by subscription tier
- Usage is tracked automatically
- Contact support if you need higher limits
Security
Do not use this API for client-side calls as you will be exposing your API key.