API96Astro API

Quickstart

From signup to your first birth chart in a few minutes.

1. Create an account

Sign up with your email. No card is needed. Your trial includes 5,000 credits for 14 days across every available family.

2. Create a key

In the dashboard, open Keys and create a sandbox key. The full key is shown once; store it in your server's secret store or an environment variable.

export ASTRO_API_KEY="sk_test_..."

Keys belong on your server. Never put a key in a mobile app, a browser bundle or a public repository.

3. Make your first call

curl https://api.96astro.com/v1/vedic-charts/planet-positions \
  -H "Authorization: Bearer $ASTRO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "datetime": "1990-10-18T14:30:00",
    "timezone": "Asia/Kolkata",
    "latitude": 28.6139,
    "longitude": 77.2090,
    "ayanamsha": "lahiri"
  }'

Or use an SDK, which adds retries, idempotency keys and typed inputs. The SDKs are not on npm or PyPI yet; until they are, use the curl call above or ask support for a pre-release package.

// TypeScript: npm install @96astro/api (publishing soon)
import { Astro96Client } from "@96astro/api";

const astro = new Astro96Client({ apiKey: process.env.ASTRO_API_KEY });
const { data } = await astro.vedicCharts.planetPositions({
  datetime: "1990-10-18T14:30:00",
  timezone: "Asia/Kolkata",
  latitude: 28.6139,
  longitude: 77.209,
  ayanamsha: "lahiri",
});
# Python: pip install astro96-api (publishing soon)
from astro96_api import Astro96Client

astro = Astro96Client()  # reads ASTRO_API_KEY
res = astro.vedic_charts.planet_positions(
    {"datetime": "1990-10-18T14:30:00", "timezone": "Asia/Kolkata", "latitude": 28.6139, "longitude": 77.209, "ayanamsha": "lahiri"}
)
data = res.data

To explore without code, import the Postman collection.

A successful response looks like this, trimmed to two of the twelve bodies and fewer fields each:

{
  "data": {
    "ayanamsha": { "id": "lahiri", "name": "N.C. Lahiri", "degrees": 23.7285 },
    "node": "true",
    "house_system": "whole_sign",
    "ascendant": { "sign": "Capricorn", "degree": 23.8935, "nakshatra": "Dhanishta", "pada": 1 },
    "planets": [
      { "name": "Sun", "sign": "Libra", "degree": 0.9951, "nakshatra": "Chitra", "pada": 3, "house": 10 },
      { "name": "Moon", "sign": "Virgo", "degree": 27.8766, "nakshatra": "Chitra", "pada": 2, "house": 9 }
    ]
  },
  "meta": {
    "request_id": "req_6e985a89a166b73ea220",
    "api_version": "v1",
    "credits_used": 0,
    "warnings": [],
    "language": "en"
  }
}

credits_used is 0 because sandbox calls are free. With a live key, planet positions is a heavy calculation and costs 3 credits.

4. Go live

When you are ready, choose a plan, create a live key and swap it in. Sandbox and live keys never cross over, so testing cannot spend live credits.

Next steps

On this page