# Quickstart

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

## 1. Create an account

[Sign up](https://96astroapi.com/signup) 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.

```bash
export ASTRO_API_KEY="sk_test_..."
```

> **Warning:** 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

```bash
curl https://api.96astroapi.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](https://96astroapi.com/docs/sdks.md), 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](https://96astroapi.com/support) for a pre-release package.

```ts
// 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
# 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](https://96astroapi.com/docs/sdks.md#postman).

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

```json
{
  "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](https://96astroapi.com/pricing), create a **live** key and swap it in. Sandbox and live keys never cross over, so testing cannot spend live credits.

## Next steps

- Learn the input conventions in [Requests and responses](https://96astroapi.com/docs/requests-and-responses.md).
- Handle failures properly with [Errors](https://96astroapi.com/docs/errors.md) and [Idempotency](https://96astroapi.com/docs/idempotency.md).
- Find every endpoint in the [API reference](https://96astroapi.com/docs/reference), use an [SDK or the Postman collection](https://96astroapi.com/docs/sdks.md), or download the [OpenAPI 3.1 document](https://96astroapi.com/openapi/v1.json) to generate a client in another language.
