AI Astrologers
Build conversational astrology experiences with AI astrologers that compute real Vedic birth charts before responding — no generic horoscopes. Two modes available: text-based Chat and real-time Voice calls. Both support single-chart (one person) and two-chart (compatibility/matching) sessions.
How it works
Every AI astrologer session is anchored to a real birth chart. When you open a session with birth details, the system computes a full Vedic kundli — planets, houses, dashas, transits, divisional charts — and the astrologer draws on that data for every response. The chart is computed once at session start and carried through the entire conversation automatically.
Session flow:
- Call
/start(or/match-startfor two charts) with birth details + astrologer key. - Server computes the chart, returns a
session_idand the astrologer’s opening greeting. - For each user message, call
/messagewith thesession_id— the chart context travels with the session. - Each response includes the reply, suggested follow-up prompts, and a billing summary.
Available astrologers
Pass the astrologer key when starting a session. Each astrologer
has a distinct persona and specialization — it requests only the
astrological data relevant to its domain, keeping responses focused and fast.
| Key | Name | Specialization | Modes |
|---|---|---|---|
guruji |
Guruji | General-purpose Vedic astrologer. Life, career, relationships, health, dashas, transits. | Chat, Voice |
love_guru |
Love Guru | Romance, relationships, and marriage. Focuses on 5th/7th houses, Venus, D9 Navamsa. | Chat, Voice |
career_expert |
Career Expert | Career and finance. 10th house, Amatyakaraka, D10 chart, professional timing. | Chat |
health_expert |
Health Expert | Health and wellness. 6th house, planetary afflictions, health-period timing. | Chat |
transit_expert |
Transit Expert | Current transits and their natal effects. Saturn, Jupiter, Rahu-Ketu analysis. | Chat, Voice |
astrologer value returns a
VALIDATION_ERROR with the list of available keys in the error message.
Chat vs Voice
Both modes share the same underlying astrological engine and session model. The difference is the transport and output format.
| Chat (Text) | Voice (Call) | |
|---|---|---|
| Transport | REST — JSON in, JSON out | REST (turn-based) or WebSocket (realtime) |
| Output | Text chunks for chat bubbles | Text + TTS audio URL (turn-based) or live bidirectional audio (realtime) |
| Latency | ~1.5–3s per turn | ~2–4s (turn-based), sub-second (realtime) |
| Endpoints | 3: start, message, match-start | 4: start, message, match-start, realtime-token |
| Best for | In-app chat, chatbots, text UIs | Voice assistants, phone-like experiences, IVR |
Full endpoint references: AI Chat documentation → | AI Voice documentation →
Authentication
All AI astrologer endpoints require an API key via the X-Api-Key header.
| Method | Example |
|---|---|
| Header (recommended) | X-Api-Key: am_live_xxxxxxxxxxxx |
| Bearer | Authorization: Bearer am_live_xxxxxxxxxxxx |
See authentication for security considerations and key rotation.
Billing
Every AI response includes a billing object reporting the cost of
that turn and your remaining wallet balance. All monetary values are in
minor units (paise for INR, cents for USD).
| Field | Type | Description |
|---|---|---|
cost_minor | integer | Cost of this turn in minor units (e.g. 2000 = ₹20.00). |
currency | string | INR or USD. |
wallet_balance_minor | integer | Remaining wallet balance after debit. |
wallet_balance_human | string | Formatted balance string (e.g. “₹480.00”). Uses Indian comma format for INR. |
Language support
The astrologer picks its response language using a three-priority system:
| Priority | Source | Behaviour |
|---|---|---|
| 1 (highest) | User’s typed language | If the user writes in Hindi, the astrologer replies in Hindi regardless of settings. |
| 2 | preferred_language param | The language code sent in /start (e.g. en, hi). |
| 3 (fallback) | English | Default when no preference is detected. |
Hinglish (mixed Hindi-English) is supported naturally — the astrologer matches the user’s register.
Common errors
| HTTP | Code | Cause |
|---|---|---|
| 400 | VALIDATION_ERROR | Missing or invalid required fields, unknown astrologer key. |
| 400 | MISSING_FIELD | A required field is absent from the request. |
| 400 | INVALID_DATE | Date values out of valid range. |
| 400 | INVALID_TIME | Hour/minute out of range. |
| 400 | INVALID_TIMEZONE | Non-IANA timezone value. |
| 400 | INVALID_COORDINATE | Latitude/longitude out of range. |
| 400 | INVALID_SESSION | Session ID not found or expired. |
| 401 | AUTH_MISSING_KEY | No API key in request. |
| 401 | AUTH_INVALID_KEY | Key format invalid or not found. |
| 402 | INSUFFICIENT_BALANCE | Wallet balance too low to continue. |
| 405 | METHOD_NOT_ALLOWED | Non-POST request. |
Error response format
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Unknown astrologer: xyz. Available: guruji, love_guru, career_expert, health_expert, transit_expert"
}
}
Endpoint references
- AI Chat (Text) —
start,message,match-start - AI Voice (Call) —
start,message,match-start,realtime-token