AI Astrologer API: Chat Answers Grounded in the User's Birth Chart

Add a conversational astrologer to your app with one API call. Your users ask in their own words. DivineAPI calculates their birth chart, checks every reply against it, and answers back in the language you set. Sessions remember the birth details, so follow-up questions need only the message.

Starts from $29 /month · 14-day free trial
Sample API Request
POST https://ask.divineapi.com/chat
// Request
{
  "api_key": "your_api_key",
  "user_id": "u_8812",
  "session_id": "s_5f21",
  "message": "When will I get married?",
  "depth": "standard",
  "language": "english",
  "full_name": "Priya Sharma",
  "day": "24",
  "month": "05",
  "year": "1996",
  "hour": "14",
  "min": "40",
  "gender": "female",
  "place": "New Delhi",
  "lat": "28.7041",
  "lon": "77.1025",
  "tzone": "5.5"
}
200 OK Full response below Documentation →

Powerful Features of the AI Astrologer API

Everything you need to add chart-based astrology chat to your platform. One endpoint, sessions that remember the user, and the cost of every answer reported back to you.

Read From the Real Chart

Every answer references the user's own placements, houses and dasha dates. The chart is calculated from the birth details you send, not looked up by zodiac sign.

Checked Before It Is Sent

A code check and an AI judge verify each reply against the chart. The result is reported back to you in the response as grounding: ok.

Three Answer Depths

Quick reads the essentials of the chart, standard reads more and suits most questions, deep reads the whole chart with dashas and transits. Quick costs 20 credits, standard 30, deep 50, however long the reply.

Reply Language and Length

Set language to Hindi, Spanish or any language name and the reply comes back in that language; English by default. length_cap (short, medium or full) sets how long the written answer is, independent of depth.

Remembers the Conversation

Send the birth details once per session_id. Later messages in the same session skip them, so questions like "and my career?" resolve on their own.

Session History and Deletion

GET /sessions and GET /session/{id} restore a chat screen. DELETE /session/{id} removes a session when a user asks you to erase their data.

One Wallet, Many Users

Keep the API key server-side and pass your own user_id with each request. Usage is recorded per user for reporting; billing stays on one account.

Blocked Replies Cost Nothing

You are charged only when an answer succeeds. Guardrail replies come back with blocked: true and cost nothing, and failed replies are never charged.

One Endpoint, One Request

POST /chat covers every question and every session. Plain JSON over HTTPS, the API key in the body, no headers, no OAuth and no SDK to install.

Streaming or Whole

Set "stream": true to receive the answer as it is written, or wait for the full JSON. Same endpoint, one flag.

Cost in Every Response

Each answer reports the credits charged and remaining, plus chart-cache hits and latency, so you can meter per user in real time.

Balance, Usage and Health

GET /balance shows the wallet and GET /usage gives a day-by-day breakdown. GET /health needs no key, is never charged, and suits an uptime monitor.

Choose Your Plan

Your monthly price includes the answers shown on each plan, with nothing more to pay. Every plan has the same features; only the credit pool and the price per answer change. All plans include a 14-day free trial (credit card required to activate the trial).

My app has monthly users, each asking about questions a month, using answers.

Quick reads the main points of the chart. Standard reads more, and suits most questions. Deep reads the whole chart. A longer answer does not cost more.

Spark

$29

/ month
$29$24.65/moSAVE 15% $29$21.75/moSAVE 25%

Billed monthlyBilled half-yearlyBilled yearly

3,466standard answers a month, included

Works out to $0.0084$0.0071$0.0063 each

For building, testing and small apps.

EACH ANSWER WORKS OUT TO

  • Quick$0.0056$0.0047$0.0042
  • Standard$0.0084$0.0071$0.0063
  • Deep$0.0139$0.0119$0.0105
Sage

$59

/ month
$59$50.15/moSAVE 15% $59$44.25/moSAVE 25%

