Skip to content

One conversational endpoint

AI astrology chatbot API answers written from a real chart

Your users ask in their own words. Vedika computes the chart in code first, derives the placements, dashas and yogas deterministically, builds the prompt out of those computed facts, and only then calls a model. The chart it used comes back in the same response, so you can check the answer against it.

1Endpoints to learn
4Systems
30Languages
559Operations published

The whole surface

POST https://api.vedika.io/api/v1/astrology/query


Authentication

X-API-Key: your key


The smallest call that works

curl https://api.vedika.io/api/v1/astrology/query \
  -H "X-API-Key: $VEDIKA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "question": "What does my chart say about career?",
    "birthDetails": {
      "datetime":  "1990-05-15T10:30:00+05:30",
      "latitude":  28.6139,
      "longitude": 77.2090,
      "timezone":  "Asia/Kolkata"
    }
  }'

question is the only required field. Everything else, birth details included, is optional — a question with no chart is answered as theory.

What the endpoint is

One endpoint

One endpoint ask anything

A question in plain language. There is no route to pick, no chart type to choose and no second call to stitch on — question is the one required field, and birthDetails, system, language and systemPrompt are all optional.

POST /api/v1/astrology/query

Grounded

Grounded not generated

The chart is computed at step 2 of a twenty-three-step pipeline. The model is not called until step 9. Everything in between — placements, dashas, yogas, doshas, the classical lookups — is derived in code, and the prompt is built from the result.

Chart at step 2, model at step 9

Four systems

Four systems thirty languages

Ask across Vedic, Western, KP or Vastu on the same endpoint, and get the answer back in any of 30 accepted language codes — 15 of them Indic, in native script.

vedic · western · kp · vastu

Plug it in

Four steps, and none of them need an account

Steps 1 to 3 run against the keyless sandbox and take a couple of minutes. Step 4 is the only one that needs a key, and the request body does not change when you swap it in — that is the whole point of having a sandbox that mirrors the production shape.

01

Call the sandbox with nothing installed

