vedicAPI

Start an AI voice call

Starts a live voice call that answers questions about the person's chart. Your app joins the call with Agora's free SDK using the app_id, channel, uid and token we return. Counted per started minute, out of your call pack (or the free minutes on the Free plan); the call ends at max_minutes, when you end it, or 30 seconds after your user leaves.

POST/ai/call
₹1,000 for 50 minutes
  • Free
    50 minutes5 minutes to try
    Calls at once1
  • Starter
    50 minutes₹1,000 · $12
    Calls at once2
  • Growth
    50 minutes₹1,000 · $12
    Calls at once10
  • Scale
    50 minutes₹1,000 · $12
    Calls at once30

AI is prepaid: buy packs in Billing, valid 12 months. It never uses your plan's API calls and never adds to your monthly invoice. Free accounts get 5 minutes to try it, once. Failed requests cost nothing. AI pricing

Authentication

Send your API key as a Bearer token from your server. Never put the key in an app: start calls and ask questions from your backend. More on keys

Authorization: Bearer $VEDICAPI_KEY

Body parameters

  • datetimestringrequired

    Local birth time, ISO 8601 with no offset: 1990-10-21T00:45. Seconds are optional.

    Example 1990-10-21T00:45
  • latnumberrequired

    Latitude of the birth place, -90 to 90.

    Example 28.6139
  • lonnumberrequired

    Longitude of the birth place, -180 to 180.

    Example 77.209
  • tzstringrequired

    IANA zone (Asia/Kolkata) or an offset (+05:30). Past rule changes and daylight saving are handled.

    Example Asia/Kolkata
  • langstring

    Language of names and labels: en, hi, mr, bn, te, gu, ta, pa, kn, ml, en_IN (Hinglish) or de. Default en.

    Example en
  • ayanamsastring

    Ayanamsa. Lahiri (chitrapaksha) is the only one today and the default. Any other value gets 400 unsupported_ayanamsa.

    One of lahiri
  • voicestring

    The astrologer's voice. Default Kore.

    Example KoreOne of Aoede, Kore, Leda, Puck, Charon, Fenrir, Orus, Zephyr
  • max_minutesinteger

    Longest the call may run, 1 to 15. Default 10. If you have fewer minutes left, the call is limited to those; the answer says the real limit.

    Example 10
  • greetingstring

    What the astrologer says first, up to 300 characters. Default: a short welcome in English or Hindi; for other languages send your own, or the astrologer waits for the user to speak.

How a call works

  • 1
    WhereYour server
    WhatPOST /v1/ai/call with the birth fields. We start the astrologer and return app_id, channel, uid and token.
  • 2
    WhereYour app
    WhatJoin the channel with Agora's SDK and publish the microphone. The astrologer greets the user and the conversation starts.
  • 3
    WhereEither
    WhatYour server ends it with /end, or it ends by itself at max_minutes or 30 seconds after your user leaves.
  • 4
    WhereYour server
    WhatGET /v1/ai/call/{id} for minutes and transcript.
Joining from a web app
// npm install agora-rtc-sdk-ng   (Android, iOS, Flutter and React Native SDKs work the same way)
import AgoraRTC from "agora-rtc-sdk-ng";

// 1. On your server: POST /v1/ai/call with your key, pass app_id, channel, uid, token to the app.
const call = await fetch("/your-server/start-astrologer-call", { method: "POST" }).then(r => r.json());

// 2. In the app: join, play the astrologer, publish the microphone.
const client = AgoraRTC.createClient({ mode: "rtc", codec: "vp8" });
client.on("user-published", async (user, kind) => {
  await client.subscribe(user, kind);
  if (kind === "audio") user.audioTrack.play();
});
await client.join(call.app_id, call.channel, call.token, call.uid);
const mic = await AgoraRTC.createMicrophoneAudioTrack();
await client.publish([mic]);

// 3. To hang up: leave, then (on your server) POST /v1/ai/call/{call_id}/end for minutes and transcript.
await client.leave();
Agora's SDKs are free to use; the minutes come out of your call pack only.

Response

  • call_idstringUse it to end the call and to read its minutes and transcript.
  • app_id, channel, uid, tokenstring / integerJoin the call with Agora's SDK: client.join(app_id, channel, token, uid), then publish the microphone.
  • expires_atstringWhen the token stops working (max_minutes plus 5 minutes).
  • max_minutesintegerThe call ends by itself after this many minutes.
  • minutes_heldintegerTaken from your pack while the call runs. The minutes you don't use come back when it ends.
  • minutes_leftintegerWhat remains in your packs meanwhile.

Errors

  • 400
    Codesinvalid_jsoninvalid_datetimeinvalid_latinvalid_loninvalid_tzunsupported_langinvalid_voiceinvalid_max_minutesgreeting_too_longinvalid_end_user
    WhenA field is missing or invalid. The message names the field.
  • 401
    Codesmissing_keyunknown_key
    WhenNo key, or the key is wrong, revoked or past its rotation window.
  • 403
    Codesnot_allowed
    WhenThe key has an allow list and this call came from another IP or domain.
  • 429
    Codesrate_limitedtoo_many_callsai_limit
    WhenToo many calls running at once for your plan, or no call minutes left: buy a call pack in Billing. On Free: your free minutes, or the day's free minutes for everyone, are used.
  • 502
    Codesai_failed
    WhenThe voice agent could not start. The minutes go back to your pack. Retry.
  • 503
    Codesai_unavailable
    WhenVoice calls are switched off on the server.

Every error has one shape: { "error": "<message>", "code": "<code>", "request_id": "req_..." }. Errors and limits