Billed monthlyBilled half-yearlyBilled yearly

9,800standard answers a month, included

Works out to $0.0060$0.0051$0.0045 each

For apps with one to two thousand active users.

EACH ANSWER WORKS OUT TO

  • Quick$0.0040$0.0034$0.0030
  • Standard$0.0060$0.0051$0.0045
  • Deep$0.0100$0.0085$0.0075
Oracle

$115

/ month
$115$97.75/moSAVE 15% $115$86.25/moSAVE 25%

Billed monthlyBilled half-yearlyBilled yearly

24,666standard answers a month, included

Works out to $0.0047$0.0040$0.0035 each

For products where chat is the main feature.

EACH ANSWER WORKS OUT TO

  • Quick$0.0031$0.0026$0.0023
  • Standard$0.0047$0.0040$0.0035
  • Deep$0.0078$0.0066$0.0058
Cosmos

$229

/ month
$229$194.65/moSAVE 15% $229$171.75/moSAVE 25%

Billed monthlyBilled half-yearlyBilled yearly

78,333standard answers a month, included

Works out to $0.0029$0.0025$0.0022 each

For high-volume platforms.

EACH ANSWER WORKS OUT TO

  • Quick$0.0019$0.0017$0.0015
  • Standard$0.0029$0.0025$0.0022
  • Deep$0.0049$0.0041$0.0037

Need more answers in a month? We email you at 80% and 100% of your credits. At 100%, answers pause until you add more credits or upgrade your plan. You are never charged extra automatically.

14-day free trial (credit card required to activate the trial). Unused credits do not carry over. Failed and blocked replies are never charged. Billed separately from your other plans, with the same API key. Need more than Cosmos? Talk to us.

*All prices exclude GST (Goods & Services Tax)
*One quick answer uses 20 credits, one standard answer 30 and one deep answer 50

Why Leading Businesses Choose DivineAPI

DivineAPI is the astrology API platform behind 600+ businesses. AI Astrologer runs on the same account, the same API key and the same support team as every other DivineAPI product.

All in One Solution - DivineAPI
All in One Solution

One DivineAPI account and one API key cover AI Astrologer and 300+ endpoints across 8 domains.

Seamless Integration - DivineAPI
Seamless Integration

One JSON request over HTTPS. No headers, no OAuth, no SDK to install.

Fits Inside Your Product - DivineAPI
Fits Inside Your Product

The answer comes back as plain JSON, so you show it in your own screens.

Built on Swiss Ephemeris - DivineAPI
Built on Swiss Ephemeris

Planets, houses, dashas and transits are calculated with Swiss Ephemeris, then read for the question asked.

Quick, Hassle-Free Setup - DivineAPI
Quick, Hassle-Free Setup

Get an API key, send one request and read the first answer. No chart maths and no astrology prompt to write.

Support That Goes the Extra Mile - DivineAPI
Support That Goes the Extra Mile

Office hours 9:30 AM to 6:30 PM IST, Monday to Saturday. Email replies within 24 hours.

Add AI Astrologer to Your Platform With One Request

Plain JSON over HTTPS. Your API key goes in the body, no headers, no OAuth, no SDK to install. Same key as the rest of DivineAPI.

Request
POSThttps://ask.divineapi.com/chat
{
  "api_key": "your_api_key",
  "user_id": "u_8812",
  "session_id": "s_5f21",
  "message": "When will I get married?",
  "depth": "standard",
  "language": "english",
  "full_name": "Priya Sharma",
  "day": "24",
  "month": "05",
  "year": "1996",
  "hour": "14",
  "min": "40",
  "gender": "female",
  "place": "New Delhi",
  "lat": "28.7041",
  "lon": "77.1025",
  "tzone": "5.5"
}
Request body Documentation →

Send the question and the birth details once per session_id. Later messages in the same session skip the birth data. Set "stream": true to receive the answer as it is written.

