Skip to main content

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

FieldTypeRequiredDescription
messagestringYesUser message
contextstringNoAdditional context
tierstringNoOverride model tier: t1-t6 or auto (default: auto)
session_idstringNoSession 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:

TierModelCost (per 1M tokens)Best For
T1Llama 4 Scout (Workers AI)FREESimple queries, classification
T2Gemini 2.0 Flash$0.10 / $0.40Standard tasks
T3Gemini 3 Flash$0.50 / $3.00Complex reasoning
T4Claude Haiku 4.5$1.00 / $5.00Code generation
T5Claude Sonnet 4.5$3.00 / $15.00Complex code, planning
T6Claude Opus 4.5$5.00 / $25.00Critical decisions

Text-to-Speech

POST /v1/speech/tts

Convert text to speech audio.

FieldTypeRequiredDescription
textstringYesText to convert
voicestringNoVoice ID
tierstringNoTTS 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

FieldTypeRequiredDescription
agentstringYesAgent name (see list below)
querystringYesUser query
session_idstringNoSession ID for multi-turn
contextstringNoAdditional context

Available Agents

AgentDescription
business_assistantBusiness analytics and insights
supportCustomer support automation
inventoryInventory management advice
voice_orderingVoice-based order processing
content_suggestionContent creation suggestions
minervaSMS/Email messaging orchestration
maximusVoice 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"
}'