Quickstart
Your first call in three steps
- Sign in at /developer and create a sandbox key. Sandbox calls are free, with no time limit, and return fixed sample responses.
- Call any endpoint. A sandbox key validates your request exactly as live does, then returns a fixed sample response.
- When your integration works, create a live key for real readings. Your account gets 100 free live credits once, valid for 60 days from your first live key; after that, buy a credit pack. See the free terms.
curl -X POST https://www.astronest.ai/api/developer/v1/chart \
-H "Authorization: Bearer astro_sandbox_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"birthData":{"date":"1990-05-12","time":"14:35","timezone":"Asia/Kolkata","latitude":28.6139,"longitude":77.209}}'Call the API from your server. Keys are secret, and the API sends no CORS headers, so browser calls fail by design.
Keys
Live and sandbox
| Key | What it returns | Cost |
|---|---|---|
astro_sandbox_… | Validates your request with the same error codes as live, then returns a fixed sample (the example on each endpoint below), marked sandbox: true and with an X-AstroNest-Sandbox: true header. Your inputs are checked, not used. | Free, no time limit |
astro_live_… | A real computation for the birth data you send. | Credits per call |
Send the key as Authorization: Bearer <key>. Each key is scoped to the endpoints you choose; all keys on an account share one credit balance. The secret is shown once; if you lose it, rotate the key in the portal.
Credits and pricing
Free to start, pay as you go
Every account gets 100 free live credits once, spent first. They do not renew and are valid for 60 days from your first live key; any left after that expire. Beyond that, buy a pack in the portal. Paid credits are one-time purchases and do not expire. Only successful (2xx) calls are charged; a failed call costs nothing. When credits run out the API answers 402 credits_exhausted.
Free terms
Free to start: sandbox keys, plus 100 free live credits once
Sandbox key — free, no time limit
- Every endpoint and MCP tool answers with a fixed sample response; your input is validated exactly as live, never used.
- Never charged and never expires. Limits: 120 requests a minute, 2 at a time.
- It does not compute real readings: for that you need a live key.
100 free live credits — once, valid 60 days
- Granted once per account, for live keys. A live key needs the beta terms accepted and a verified email.
- Valid for 60 days from when you create your first live key; any left after that expire. They do not renew.
- Spent before any paid credits, on successful calls only (a chart costs 1, a domain reading 5).
When the free credits are used up or expire
- After 100 credits or 60 days, whichever comes first, live calls return 402 credits_exhausted. Nothing is charged automatically: sandbox keys keep working, and your keys and settings stay.
What to do next
- Buy a credit pack in the portal: Starter $49 for 1,000 credits, Builder $199 for 5,000, Growth $499 for 15,000. One-time purchases, no subscription; paid credits never expire.
- High volume or a platform? Talk to us about Platform (custom pricing).
starter
$49
1,000 credits · 4.9¢ each
builder
$199
5,000 credits · 4.0¢ each
growth
$499
15,000 credits · 3.3¢ each
Platform
Custom pricing
Volume pricing · Higher concurrency · Dedicated support · Commercial SLA
Talk to us →For astrology platforms, practitioner networks, matchmaking services and high-volume applications. Volume pricing · Higher concurrency · Dedicated support · Commercial SLA · Custom integration · Consolidated billing. Talk to us.
Ephemeris calls are fractional. Positions, angles, ayanamsa and sunrise cost 0.1 credit each: the call that opens each block of 10 is charged 1 credit and the next nine are free, counted across the four per account. Failed calls do not count. A series costs 1 credit per started 100 points.
Free accounts may run 2 requests at once; buying any pack raises that to 5.
Endpoints
Reference
Base URL https://www.astronest.ai/api/developer. Every endpoint is POST with a JSON body. Full request and response schemas are in the OpenAPI spec; the OpenAPI guide shows how to import it into Postman, generate a client, or connect an AI app over MCP. The MCP server is listed on Smithery and in the official MCP Registry, and every endpoint is ready to send in our public Postman workspace.
| Endpoint | What it does | Credits |
|---|---|---|
| /v1/chart | Natal chart Calculation | 1 |
| /v1/dasha | Vimśottarī daśā timeline Calculation | 1 |
| /v1/guidance | Lifestyle guidance for the running daśā periods Interpretation | 3 |
| /v1/interpret | Domain reading Interpretation | 5 |
| /v1/compatibility | Compatibility of two charts Interpretation | 12 |
| /v1/muhurta | Auspicious windows (muhūrta) in a date range Interpretation | 10 |
| /v1/forecast | Forward-looking reading for a question Narrated | 8 |
| /v1/timing/resolve | Decision timing Narrated | 7 |
| /v1/ephemeris/positions | Positions at a moment Ephemeris | 0.1 |
| /v1/ephemeris/angles | Ascendant, MC and house cusps Ephemeris | 0.1 |
| /v1/ephemeris/ayanamsa | Ayanamsa values Ephemeris | 0.1 |
| /v1/ephemeris/sunrise | Sunrise and sunset Ephemeris | 0.1 |
| /v1/ephemeris/series | Positions over a range Ephemeris | 1 |
Calculation
Deterministic computation. No language model is called.
POST/v1/chart
1 creditNatal chart.
Sidereal (Lahiri) chart: ascendant, the nine grahas, twelve houses, yogas and the Vimśottarī daśā. A modern Western block is added unless `western` is false. With `location`, also astrocartography lines at that place and the chart's own frame relocated there.
Required: birthData
{
"birthData": {
"date": "1990-05-12",
"time": "14:35",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209
}
}POST/v1/dasha
1 creditVimśottarī daśā timeline.
Required: birthData
{
"birthData": {
"date": "1990-05-12",
"time": "14:35",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209
}
}Interpretation
Deterministic readings over the classical corpus. No language model is called.
POST/v1/guidance
3 creditsLifestyle guidance for the running daśā periods.
Plain-language guidance cards for each running daśā level (mahādaśā, antardaśā, …) at `referenceDate` (default: now).
Required: birthData
{
"birthData": {
"date": "1990-05-12",
"time": "14:35",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209
}
}POST/v1/interpret
5 creditsDomain reading.
Deterministic reading of one life domain: verdict, supporting and cautionary factors, timing windows, method agreement and the weighed corpus position. No language model is called.
Required: birthData, domain
{
"birthData": {
"date": "1990-05-12",
"time": "14:35",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209
},
"domain": "career"
}POST/v1/compatibility
12 creditsCompatibility of two charts.
Computes both charts and reads them together. Each partner object is a BirthData object plus optional `name` and `gender`.
Required: a, b
{
"a": {
"date": "1990-05-12",
"time": "14:35",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"name": "A"
},
"b": {
"date": "1991-11-03",
"time": "06:10",
"timezone": "Asia/Kolkata",
"latitude": 19.076,
"longitude": 72.8777,
"name": "B"
}
}POST/v1/muhurta
10 creditsAuspicious windows (muhūrta) in a date range.
Scans each day in the range and ranks windows for the subject. The pañcāṅga is computed for `eventPlace`, never defaulted to the birthplace.
Required: subject, eventPlace, rangeStart, rangeEnd
{
"subject": {
"date": "1990-05-12",
"time": "14:35",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209
},
"eventPlace": {
"latitude": 19.076,
"longitude": 72.8777,
"timezone": "Asia/Kolkata",
"label": "Mumbai"
},
"freeText": "signing a lease",
"rangeStart": "2026-11-01",
"rangeEnd": "2026-11-15"
}Narrated
Readings voiced by a language model, grounded in the deterministic verdict. Slower (tens of seconds).
POST/v1/forecast
8 creditsForward-looking reading for a question.
The interpret verdict for `domain`, voiced as a narrative answer to `question` by a language model grounded in the classical statements for the domain. Expect tens of seconds; set a client timeout of at least 90 s.
Required: birthData, domain, question
{
"birthData": {
"date": "1990-05-12",
"time": "14:35",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209
},
"domain": "career",
"question": "How will the next year unfold for my work?"
}POST/v1/timing/resolve
7 creditsDecision timing.
Like forecast, for a decision question, optionally anchored to `targetDate` or `dateRange`. Expect tens of seconds.
Required: birthData, domain, question
{
"birthData": {
"date": "1990-05-12",
"time": "14:35",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209
},
"domain": "career",
"question": "Should I accept the offer?",
"targetDate": "2026-11-15"
}Ephemeris
Raw astronomical positions from AstroNest’s own JPL DE440 engine: no Swiss Ephemeris licence or other astrology API needed. Deterministic, about a millisecond per position, no language model. One key scope (`ephemeris`) covers all five operations.
POST/v1/ephemeris/positions
0.1 creditPositions at a moment.
Sun, Moon, planets and lunar nodes at one moment: longitude, latitude, distance, speed and retrograde flag, with sign, and nakṣatra and pada when sidereal. `equatorial: true` adds apparent right ascension and declination.
Required: datetime
{
"datetime": "2026-10-06T06:00:00Z",
"bodies": [
"Sun",
"Moon",
"Mars",
"Jupiter",
"Saturn",
"TrueNode"
],
"zodiac": "sidereal",
"ayanamsa": "lahiri"
}POST/v1/ephemeris/angles
0.1 creditAscendant, MC and house cusps.
Ascendant, midheaven and twelve cusps for a moment and place. Placidus is undefined beyond the polar circles at some moments; the call then returns 422 houses_undefined_at_latitude.
Required: datetime, latitude, longitude
{
"datetime": "1990-05-12T14:35:00+05:30",
"latitude": 28.6139,
"longitude": 77.209,
"houseSystem": "placidus"
}POST/v1/ephemeris/ayanamsa
0.1 creditAyanamsa values.
Lahiri, Raman, Krishnamurti and Fagan–Bradley (mean, without nutation) at a moment.
Required: datetime
{
"datetime": "2026-10-06T00:00:00Z"
}POST/v1/ephemeris/sunrise
0.1 creditSunrise and sunset.
Sunrise, sunset and the next sunrise for a local date and place: upper limb at the sea-level horizon with 36.6′ refraction. The Vedic day runs from sunrise to the next sunrise.
Required: date, timezone, latitude, longitude
{
"date": "2026-10-06",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209
}POST/v1/ephemeris/series
1 creditPositions over a range.
Positions from start to end (inclusive) every stepMinutes, for transit tables and station finding. At most 1,000 points (too_many_points beyond). **Price: 1 credit per started 100 points** (a 365-point daily table costs 4).
Required: start, end, stepMinutes
{
"start": "2026-10-01T00:00:00Z",
"end": "2026-10-10T00:00:00Z",
"stepMinutes": 1440,
"bodies": [
"Mercury",
"Venus"
]
}Birth data
One object, validated before anything runs
Every reading takes a birthData object: date (YYYY-MM-DD), time (HH:MM or HH:MM:SS, local; omit if unknown), timezone (IANA, e.g. Asia/Kolkata), latitude and longitude. It is validated before anything is computed, so a malformed request is never charged. The API is stateless: birth data is used for the call and not stored.
Ephemeris inputs
A moment, not birth data
The Ephemeris operations take a moment instead of birth data: ISO 8601 with Z or an explicit offset (2026-10-06T06:00:00Z, 1990-05-12T14:35:00+05:30). A time without a zone is refused rather than guessed. Coverage is 1800-01-02 to 2149-12-31 UTC, from NASA JPL DE440. The zodiac defaults to sidereal with the Lahiri ayanamsa; pass zodiac: "tropical" or another ayanamsa to change it. One key scope, ephemeris, covers all five operations; keys created before it existed gain it by editing the key's scopes in the portal.
Domains
What a reading can be about
For interpret, forecast and timing/resolve:
careerbusinessfinancechildrenpropertyeducationtravelspiritualitylineagereputationpartnershipslegalfamilymarriagehealthErrors
Every failure is named, and none is charged
Errors return { "error": "<code>", "message": "…", "requestId": "…", "statusCode": n }. Quote the requestId in any support request. No error is charged.
| Status | Meaning |
|---|---|
| 400 | Invalid request. Codes: invalid_json, missing_birthdata, invalid_birthdata, invalid_timezone, invalid_coordinates, missing_required_field, invalid_domain, invalid_reference_date, invalid_range, no_days_evaluable. Not charged. |
| 401 | missing_api_key, invalid_api_key, revoked_key or expired_key. Not charged. |
| 402 | credits_exhausted: the one-time free credits are used or have expired (60 days from the first live key) and the paid balance is too low for this call; buy a credit pack in the developer portal. key_credit_limit_reached: this key has reached the monthly credit limit set on it in the portal (resets on the 1st, UTC). Never charged. |
| 403 | insufficient_scope: the key is not scoped for this endpoint. Not charged. |
| 422 | chart_integrity_failed, dasha_failed or guidance_failed: the birth data could not produce a valid result. Not charged. |
| 429 | rate_limited (over 120 requests a minute for this account) or concurrency_limit (too many requests at once). Retry-After says when to retry. Not charged. |
| 500 | Our error. Not charged. |
| 502 | narration_failed: the language model did not return a reading. Not charged. |
Readings carry qualitative confidence and plain-language reasons. They never include internal scores, rule identifiers or verbatim passages from the source texts. Where an endpoint cites its classical grounding, it names book titles only.
Rate limits
120 requests a minute per account
Each account may make up to 120 requests a minute (sandbox included) and run 2 at once (5 after any purchase). Over the limit, the API answers 429 rate_limited or 429 concurrency_limit with a Retry-After header; neither is charged. Responses carry X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset when limited.
Beta terms
What you agree to
Version beta-1-2026-10-07. You accept these in the portal before creating a live key or buying credits.
- The API is in beta. It is provided as is, without an SLA, and may change; we will try to give notice of breaking changes.
- Readings are symbolic interpretation only — not medical, legal, financial or psychological advice. You show the response's
disclaimerto your users and do not present a reading as a diagnosis or a guarantee. - You do not use readings to make decisions about people in employment, credit, insurance, housing or matchmaking on the basis of caste or religion, or any decision with legal effect based solely on a reading.
- You keep your keys secret and call the API from your server. You are responsible for calls made with your keys.
- You may display responses inside your own product. You do not resell raw API access, scrape the API to build a competing dataset or model, or try to reverse-engineer the rules behind the readings.
- You are responsible for your end users' personal data and for having a lawful basis to send it. We process birth data only to answer each call and do not store request bodies or responses.
- Credits are prepaid and non-refundable except where the law requires; failed calls are never charged. We may suspend keys used in breach of these terms.
- Full terms of service and a data processing addendum are being finalised. When they are published you will be asked to accept them before your next live key or purchase.
Use responsibly
Symbolic interpretation only — not medical, legal, financial or psychological advice. Show the disclaimer field to your users. The API is in beta: there is no SLA yet, and the terms of service are being finalised.