Response
{
  "request_id": "7659de5e21cb4124",
  "answer": "Your strongest marriage window appears to be from late 2026 through 2028, with especially meaningful developments between now and November 29, 2026, during your Venus-Mercury period...",
  "band": "standard",
  "credits_charged": 30,
  "credits_remaining": 29370,
  "grounding": "ok",
  "chart_cache": {
    "hits": 0,
    "misses": 16
  },
  "usage": {
    "input_tokens": 7048,
    "output_tokens": 250
  },
  "latency_ms": {
    "chart_fetch": 3137,
    "time_to_first_token": 5242,
    "total": 10273
  }
}

Each answer reports the credits charged and remaining, the grounding result, chart-cache hits and latency. You are charged only when an answer succeeds. Guardrail replies come back with blocked: true and cost nothing.

FieldWhat it means
api_keyYour DivineAPI key, the same one used across the rest of the platform
user_idYour own identifier for this end user, for per-user usage reporting
session_idGroups a conversation. Send birth details once per session_id; later turns can skip them
messageThe user's question, in their own words
depthquick, standard or deep: how much of the chart is read, and what it costs (20 / 30 / 50 credits)
languageOptional. Reply language, for example "hindi". Defaults to English if left out
length_capOptional. short, medium or full: how long the written answer is
full_nameUsed in the reading's phrasing, not required for the chart calculation itself
day, month, yearBirth date
hour, minBirth time, 24-hour clock
genderUsed for phrasing pronouns in the reply
placeBirthplace, shown back for context
lat, lonBirth location coordinates, used to compute the actual chart
tzoneBirth timezone offset, for example 5.5 for IST

How DivineAPI's AI Astrologer API Compares

What you get out of the box, compared with building astrology chat on top of a general AI chatbot.

Feature DivineAPI AI Astrologer A general AI chatbot
Where the answer comes from The user's own birth chart, calculated from the birth details you send The model's general knowledge; no chart is calculated
Chart calculation Done for you, with Swiss Ephemeris You calculate the chart and send it in the prompt
Astrology prompt None to write You write and maintain it
Check against the chart Each reply is checked and reported as grounding: ok You build the check
Conversation memory Built in: one session_id, birth details sent once You store and resend the history
What you pay for A flat 20, 30 or 50 credits per answer, however long the reply Tokens, so the price changes with the length
Blocked or failed replies Never charged Depends on the provider

AI Astrologer is handed the real chart, and each reply is checked against it. With a general chatbot, the chart, the prompt and the checking are your job.

Frequently Asked Questions

One endpoint, POST /chat, that answers a user's question from their own birth chart. You send the question and the birth details; the reply is checked against the chart before it is returned. It sits alongside DivineAPI's 300+ endpoints across 8 domains and uses the same API key.

No. AI Astrologer is billed separately, in credits, against its own four plans: Spark, Sage, Oracle and Cosmos. It does not draw from your existing DivineAPI request quota.

A flat amount per depth, regardless of length_cap: quick 20 credits, standard 30 credits, deep 50 credits per answer. You are charged only when an answer succeeds. Failed replies and guardrail replies (blocked: true) are never charged.

depth (quick, standard or deep) decides how much of the chart is read for the answer: more depth reads more of the chart. length_cap (short, medium or full) decides how long the written answer is. They are independent settings, and a longer answer does not cost more.

No. Unused credits do not carry over.

We email you at 80% and 100% of your credits. At 100%, answers pause until you add more credits or upgrade your plan. You are never charged extra automatically.

Set language to any language name, for example "hindi" or "spanish", and the reply comes back in that language. If you leave it out, the reply is in English.

Yes. 14-day free trial (credit card required to activate the trial). Nothing is charged during the 14 days, a reminder email goes out 24 hours before the trial ends, and you can cancel from the dashboard before day 15 at no cost.

Let's Talk!

Our friendly team would love to hear from you.