AI Gateway
Authenticated API
AI endpoints require a valid JWT Bearer token. Accessible via the API gateway at /v1/ai/*.
The AI Gateway routes requests through the ACP (AI Cost & Performance) Router, which automatically selects the optimal model tier based on query complexity.
Chat Completion
POST /v1/ai/chat
Send a message to the AI assistant with automatic model tier selection.
Request
| Field | Type | Required | Description |
|---|---|---|---|
message | string | Yes | User message |
context | string | No | Additional context |
tier | string | No | Override model tier: t1-t6 or auto (default: auto) |
session_id | string | No | Session ID for multi-turn conversations |
Example
curl -X POST https://dev.api.olympuscloud.ai/v1/ai/chat \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{
"message": "What are the top-selling items this week?",
"tier": "auto"
}'
Response
{
"response": "Based on this week's sales data, your top 5 items are...",
"model": "gemini-2.0-flash",
"tier": "t2",
"usage": {
"input_tokens": 150,
"output_tokens": 200,
"estimated_cost": 0.00012
}
}
Model Tiers
The ACP Router selects from 6 tiers:
| Tier | Model | Cost (per 1M tokens) | Best For |
|---|---|---|---|
| T1 | Llama 4 Scout (Workers AI) | FREE | Simple queries, classification |
| T2 | Gemini 2.0 Flash | $0.10 / $0.40 | Standard tasks |
| T3 | Gemini 3 Flash | $0.50 / $3.00 | Complex reasoning |
| T4 | Claude Haiku 4.5 | $1.00 / $5.00 | Code generation |
| T5 | Claude Sonnet 4.5 | $3.00 / $15.00 | Complex code, planning |
| T6 | Claude Opus 4.5 | $5.00 / $25.00 | Critical decisions |
Text-to-Speech
POST /v1/speech/tts
Convert text to speech audio.
| Field | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Text to convert |
voice | string | No | Voice ID |
tier | string | No | TTS tier: tts-t0 (free), tts-t1, tts-t2, tts-t3 |
curl -X POST https://dev.api.olympuscloud.ai/v1/speech/tts \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{"text": "Order 42 is ready for pickup", "tier": "tts-t0"}' \
--output audio.mp3
AI Agents
Invoke specialized LangGraph agents for domain-specific tasks.
POST /v1/agent/chat
| Field | Type | Required | Description |
|---|---|---|---|
agent | string | Yes | Agent name (see list below) |
query | string | Yes | User query |
session_id | string | No | Session ID for multi-turn |
context | string | No | Additional context |
Available Agents
| Agent | Description |
|---|---|
business_assistant | Business analytics and insights |
support | Customer support automation |
inventory | Inventory management advice |
voice_ordering | Voice-based order processing |
content_suggestion | Content creation suggestions |
minerva | SMS/Email messaging orchestration |
maximus | Voice AI assistant (Hey Maximus) |
Example
curl -X POST https://dev.api.olympuscloud.ai/v1/agent/chat \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{
"agent": "business_assistant",
"query": "Show me revenue trends for the last 30 days"
}'
Recommendations
POST /v1/ai/recommendations
Get AI-powered menu recommendations based on customer history and preferences.
curl -X POST https://dev.api.olympuscloud.ai/v1/ai/recommendations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{
"customer_id": "CUSTOMER_UUID",
"context": "dinner",
"limit": 5
}'
Forecasting
POST /v1/forecasting/predict
Get AI predictions for sales, labor needs, or wait times.
curl -X POST https://dev.api.olympuscloud.ai/v1/forecasting/predict \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{
"type": "sales",
"period": "next_7_days",
"location_id": "550e8400-e29b-41d4-a716-446655449110"
}'