96Astro API

Documentation

Your first PDF report

Create a branded PDF report as a background job, wait for it, and download the file.

A PDF takes longer than a normal call, so it runs as a job. You create it, wait, and download the file from a signed link. This guide does each step with a sandbox key, which is free and adds a SANDBOX watermark.

1. Create the job

curl https://api.96astroapi.com/v1/jobs/pdf \
  -H "Authorization: Bearer $ASTRO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: first-report-1" \
  -d '{
    "capability": "report-career",
    "input": { "datetime": "1990-10-18T14:30:00", "timezone": "Asia/Kolkata", "latitude": 28.6139, "longitude": 77.209 },
    "chart_style": "north",
    "branding": {
      "brand_name": "Shree Jyotish Kendra",
      "accent": "#1f4fd1",
      "website": "jyotish.example",
      "email": "hello@jyotish.example",
      "phone": "+91 98100 00000"
    }
  }'

The answer is 202 Accepted, with the job's id and its status of queued. Any report-priced capability works here. The catalogue marks them, and each report's page shows its price as a PDF. For every section of a chart in one report, use report-complete-kundli, which is 54 pages and costs more.

The Idempotency-Key means that if your request times out and you send it again, you get the same job and are not charged twice.

2. Wait for it

Poll the job every few seconds. Polling is free.

curl https://api.96astroapi.com/v1/jobs/$JOB_ID -H "Authorization: Bearer $ASTRO_API_KEY"

status goes from queued to running, then to succeeded or failed. A failed job is not charged.

For anything in production, use a webhook in place of polling, so that we tell you when it is ready.

3. Download the file

When the job has succeeded, download_url is a signed link that needs no key. Fetch it from your server and store the file yourself, because we keep it for 7 days.

Kundli packages

classical-kundli-report prints a classical Kundli in one of five packages. Send bundle in the input:

bundleContentsReport units
smallD1 and D9 charts, birth details (Avakhada), planet positions, five-fold friendship, Vimshottari dasha and the ascendant reading1
mediumSmall, plus Bhav Chalit, KP planets and cusps, Manglik, Kaal Sarp, Sade Sati, gemstones and rudraksha2
largeMedium, plus Ashtakavarga, Yogini and Chara dasha, planetary dispositions, favourable points, yogas and graha phala3
dashaThe Small sections, plus dasha predictions, the dasha reading and yogas2
annualThe Small sections, plus a prediction for each of the next 12 months2

Each section is exactly what its own capability returns for the same birth, for example kp-cusps or yogini-dasha. A package is sold whole. If any section cannot be computed, the call fails and nothing is charged: an input the section cannot work with is a 422, and anything else is a retryable 502. You never get a package with a section missing.

report-complete-kundli puts every section of a chart in one PDF, and matching-report prints Kundli matching for two people. A unit is one report's price; the pricing page shows the credits for each.

See before you build: the sample gallery has a real PDF of each package. Small Kundli and Kundli Matching are there in English and all 25 other languages, and Large Kundli in 11. Small Kundli, Complete Kundli and Kundli Matching are also there in North, South and East chart styles.

Going further

  • Other languages: send "language": "hi". See Languages.
  • A spoken version: the same job with /v1/jobs/audio gives an MP3. See Audio reports.
  • In your dashboard: PDF and audio jobs lists your jobs with their links.

On this page