AI

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:

  1. Call /start (or /match-start for two charts) with birth details + astrologer key.
  2. Server computes the chart, returns a session_id and the astrologer’s opening greeting.
  3. For each user message, call /message with the session_id — the chart context travels with the session.
  4. 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.

KeyNameSpecializationModes
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
Validation error on unknown key. Passing an unrecognized 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)
TransportREST — JSON in, JSON outREST (turn-based) or WebSocket (realtime)
OutputText chunks for chat bubblesText + TTS audio URL (turn-based) or live bidirectional audio (realtime)
Latency~1.5–3s per turn~2–4s (turn-based), sub-second (realtime)
Endpoints3: start, message, match-start4: start, message, match-start, realtime-token
Best forIn-app chat, chatbots, text UIsVoice 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.

MethodExample
Header (recommended)X-Api-Key: am_live_xxxxxxxxxxxx
BearerAuthorization: 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).

FieldTypeDescription
cost_minorintegerCost of this turn in minor units (e.g. 2000 =  ₹20.00).
currencystringINR or USD.
wallet_balance_minorintegerRemaining wallet balance after debit.
wallet_balance_humanstringFormatted balance string (e.g. “₹480.00”). Uses Indian comma format for INR.
Voice realtime billing. Realtime voice sessions use a per-minute meter model: an initial charge on connect, then recurring charges every 60 seconds while the session is active. See Voice → Realtime for details.

Language support

The astrologer picks its response language using a three-priority system:

PrioritySourceBehaviour
1 (highest)User’s typed languageIf the user writes in Hindi, the astrologer replies in Hindi regardless of settings.
2preferred_language paramThe language code sent in /start (e.g. en, hi).
3 (fallback)EnglishDefault when no preference is detected.

Hinglish (mixed Hindi-English) is supported naturally — the astrologer matches the user’s register.

Common errors

HTTPCodeCause
400VALIDATION_ERRORMissing or invalid required fields, unknown astrologer key.
400MISSING_FIELDA required field is absent from the request.
400INVALID_DATEDate values out of valid range.
400INVALID_TIMEHour/minute out of range.
400INVALID_TIMEZONENon-IANA timezone value.
400INVALID_COORDINATELatitude/longitude out of range.
400INVALID_SESSIONSession ID not found or expired.
401AUTH_MISSING_KEYNo API key in request.
401AUTH_INVALID_KEYKey format invalid or not found.
402INSUFFICIENT_BALANCEWallet balance too low to continue.
405METHOD_NOT_ALLOWEDNon-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