Documentation
Get started with the APAi intelligent travel booking engine.
Authentication
All API requests require a Bearer token. Include your API key in the Authorization header:
Authorization: Bearer ana_your_api_key_here
Get your API key by signing up or generating a sandbox key.
Base URL
https://apai.co/api/v1
Quick Start
1. Health Check
curl https://apai.co/api/v1/health \
-H "Authorization: Bearer ana_your_key"
2. Search Flights
curl -X POST https://apai.co/api/v1/search/flights \
-H "Authorization: Bearer ana_your_key" \
-H "Content-Type: application/json" \
-d '{
"origin": "JFK",
"destination": "LHR",
"departure_date": "2026-06-15",
"adults": 1,
"cabin_class": "economy"
}'
3. Create Booking
curl -X POST https://apai.co/api/v1/booking/create \
-H "Authorization: Bearer ana_your_key" \
-H "Content-Type: application/json" \
-d '{
"offer_id": "off_abc123",
"passengers": [{
"given_name": "John",
"family_name": "Doe",
"born_on": "1990-01-15",
"gender": "m",
"email": "john@example.com",
"phone": "+1234567890"
}]
}'
Core Endpoints
Search
Booking
Chat & Assist
Admin
Billing
Knowledge & Intelligence
Response Format
All responses are JSON. Successful responses include the requested data. Errors include an error field:
{ "status": "healthy", "active_sessions": 3 }
{ "error": "Invalid API key" }
Rate Limits
Rate limits are based on your subscription tier. The X-RateLimit-Remaining header indicates remaining requests.