/sandbox/* is mounted outside the auth stack: no key, no wallet, no billing. It answers with static sample data in the production response shape, and the sample text says so in its own body.

curl https://api.vedika.io/sandbox/chat/ask \
  -H "Content-Type: application/json" \
  -d '{"question":"What does my chart say about career?"}'

02

Install an SDK, or don't

It is one POST with a JSON body, so fetch is a legitimate answer. The SDKs exist to give you types, retries and a base URL you do not have to remember. See the SDK section for the four published packages and their real signatures.

03

Render the three fields that matter

response is the prose, birthChart is the chart it was written from, and followUpSuggestions is your next row of chips. Rendering the response covers all seven fields and the whitespace rule that catches people out.

04

Swap the sandbox path for the real one

Change /sandbox/chat/ask to /api/v1/astrology/query, add X-API-Key, and send the birth details you were going to send anyway. That is the entire difference between the two calls.

An honest note on "five minutes". Steps 1 to 3 really are a few minutes' work. Step 4 is not, because it needs a paid account — there is no free production tier, no trial and no credit grant, so the clock on a first production call includes signing up and loading a wallet. The integration is five minutes; the procurement is not, and we would rather say so.

The query path

The chart exists before the sentence does

"Grounded" is an ordering claim, not an adjective, so here is the order. This is the real sequence a request runs through, with the real step numbers the pipeline itself uses. The model appears at step 9 — after the chart, after the deterministic interpretation, after the prompt has been assembled out of computed facts. Steps are skipped when they do not apply; none are ever reordered.

0a · 0.2

Safety, before anything is computed

A zero-tolerance hard block runs first, then crisis tagging with multi-turn escalation. These are defence-in-depth and they run before a single planetary position is calculated, so a request that must be refused never touches the ephemeris or a model.

01

Entry guards

Meta questions ("what can you do?"), greetings and safety redirects are answered here and return immediately. They are not worth a chart and they are not worth a model call.

02

The chart is computed

Positions and transits are calculated from the birth details in the request. This is deterministic arithmetic against an ephemeris — the same inputs give the same chart every time, and it happens before any prompt exists. If a long conversation needed summarising, that summary was produced just above this line and it is also deterministic: no model has been called yet.

03

Language and topic detection

Deliberately before retrieval, so the detected topic can filter what gets retrieved rather than the retrieval running blind. A "today / this week / tomorrow" question is also flagged here, so the answer is grounded on today's transits and panchang and is forbidden from reusing the native's birth tithi.

3.5 · 5.5

Two exits that skip the model entirely

An early cache shortcut, and a direct-calculation fast path for questions that are pure computation. Both return a real answer without an LLM in the loop. A cache hit is still billed at the one-cent floor rather than free, because the wallet stores integer cents and reporting a price you do not charge is its own kind of lie.

04

Yogas and retrieval, in parallel

Yoga detection and classical-text retrieval run concurrently, filtered by the topic detected at step 3. A KP question that is chart-bound is enforced here: if the sub-lord and significator payload could not be computed, the request fails in-system with the reason rather than quietly answering from a non-KP fallback.

05

Divisional charts

D9 (navamsa), D10 (dasamsa) and D7 (saptamsa) are derived from the rashi chart — marriage, career and progeny respectively. Which of them reaches the prompt depends on the topic, not on the model.

6.5

The interpret engine

A deterministic pass that extracts chart patterns, looks up the classical texts for them, and composes an interpretation document. This is the step that makes the difference between a model reading a chart and a model rendering an interpretation someone else computed. Yogas and doshas go in as named, resolved facts.

07

The prompt is assembled from those facts

Twenty-two sections, gated by a matrix rather than by string matching: topic, whether a partner chart is present, whether there is conversation history, and which system is active all decide what is included. Only the active system's fact family is emitted — a Western question does not receive Parashari fact blocks, and KP and Jaimini get their own. If the birth time is missing, every house, lordship, dasha, divisional, KP and yoga block is suppressed, because all of them derive from an ascendant that cannot be trusted, and a directive tells the model to say so.

08 · 8.7

Model selection, then the wallet hold

The tier and timeout are chosen, and the wallet is reserved before the call, keyed on a hash of the idempotency key plus the request body — so a retry reuses the same hold instead of charging twice, and a different question under the same key is correctly a different reservation.

09

Only now is a model called

It is handed the computed chart, the derived interpretation and the retrieved classical material, and asked to write. It is not asked where a planet is. The call races a timeout; a failure past this point releases the hold rather than billing for nothing.

10 · 10.5 · 11

The answer is checked against the chart

A validator, a hallucination gate and a scrubber run over the generated text, followed by a sentence-level surgical rewrite that corrects claims against the computed chart rather than discarding the whole answer. This is the step that catches a model that wrote a plausible placement instead of the real one.

11.5 · 12

Finalisation, then translation

The length cap runs before the load-bearing suffixes and the safety passes, so truncation can never remove them. Translation happens after that, and adds its own surcharge to the cost tracker rather than being folded invisibly into the query price.

12.4 · 12.5

Never empty, and checked for completeness

If the answer is empty or whitespace after every pass, a chart-grounded "ask once more" line is substituted and the hold is released — the contract is never an empty body, and you are never billed for a non-answer. An independent completeness check runs alongside it.

13 · 14

Persist once, then cache

Every exit path — success, refusal, cache hit, timeout recovery, the never-empty substitution — persists in exactly one place, so a conversation cannot be double-saved by construction. The request-id replay cache is written before the content cache, so a retry in the window between them cannot be charged twice.

What this buys you commercially

The placements in an answer are not the model's recollection of astrology; they are the output of the same deterministic code that serves the other 558 operations. That is why the chart comes back in the response — you can diff the prose against it, and so can your support team.

What it does not buy you

Determinism in the prose. The chart is reproducible; the sentences are a model's. The pipeline constrains what the model may assert and checks it afterwards, which is a much stronger claim than "we use a good prompt" — but it is not the claim that two identical requests produce two identical paragraphs.

The request

One body, and a field that changes the tradition

system takes four values. Switching it does not change the shape of the request, and this page is not going to pretend otherwise — the honest demonstration is that the body is identical apart from one string, and that what changes is downstream: which fact blocks are assembled at step 7, and which grounding is enforced at step 4.

System: Vedic

Request body — vedic

{
  "question": "What does my chart say about career?",
  "birthDetails": {
    "datetime":  "1990-05-15T10:30:00+05:30",
    "latitude":  28.6139,
    "longitude": 77.2090,
    "timezone":  "Asia/Kolkata"
  },
  "system":   "vedic",
  "language": "en"
}

What actually differs

  • Sidereal zodiac. The default when system is omitted.
  • Receives the Parashari fact family at step 7: rashi placements, lordships, the Vimshottari dasha table, shadbala, yogas and dosha analysis.
  • Divisional charts are included by topic — D9 for marriage, D10 for career, D7 for progeny.
  • Interpretation is drawn from the classical corpus: Brihat Parashara Hora Shastra, Phaladeepika, Saravali, Jaimini.

System: Western

Request body — western

{
  "question": "What does my chart say about career?",
  "birthDetails": {
    "datetime":  "1990-05-15T10:30:00+05:30",
    "latitude":  28.6139,
    "longitude": 77.2090,
    "timezone":  "Asia/Kolkata"
  },
  "system":   "western",
  "language": "en"
}

What actually differs

  • Tropical zodiac, and the request body is byte-identical apart from the one string. Nothing else moves.
  • Receives its own chart fact block and the aspect section; it does not receive the Parashari fact family. That separation is enforced in the prompt builder, not requested politely in the prompt text.
  • No dasha table — the tradition has no equivalent, so the section is absent rather than faked.
  • The wider API carries 58 dedicated Western operations if you want the underlying calculations directly.

System: KP

Request body — kp

{
  "question": "Will I change jobs this year?",
  "birthDetails": {
    "datetime":  "1990-05-15T10:30:00+05:30",
    "latitude":  28.6139,
    "longitude": 77.2090,
    "timezone":  "Asia/Kolkata"
  },
  "system":   "kp",
  "language": "en"
}

What actually differs

  • Krishnamurti Paddhati: sub-lords and significators rather than sign lordship.
  • KP gets its own fact block, separate from both the Parashari and Western families.
  • An exact birth time is not optional here. If the KP sub-lord and significator payload cannot be computed, the request is rejected in-system at step 4 with that reason — it is never silently answered from a non-KP fallback.
  • Practically: send datetime to the minute, and expect a validation error rather than a vague answer if you cannot.

System: Vastu

Request body — vastu

{
  "question": "My kitchen is in the north-east. Is that a problem?",
  "system":   "vastu",
  "language": "en"
}

What actually differs

  • Vastu Shastra is directional architecture, so it is chartless: the rules are about a building, not a nativity. Birth details are genuinely optional on this one.
  • It is accepted at the front door as system: "vastu", but routing is topic-driven — a vastu question reaches the vastu fact block whichever system you name, and that block is self-gated by topic.
  • For charts, sign-off and contamination checks it behaves as Vedic, because it is part of that tradition rather than a distinct zodiac.
  • If you want the measurements rather than the prose, there are 18 dedicated Vastu operations — listed further down.

Every field on the request

The wire format is camelCase. Every multi-word field also accepts its snake_case spelling as an alias, because that is a common SDK and agent convention and silently dropping it loses conversations.

Request fields for POST /api/v1/astrology/query
FieldTypeRequiredNotes
questionstringRequired 1–2000 characters. Over 2000 is rejected with QUESTION_TOO_LONG before the wallet is reserved, so an oversized question costs nothing.
birthDetailsobjectOptional datetime, latitude, longitude, timezone. Flat top-level fields, a birthData object, and birthDate+birthTime or date+time pairs are all folded in. Timezone is inferred when it can be.
partnerBirthDetailsobjectOptional Same shape. Its presence is what switches on the synastry section of the prompt.
systemenumOptional vedic · western · kp · vastu. Defaults to vedic.
languagestringOptional One of 30 codes. Defaults to en.
speedenumOptional standard · fast · eco. This is the field that selects the delivery tier.
conversationIdstringOptional Send back what you were given to continue a thread. Omit it and a new id is minted. conversation_id also deserialises.
conversationHistoryarrayOptional { role, content } messages, if you would rather carry the thread yourself than use the id.
systemPromptstringOptional Your own persona layer. Capped at 400 lines / 12,000 characters, rejected with SYSTEM_PROMPT_TOO_LARGE rather than silently truncated. Aliases: system_prompt, customPrompt, custom_prompt, persona.
maxTokensintegerOptionalUpper bound on the generated answer.
temperaturenumberOptionalPassed through to the model.
responseFormatstringOptional The value "voice" is a server-internal signal and is stripped from any client request, so a text integration cannot accidentally opt into the spoken tone.
streambooleanOptional Defaults to false. There is also a dedicated SSE endpoint at /api/v1/astrology/query/stream, in both GET and POST forms.

Your own persona

What systemPrompt can and cannot do

There is a real prompt surface here, and it is worth being precise about its boundary, because "you can send a system prompt" is usually sold as more than it is. Yours is a layer on top of the assembled prompt, not a replacement for it.

It customises

  • Tone. Warm, clinical, brisk, devotional.
  • Persona. A named assistant with a consistent voice.
  • Format. Length, structure, whether you want headings or a single paragraph.
  • Language. Register and address, on top of the language field.

It is subordinate to

  • The safety layer, which is immutable. No persona can switch it off.
  • The computed fact blocks. You cannot instruct the model into a different chart.
  • The post-generation gate. The hallucination check and surgical rewrite run over your persona's output exactly as they run over the default's.
  • The size cap. 400 lines, 12,000 characters, checked before billing and before the model call.

A persona that is doing something useful

You are Tara, the assistant inside a career app.
Answer in at most 120 words.
Open with the single clearest signal in the chart, then one
  concrete suggestion the reader can act on this month.
Never use the words "destiny" or "fate".
Do not add a disclaimer; the app already shows one.

That text goes in the systemPrompt field as a single JSON string, newlines escaped as \n — printed here as real lines because that is how you will write it.

Notice what is not in there: no chart data, no "you are an expert astrologer", no instruction about which house rules career. All of that is already assembled at step 7 from the computed chart. Your persona is for the things the pipeline cannot know — your product's voice, your length budget, your house style.

The streaming endpoint additionally accepts an Enterprise white-label persona — a custom assistant name, system prompt and sign-off — as a first-class part of its request body rather than as a prompt hack.

Rendering

Seven fields, and what each one is for

This is the part most integrations get half-right, so here is the whole contract. The response serialises camelCase — if you are reading follow_up_suggestions or conversation_id off the wire, you are reading undefined.

Response fields
FieldAlways presentWhat to do with it
successYes Boolean. Check it before anything else; a 200 with success: false is a real state.
responseYes The prose. This is the field you render. See the whitespace note below.
answerNo A legacy alias for response, present for older SDK consumers. Do not write new code against it; do not treat its absence as an error.
birthChartYes (null when there is no chart) The differentiator. The structured chart the answer was written from. Render it beside the prose — see below.
followUpSuggestionsYes ([] when there are none) Array of strings. Becomes your next row of chips. Always an array, so you can map it without a guard — but it can be empty, so guard the row, not the field. These are templated by topic, not generated by the model: a career question gets the career set. That makes them fast, free and predictable, and it means they are suggestions rather than insights.
followUpsYes ([] when there are none) Byte-identical to followUpSuggestions — both fields are populated from the same array for wire parity with an older client. Read either; do not concatenate them.
conversationIdNo Send it back on the next turn to continue the thread. Store it against the user's session, not against the message.
requestIdNo Log it. It is the one string that lets support find your exact call.
metadataYes Timing, token usage and cost for the call. Useful for your own dashboards; not something to show an end user.

Plain text, not Markdown

response is plain prose with real newlines in it, including blank lines between paragraphs. That is enforced twice: the default persona forbids headings, bullets, tables and **bold** outright, and a scrubber strips any Markdown that survives anyway. So render the characters you were sent — white-space: pre-wrap, or split on \n\n into paragraphs. Drop it into HTML unchanged and every newline collapses, which is what makes an otherwise correct integration look like a wall of text.

The one exception. When an enterprise customer supplies a custom systemPrompt, the format scrubber is skipped — so if your persona asks for structure, you get structure, and you then need a renderer for it. Choose one behaviour deliberately rather than discovering it in production.

Show the chart beside the answer

birthChart exists so the reader can check the prose. A compact strip — ascendant, moon sign, current dasha, the named yogas — under or beside each answer turns "the AI said so" into "here is what it was reading". It is the cheapest trust feature in the integration and almost nobody ships it.

Threading a conversation

Keep conversationId from the first response and send it as conversationId on every subsequent turn. Past eight turns the pipeline generates a rolling summary for you, deterministically and before the chart is computed — you do not need to trim the history yourself. If you would rather own the thread, send conversationHistory instead.

Follow-ups are a UI, not a feature

Render followUpSuggestions as tappable chips under the answer, and on tap send the chip's text as the next question with the same conversationId. That is the entire mechanism. It is also the single highest-leverage thing you can add to an astrology chat, because most users do not know what to ask second.

The response, in full

{
  "success": true,
  "response": "…the prose, with real \n\n between paragraphs…",
  "answer": "…legacy alias for response…",
  "birthChart": {
    "ascendant":    "Pisces",
    "moonSign":     "Sagittarius",
    "currentDasha": "Moon-Mars",
    "keyYogas":     ["Gajakesari Yoga", "Budha-Aditya Yoga"]
  },
  "followUpSuggestions": [ "…", "…", "…" ],
  "followUps":           [ "…" ],
  "conversationId": "conv_…",
  "requestId":      "…",
  "metadata": { engine, timing, usage, cost }
}

The birthChart keys above are the ones the keyless sandbox returns, so you can render against them before you have an account. Production returns the full structured chart.

What it looks like

The same response, rendered two ways

Both frames below are CSS — no images, no canvas, no script. The text inside them is a real recorded exchange, quoted verbatim and labelled with its tier and latency; the layout is the pattern described above, with the chart strip sitting under the answer where the reader can check it.

Try it here

A real call, from this page, with no key

There is no video of this because a recording of an API call is worth less than an API call. The button below makes an actual HTTPS request from your browser to https://api.vedika.io/sandbox/chat/ask, which is mounted outside the authentication stack — no key, no wallet, no billing. It returns static sample data in the production response shape, and it says so in its own answer text. If the request fails you will see the failure, not a fabricated success.

POST /sandbox/chat/ask

Requires JavaScript. Without it, the recorded exchange beside this form is the whole section and nothing is missing from the page.

Result

Nothing sent yet. The response will be printed here exactly as it arrives.

What the sandbox is and is not

  • Is: a real, keyless, unauthenticated HTTP endpoint returning the production response shape, so you can build and test your rendering before you have an account.
  • Is not: a live model call. The AI sandbox route makes no LLM call at all — it returns a fixed sample. The rest of the sandbox surface does run real fixed-demo computation.
  • Is not: free production access. There is no free production tier, and the sandbox is not a way around that.

Recorded answers

Four real completions, quoted verbatim

These are not written for this page. They are records pulled from a 13,740-case evaluation corpus, joined to their completions by case id, and quoted exactly — including the formatting, the length and the latency. Every one has finish_reason: "stop" and passes all five of its graders. Where a completion is trimmed to fit, the cut is on a sentence boundary and the true full length is stated. Nothing here has been polished, corrected or shortened for effect, and no astrological claim on this page was written by us.

Read the labels before you read the answers

  • These are eco-tier runs. Eco is the deliberately cheap and slow tier. Across the 7,757 passing records the median latency is 38.7 seconds and the 90th percentile is 50.2 seconds. Those are eco numbers and they are not the flagship numbers — quoting them as headline performance would be a false claim, so they are printed on every example instead.
  • These are raw provider completions, captured by the evaluation harness. You can see Markdown in the first one. The production pipeline strips exactly that at step 10 before the customer-facing field is built, which is why the rendering guidance above says plain text — the corpus shows the model's output, not the API's.
  • There is no Vastu example, because the corpus contains no vastu cases. It covers vedic, western, KP, Jaimini, numerology and prashna. We would rather leave a gap than fill it.

Example 1 — English, Vedic, marriage

Question

What does my chart say about my marriage?


Completion — first 604 of 2,610 characters, cut at a sentence boundary

Based on the provided birth data, your Vedic astrological chart indicates a complex but ultimately positive outlook for marriage. **Key Indicators:** * **The 7th House (Kalatra Bhava):** Your 7th house, which signifies the spouse and the nature of the marital union, is Capricorn (Makara). The lord of this house is Saturn (Shani). Saturn is placed in your 8th house in Aquarius (Kumbha). This placement can indicate a spouse who is mature, serious, and perhaps from a different background or age group. It can also point to potential delays or challenges in the initial stages of finding a partner.


case mtx-58664498b3aa · shard eco13k-s00.jsonl line 2 · tier eco (arm_b, effort low) · 43.741 s · finish_reason stop · 5/5 graders pass

Example 2 — Hindi, KP, marriage timing

Question

जन्म 14 मार्च 1991, सुबह 07:42 बजे, लखनऊ। KP का उपयोग करके, मेरे 7वें कस्प (cusp) का सब-लॉर्ड बताता है कि मेरी शादी कब होगी?


Completion — complete, 583 characters, untrimmed

आपके जन्म कुण्डली के अनुसार, 7वें भाव के कस्प का सब-लॉर्ड शनि है। के.पी. ज्योतिष में, विवाह का समय मुख्य रूप से 7वें भाव के संकेतकों (significators) के महादशा और अंतर्दशा से निर्धारित होता है। आपके लिए 7वें भाव के मुख्य संकेतक शुक्र (7वें भाव के स्वामी) और शनि (7वें कस्प के सब-लॉर्ड) हैं। विवाह की संभावना तब अधिक होती है जब शुक्र या शनि की महादशा या अंतर्दशा चल रही हो, या कोई अन्य ग्रह जो 7वें भाव का संकेतक हो और शनि से संबंधित हो (जैसे शनि की नक्षत्र में स्थित हो या शनि पर दृष्टि रखता हो)। यह सिद्धांत के.एस. कृष्णमूर्ति द्वारा प्रतिपादित के.पी. ज्योतिष का आधारभूत नियम है।


case spec-badffd385a15-hi · shard eco13k-s10.jsonl line 847 · tier eco (arm_b, effort low) · 31.558 s · finish_reason stop · 5/5 graders pass

Example 3 — English, numerology, a theory question

Question

What is my life path number and what does it mean for me?


Completion — first 609 of 1,019 characters, cut at a sentence boundary

Your Life Path Number is 9. This calculation is based on the Pythagorean system of numerology, attributed to the ancient Greek philosopher Pythagoras. The Life Path Number 9 is the number of a humanitarian, a philanthropist, and a universalist. Individuals with this Life Path are characterized by their deep compassion, selflessness, and a strong desire to help others. They are often drawn to careers or activities that serve the greater good, such as social work, teaching, healing, or activism. The core lesson for a Life Path 9 is to learn the balance between giving to others and caring for oneself.


case mtx-55429066150e · shard eco13k-s00.jsonl line 318 · tier eco (arm_b, effort low) · 23.639 s · finish_reason stop · 5/5 graders pass

Example 4 — Malayalam, Western, a lookup question

Question

ഞാൻ 14 മാർച്ച് 1990, 04:25 AM, ബോസ്റ്റൺ എംഎയിൽ ജനിച്ചു. എന്താണ് എൻ്റെ സൺ, മൂൺ, റൈസിംഗ് സൈൻ?


Completion — complete, 249 characters, untrimmed

Pisces, Sagittarius, Capricorn. ക്ലാസിക്കൽ ജ്യോതിഷ ഗ്രന്ഥങ്ങളിൽ, പ്രത്യേകിച്ച് ടോളമിയുടെ *ടെട്രാബിബ്ലോസിൽ* (Tetrabiblos) പ്രതിപാദിച്ചിരിക്കുന്നതുപോലെ, ക്രാന്തിവൃത്ത നക്ഷത്രരാശികളാലാണ് (ecliptic constellations) ഈ രാശികൾ നിർവചിക്കപ്പെട്ടിരിക്കുന്നത്.


case spec-819cc9b1f625-ml · shard eco13k-s13.jsonl line 17 · tier eco (arm_b, effort low) · 32.387 s · finish_reason stop · 5/5 graders pass

A note on the fourth one: it answers in three English words and then cites Ptolemy's Tetrabiblos in Malayalam. That is the method-cite behaviour working — the answer names where the rule comes from rather than asserting it — and it is also, at 249 characters, shorter than we would have written if we were writing them. We are not.

SDKs

Four published packages, and what each really exposes

Every signature below was read out of the package source rather than written to look idiomatic, because a snippet that does not compile against the published version is worse than no snippet. Where an SDK does not reach this endpoint, that is what it says.

JavaScript and TypeScript

@vedika-io/sdk · 3.0.6

npm i @vedika-io/sdk

// VedikaClient, from './client'
const vedika = new VedikaClient({
  apiKey: process.env.VEDIKA_KEY,   // required
  baseUrl: "https://api.vedika.io", // optional
  timeout: 60000,                   // optional
  maxRetries: 3,                    // optional
  cacheEnabled: true,               // optional
  language: "en"                    // optional
});

const res = await vedika.askQuestion({
  question: "What does my chart say about career?",
  birthDetails: {  },
  system: "vedic",       // 'vedic' | 'western' | 'kp'
  speed: "standard",     // 'standard' | 'fast' | 'eco'
  conversationId,        // optional
  partnerBirthDetails    // optional
});

Two things to know

  • askQuestion POSTs to /api/v1/astrology/query and returns the parsed body. There is also askQuestionStream, which returns an AsyncGenerator<string> over the SSE endpoint.
  • The package's system union lists three values and omits "kp"'s sibling "vastu", which the API does accept. If you need Vastu today, cast or call the endpoint directly — the wire accepts it.
  • Its declared return type predates the current response contract: read response (or the answer alias) and take timing and cost from metadata, which is where the server actually puts them.

React

@vedika-io/react · 1.0.0

npm i @vedika-io/react @vedika-io/sdk

// wrap the tree once
<VedikaProvider apiKey={key}>…</VedikaProvider>

// then, in a component
const { data, loading, error, ask, reset } = useAskVedika();

await ask({
  question: "What does my chart say about career?",
  birthDetails: {  }
});

// streaming variant
const stream = useAskVedikaStream();

What it is

  • useAskVedika is a state wrapper — data, loading, error, ask, reset — around the JavaScript SDK's askQuestion. It has no HTTP logic of its own, so @vedika-io/sdk is a peer you install alongside it.
  • That is a virtue, not a gap: there is one request implementation to reason about, and the hook is the part you would otherwise write yourself.
  • The package also ships 25+ domain hooks for the calculation endpoints, and a separate useVoice that targets a different route.

Python

vedika-sdk · 3.0.6

pip install vedika-sdk

from vedika import VedikaClient

client = VedikaClient(
    api_key=os.environ["VEDIKA_KEY"],
    base_url="https://api.vedika.io",
    timeout=60,
    max_retries=3,
    cache_enabled=True,
    language="en",
)

res = client.ask_question(
    question="What does my chart say about career?",
    birth_details={  },
    language="en",
    # keyword-only from here
    system="vedic",
    speed="standard",
    conversation_id=None,
    partner_birth_details=None,
)

Notes

  • Everything after language is keyword-only, which is deliberate — positional arguments on a call with nine optional parameters age badly.
  • Returns a QuestionResponse dataclass. As with the JS package, prefer the raw response / answer text and read timing and cost from the response metadata.
  • ask_question_stream is the SSE counterpart.

Flutter

vedika_sdk · 1.0.0

dependencies:
  vedika_sdk: ^1.0.0

final vedika = VedikaClient(apiKey: key);

// 23 domain services — astrology, western, tarot,
// matrimony, panchang, … geocode.
await vedika.astrology.birthChart();

// The conversational endpoint is NOT wrapped.
// Call it directly until it is:
final res = await http.post(
  Uri.parse('https://api.vedika.io/api/v1/astrology/query'),
  headers: {'X-API-Key': key, 'Content-Type': 'application/json'},
  body: jsonEncode({'question': q, 'birthDetails': bd}),
);

Said plainly

  • The Flutter SDK does not expose this endpoint. Its 23 services cover the calculation surface; none of them reach /api/v1/astrology/query. That is a gap in the SDK, not a limitation of the API.
  • Until it ships, one http.post is the whole integration — it is a single JSON body, and you are not missing any client-side logic by calling it directly.
  • The client's generic get() helper takes queryParams:, which is unrelated to this endpoint despite the name.

Failure

Errors and rate limits

Every error is JSON with an error message and a stable code. Branch on the code, never on the message. Some codes add fields — a 402 carries the wallet shortfall, a 429 carries your limits and a retry delay.

Error codes
StatusCodes you should handle
400VALIDATION_ERROR, QUESTION_TOO_LONG (adds maxLength and actualLength), SYSTEM_PROMPT_TOO_LARGE
401MISSING_AUTH, INVALID_API_KEY, KEY_EXPIRED, INVALID_FORMAT
402Insufficient balance — the body carries wallet: { required, available, deficit } and a purchase URL. Also SUBSCRIPTION_EXPIRED.
403SUBSCRIPTION_INACTIVE, CONVERSATION_NOT_FOUND, CONVERSATION_ACCESS_DENIED, TEST_KEY_REJECTED
410CONVERSATION_EXPIRED — mint a new thread rather than retrying.
429RATE_LIMIT_EXCEEDED, IP_BLOCKED
503AI_ERROR, ECO_UNAVAILABLE, CONVERSATION_STORE_UNAVAILABLE — retryable.
Rate limits per plan
PlanReq/minOn this endpoint
Unrecognised1010
Starter5025
Professional200100
Business500250
Enterprise1,000500
Flagship5,0002,500

The AI endpoint runs at half your plan's rate

/api/v1/astrology/query carries a 0.5 multiplier on the per-minute limit, floored at 10 — it is the most expensive call in the API and it is throttled accordingly. Burst capacity is a tenth of the per-minute figure, minimum 2. Read X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset, which are on every authenticated response, not just the 429s.

Retry with the same idempotency key

On a 429, honour Retry-After. On a 503 or a dropped connection, retry with the same Idempotency-Key you sent the first time: the reservation is keyed on that plus the body, so the retry reuses the existing hold instead of opening a second one. Do not generate a fresh key on retry — that is the one thing that turns a safe retry into a double charge.

Coverage

One endpoint answers questions. 704 answer calculations.

The conversational endpoint is a front door onto a much larger calculation surface, and sometimes you want the numbers rather than the paragraph. Every figure below is counted from the published OpenAPI document at https://vedika.io/.well-known/openapi.json — so you can fetch it and check the arithmetic yourself rather than taking a marketing number on trust. Each operation is counted once, under its first tag, which is why the twelve columns below add up to exactly 559.

235

Vedic astrology — the core Jyotish surface, from divisional charts and dasha timelines to muhurta and dosha analysis.

62

AI query — this endpoint and everything around it: two streaming forms, conversation sessions, a 1,000-question batch job, usage and wallet, PDF reports, voice, transit alerts and enterprise licensing.

58

Western astrology — aspect patterns, antiscia, astrocartography lines and city activations.

26

Tarot — card lookups, deterministic card-of-the-day, astro-fusion spreads and free-form interpretation.

23

Calendar — panchang, auspicious and inauspicious windows, anandadi yoga, disha shool.

15

Chinese astrology — BaZi four pillars, lunar calendar conversion, zodiac compatibility.

14

Matchmaking — Ashtakoota guna milan, dosha cancellation, D9 marriage analysis, bulk candidate ranking.

12

Daily horoscope — the daily bundle, and a white-label feed in JSON or RSS for syndication.

10

Crystals — birth crystals, and lookups by chakra, planet or sign.

10

Human Design — the full BodyGraph: type, strategy, authority, centres, gates and channels.

10

Spirituality — ishta devata, fasting schedules keyed to the weakest planets, karma analysis.

84

Everything else across 15 further tags — health, I Ching, lifestyle, career & finance, biorhythm, dreams, angel numbers, calculators, Lenormand, palmistry, runes, widgets, oracle, voice and geocoding.

26 tags, 702 unique paths, 704 operations — two paths carry a second method, which is why the operation count runs two ahead of the path count. The conversational endpoint is one of the 704.

Vaastu

Eighteen operations that measure a building

Vastu is the one tradition here that has nothing to do with a birth chart, so it has its own surface: geometry in, classical verdict out. Ask about it conversationally with system: "vastu", or call these directly when you need the polygons and the grades. Every description below is the operation's own summary from the served spec.

Floor-plan audit

Audit a full floor plan against classical zone rules, returning an overall score and grade plus a per-defect list with severity, recommended zone and remedy.

Detailed audit

Score and defects plus a 45-devata zone heatmap, an optional mandala projection over the plot polygon, and a severity-ordered remediation walkthrough.

Single room

Check whether one room is placed in a compliant zone, returning compliance status, severity, the recommended zone and a remedy.

Direction correction

Correct a magnetic compass reading to a true-north zone by applying the local declination, returning the corrected zone and bearings.

Declination

The offset between magnetic and true north at a given latitude, longitude and date, with a plain-language interpretation for compass correction.

Zone from bearing

Map a bearing in degrees to its 8-zone direction label, returning the presiding deity, element and the rooms prescribed and forbidden in that zone.

Entrance pada

Classify a main-door position into its 32-pada segment from the plot polygon and orientation, returning the pada deity, auspiciousness grade and effect.

81-pada mandala

Project the 81-cell Paramasayika Vastu Purusha Mandala onto a plot polygon, returning each cell's world-coordinate polygon, presiding devata and consequence on disturbance.

9-zone mandala

Project the 9-zone mandala onto a plot polygon, returning each directional cell's polygon, deity, element and prescribed or forbidden rooms.

Brahmasthan

Project the sacred centre of the mandala onto a plot polygon, returning the centre polygon, advisory clear-space buffer and forbidden actions.

Plot ratio

Analyse a plot's length-to-width ratio against the classical 2:1 limit, returning the measured ratio, category, acceptability and any remedy.

Plot shape

Classify a plot polygon's shape — square, rectangle, L-shape, triangle, irregular, circular — and grade its auspiciousness from the fill ratio and vertex count.

AR scan quality

Validate the quality of an AR room scan before running an audit, returning an A–F grade, missing-data blockers, warnings and re-scan suggestions.

Five reference tables

The defect catalogue with codes and severity grades, the 8 directions with Sanskrit names and bearing ranges, the full 45-devata table, the 9-zone table, and the remedies catalogue.

Reach

Thirty language codes

Set language on the request. The list is 15 Indic plus 14 international, each backed by a bundled phrase catalogue, plus English — which needs no translation but is a valid value. A language is only on this list if the catalogue file exists; it is a contract, not an aspiration. Translation runs at step 12 and adds its own surcharge rather than being hidden in the query price.

  • en English
  • hi Hindi
  • bn Bengali
  • te Telugu
  • ta Tamil
  • gu Gujarati
  • kn Kannada
  • ml Malayalam
  • mr Marathi
  • pa Punjabi
  • od Odia
  • as Assamese
  • ne Nepali
  • si Sinhala
  • ur Urdu
  • sa Sanskrit
  • fa Persian
  • es Spanish
  • fr French
  • de German
  • pt Portuguese
  • ru Russian
  • ja Japanese
  • ko Korean
  • zh Chinese
  • ar Arabic
  • th Thai
  • vi Vietnamese
  • id Indonesian
  • ms Malay

What it costs

A plan is a wallet load, and a query draws it down

Buying a plan credits a wallet with that month's balance; queries debit it. There is no free production tier, no trial and no credit grant — the business rule is written that way in the billing code, not just on this page. The floor on any billable call is one cent, because the wallet stores integer cents and reporting a price below what is actually debited would be a fiction.

The four plans

Starter

$12 /mo

Professional

$60 /mo

Business

$120 /mo

Enterprise

$240 /mo

The delivery tiers

Set by speed on the request. Which are available to you depends on the plan.

Vedika Standard

$0.01 – $0.03

Per query. speed: "standard", and the default.

Vedika Swift

$0.02 – $0.05

Per query, on eligible plans. speed: "fast".

Vedika Pro Ultra

Plan dependent

The premium routing. The rate is set by the contract rather than published here.

Cache hit

$0.01

The one-cent floor. Reported and debited identically — never advertised lower than it is charged.

How a query price is actually arrived at

The two ranges above are the published rates. Underneath them the charge is metered, not fixed: the cost of a call is computed from its real input, output and cached token counts at the model's own rate, multiplied by a flat markup, plus a per-query infrastructure component, and then floored at one cent. So a short question costs less than a long multi-turn one on the same tier, and the ranges are the band that falls out of that rather than a price list. Every response carries its own metadata.cost and metadata.usage, so you never have to estimate — you can read what the call cost from the call itself.

The keyless sandbox is not a tier: it serves static sample data with no authentication and no billing, so you can wire the integration up before you have an account. See the full pricing page.

Enterprise

What changes at volume

Four things, all of them shipping capabilities rather than a sales page. We are not going to list service levels, discounts or support tiers here, because those are contract terms and this page only carries what is in the product.

Batch

Up to 1,000 astrology questions submitted as a single asynchronous job, on Professional and Enterprise plans. The right shape for backfilling a user base rather than looping the synchronous endpoint.

White-label streaming

The SSE endpoint accepts an Enterprise white-label persona as part of its request body — a custom assistant name, system prompt and sign-off — so your assistant is yours in the stream, not just in your wrapper.

Idempotency that actually holds

Send an Idempotency-Key header. The reservation key is a hash of that key plus the request body, so a genuine retry reuses the hold and a different question under a reused key is correctly a separate charge. This is the difference between an idempotency story and an idempotency guarantee.

Your persona, capped and checked

A 400-line / 12,000-character custom persona, validated before billing and before the model call, and rejected rather than truncated when it is too large. It cannot override the safety layer or the computed facts — which is the property you want when the persona is being edited by a non-engineer.

Questions

The five things people ask first

What does the AI astrology chatbot API do?

It lets your users ask any astrology question in natural language and returns an answer grounded in a real computed chart, through one conversational endpoint: POST /api/v1/astrology/query. You send a question plus birth details and get back a written answer, the chart summary it was based on, and follow-up suggestions. Answers are available in 30 languages.

Are the chatbot answers grounded in a real chart, or just generated?

They are grounded in a real chart. Vedika computes the chart facts in code first — using the open-source XALEN Ephemeris — and then writes the answer from those facts, so the chatbot does not invent placements, dashas or yogas. The structured chart it used is returned alongside the text so you can verify it.

Which systems and languages does the chatbot support?

Users can ask across Vedic, Western and KP, and the chatbot replies in the language of the question. Responses are available in 30 languages, including 15 Indic languages with native script.

Is the chatbot's astrology sourced from classical texts?

Yes. For Jyotish answers, interpretations are grounded in the classical corpus — Brihat Parashara Hora Shastra, Phaladeepika, Saravali and Jaimini — rather than generic AI training data, with an honest method-cite for systems that have no single classical source.

How much does the chatbot API cost and can I try it free?

The conversational endpoint has a free sandbox you can call without an API key. Paid plans start at $12 per month with pay-per-use wallet credits, and per-query pricing runs roughly $0.01 to $0.05. There is no free production tier.