API reference / AI interpretation
AI interpretation
AI-written readings and answers grounded in chart, report or Vastu data the service computes.
8 endpoints. Every endpoint is POST with a JSON body and your key in the Authorization header. Request schemas and examples come from the OpenAPI document; each example response was captured from the live engine and its data fields are a guide to the shape, not a contract.
Floor-Plan Auto-Detect (Vision)
POSTBeta
https://api.96astro.com/v1/ai/vastu-vision-detectAn AI vision model proposes a floor plan from a picture of it (PNG, JPEG or WebP): outline, centre, rooms, structures and main entrance in pixel coordinates, shaped as vastu-analyse input, with a confidence note.
- Credits
- Metered, from 15 credits
- Input
- Specific input
- Output
- JSON
- Delivery
- Direct response
- Languages
- English; translated term names with
labels
| Header | Value and description |
|---|---|
AuthorizationRequired | Bearer YOUR_API_KEYYour sandbox (sk_test_...) or live (sk_live_...) key. X-API-Key: <key> is accepted instead. |
Content-TypeRequired | application/jsonThe body is JSON. |
Idempotency-KeyOptional | <unique string>Makes retries safe: a repeated key with the same body replays the stored response and is never charged twice. (1 to 200 characters) |
| Field | Description |
|---|---|
image_base64stringRequired | The floor-plan image file, base64-encoded (a `data:image/...;base64,` prefix is accepted). PNG, JPEG or WebP; at most 3.75 MiB decoded and 8000 px a side. Limits: 1 to 5400000 characters Example: |
mime_typestring | nullOptional | The image's type. Required unless image_base64 is a data: URI; must match the file. Default: Allowed values: image/pngimage/jpegimage/webp Example: |
tierstringOptional | fast (Claude Haiku) or balanced (Sonnet). Sets the price range. Default: Allowed values: fastbalanced Example: |
labelsstringOptional | Optional. Adds `meta.labels`: translated display names for the identifiers in the answer. `data` is unchanged. Free. Any other code is refused with 422 unsupported_language. Allowed values: asbndeesfrguhiitknkomlmrnenlorpaplptrusitatetrur |
Response · fields in data
Inferred from the example response: a guide to the shape, not a contract.
plan· objectmain_entrance· nullnorth_hint· stringimage· objectconfidence· objecttier· string
Example request
curl -X POST https://api.96astro.com/v1/ai/vastu-vision-detect \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"image_base64": "iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAAAAABQyaazAAAAgklEQVR42u3bQQoAIAgEQP//6fpCBsFWs2fBEbyJNcJTgICAgIDXACspgIeAp/aouvWAgICAgICAgICAgICAgICAgICAgICAgICAgICAgGsN0+/F4cCNgQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE7QA/QbwMzAwgICPg7cAJxuHlDZty0owAAAABJRU5ErkJggg==",
"mime_type": "image/png",
"tier": "fast"
}'const response = await fetch("https://api.96astro.com/v1/ai/vastu-vision-detect", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"image_base64": "iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAAAAABQyaazAAAAgklEQVR42u3bQQoAIAgEQP//6fpCBsFWs2fBEbyJNcJTgICAgIDXACspgIeAp/aouvWAgICAgICAgICAgICAgICAgICAgICAgICAgICAgGsN0+/F4cCNgQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE7QA/QbwMzAwgICPg7cAJxuHlDZty0owAAAABJRU5ErkJggg==",
"mime_type": "image/png",
"tier": "fast"
}),
});
const { data, meta } = await response.json();
console.log(data);import { Astro96Client } from "@96astro/api";
const astro = new Astro96Client({ apiKey: "YOUR_API_KEY" });
const { data, meta } = await astro.ai.vastuVisionDetect({
"image_base64": "iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAAAAABQyaazAAAAgklEQVR42u3bQQoAIAgEQP//6fpCBsFWs2fBEbyJNcJTgICAgIDXACspgIeAp/aouvWAgICAgICAgICAgICAgICAgICAgICAgICAgICAgGsN0+/F4cCNgQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE7QA/QbwMzAwgICPg7cAJxuHlDZty0owAAAABJRU5ErkJggg==",
"mime_type": "image/png",
"tier": "fast"
});
console.log(data);import requests
response = requests.post(
"https://api.96astro.com/v1/ai/vastu-vision-detect",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"image_base64": "iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAAAAABQyaazAAAAgklEQVR42u3bQQoAIAgEQP//6fpCBsFWs2fBEbyJNcJTgICAgIDXACspgIeAp/aouvWAgICAgICAgICAgICAgICAgICAgICAgICAgICAgGsN0+/F4cCNgQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE7QA/QbwMzAwgICPg7cAJxuHlDZty0owAAAABJRU5ErkJggg==",
"mime_type": "image/png",
"tier": "fast",
},
timeout=60,
)
response.raise_for_status()
data = response.json()["data"]
print(data)from astro96_api import Astro96Client
astro = Astro96Client(api_key="YOUR_API_KEY")
res = astro.ai.vastu_vision_detect({
"image_base64": "iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAAAAABQyaazAAAAgklEQVR42u3bQQoAIAgEQP//6fpCBsFWs2fBEbyJNcJTgICAgIDXACspgIeAp/aouvWAgICAgICAgICAgICAgICAgICAgICAgICAgICAgGsN0+/F4cCNgQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE7QA/QbwMzAwgICPg7cAJxuHlDZty0owAAAABJRU5ErkJggg==",
"mime_type": "image/png",
"tier": "fast",
})
print(res.data)<?php
$ch = curl_init('https://api.96astro.com/v1/ai/vastu-vision-detect');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'image_base64' => 'iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAAAAABQyaazAAAAgklEQVR42u3bQQoAIAgEQP//6fpCBsFWs2fBEbyJNcJTgICAgIDXACspgIeAp/aouvWAgICAgICAgICAgICAgICAgICAgICAgICAgICAgGsN0+/F4cCNgQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE7QA/QbwMzAwgICPg7cAJxuHlDZty0owAAAABJRU5ErkJggg==',
'mime_type' => 'image/png',
'tier' => 'fast',
]),
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result['data']);package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"image_base64": "iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAAAAABQyaazAAAAgklEQVR42u3bQQoAIAgEQP//6fpCBsFWs2fBEbyJNcJTgICAgIDXACspgIeAp/aouvWAgICAgICAgICAgICAgICAgICAgICAgICAgICAgGsN0+/F4cCNgQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE7QA/QbwMzAwgICPg7cAJxuHlDZty0owAAAABJRU5ErkJggg==",
"mime_type": "image/png",
"tier": "fast"
}`)
req, err := http.NewRequest("POST", "https://api.96astro.com/v1/ai/vastu-vision-detect", body)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.Status, string(out))
}Example response (illustrative)
{
"data": {
"plan": {
"boundary": [
[
10,
10
],
[
150,
10
],
[
150,
110
],
[
10,
110
]
…Written by hand from the documented shape: AI readings are not captured automatically. Real text, token counts and credits differ.
Error responses
- 400invalid_request
- 401invalid_key, expired_key
- 402payment_required
- 403account_suspended
- 404not_found
- 409idempotency_conflict
- 413payload_too_large
- 422invalid_request, unsupported_language
- 429rate_limited, quota_exhausted, spend_cap_reached, project_budget_exceeded
- 500computation_failed
- 502unavailable
- 503unavailable
- 504deadline_exceeded
Errors are never charged. What each status means and what to do: errors.
Vastu Defect Explanation (AI)
POSTBeta
https://api.96astro.com/v1/ai/vastu-explain-defectAn AI-written explanation of one Vastu defect in sections, with its remedies explained.
- Credits
- Metered, from 15 credits
- Input
- Specific input
- Output
- JSON
- Delivery
- Direct response
- Languages
- English; translated term names with
labels
| Header | Value and description |
|---|---|
AuthorizationRequired | Bearer YOUR_API_KEYYour sandbox (sk_test_...) or live (sk_live_...) key. X-API-Key: <key> is accepted instead. |
Content-TypeRequired | application/jsonThe body is JSON. |
Idempotency-KeyOptional | <unique string>Makes retries safe: a repeated key with the same body replays the stored response and is never charged twice. (1 to 200 characters) |
| Field | Description |
|---|---|
defectobjectRequired | One entry of vastu-analyse data.defects, as it came. |
defect.keystringOptional | The defect's key (empty when no remedy is written for it). Default: Limits: at most 80 characters Example: |
defect.titlestringRequired | e.g. 'Toilet placed in NE'. Limits: 1 to 300 characters Example: |
defect.severitystringRequired | Allowed values: severepoormixed Example: |
defect.has_remedyboolean | nullOptional | As in vastu-analyse; not used. Default: Example: |
remediesobject | nullOptional | The data.remedies entry for this defect (its 'defect' equals the defect's title), as it came. With it, the explanation says why each remedy works. Default: |
remedies.defectstringRequired | Title of the defect these remedies are for. Limits: 1 to 300 characters Example: |
remedies.severitystringRequired | Allowed values: severepoormixed Example: |
remedies.priorityinteger | nullOptional | 1 = most urgent. Default: Limits: minimum 1, maximum 5 Example: |
remedies.freearray of objectsOptional | Limits: at most 5 items |
remedies.free[].actionstringRequired | Limits: 1 to 200 characters Example: |
remedies.free[].effortstringOptional | Default: Allowed values: lowmediumhighvery high Example: |
remedies.free[].cost_inrintegerOptional | Default: Limits: minimum 0, maximum 10000000 Example: |
remedies.objectsarray of objectsOptional | Limits: at most 5 items |
remedies.objects[].actionstringRequired | Limits: 1 to 200 characters Example: |
remedies.objects[].effortstringOptional | Default: Allowed values: lowmediumhighvery high Example: |
remedies.objects[].cost_inrintegerOptional | Default: Limits: minimum 0, maximum 10000000 Example: |
remedies.structuralarray of objectsOptional | Limits: at most 5 items |
remedies.structural[].actionstringRequired | Limits: 1 to 200 characters Example: |
remedies.structural[].effortstringOptional | Default: Allowed values: lowmediumhighvery high Example: |
remedies.structural[].cost_inrintegerOptional | Default: Limits: minimum 0, maximum 10000000 Example: |
dashaobject | nullOptional | The running dasha, to relate the defect to the chart. Default: |
dasha.mahadashastringRequired | Allowed values: SunMoonMercuryVenusMarsJupiterSaturnRahuKetu Example: |
dasha.antardashastring | nullOptional | Default: Allowed values: SunMoonMercuryVenusMarsJupiterSaturnRahuKetu Example: |
dasha.mahadasha_endstring | nullOptional | Accepted; not used. Default: Limits: format date |
dasha.antardasha_endstring | nullOptional | Accepted; not used. Default: Limits: format date |
tierstringOptional | fast (Claude Haiku), balanced (Sonnet) or deep (Opus). Sets the price range. Default: Allowed values: fastbalanceddeep Example: |
labelsstringOptional | Optional. Adds `meta.labels`: translated display names for the identifiers in the answer. `data` is unchanged. Free. Any other code is refused with 422 unsupported_language. Allowed values: asbndeesfrguhiitknkomlmrnenlorpaplptrusitatetrur |
Response · fields in data
Inferred from the example response: a guide to the shape, not a contract.
defect· objectsections· array of objecttext· stringtier· stringremedies_explained· integerdasha_used· boolean
Example request
curl -X POST https://api.96astro.com/v1/ai/vastu-explain-defect \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"defect": {
"key": "toilet_in_NE",
"title": "Toilet placed in NE",
"severity": "severe",
"has_remedy": true
},
"remedies": {
"defect": "Toilet placed in NE",
"severity": "severe",
"priority": 1,
"free": [
{
"action": "Keep toilet door closed at all times",
"effort": "low",
"cost_inr": 0
}
],
"objects": [
{
"action": "Hang a 9-rod metal wind-chime outside toilet entrance",
"effort": "low",
"cost_inr": 400
}
],
"structural": [
{
"action": "Relocate toilet to W or NW corner",
"effort": "very high",
"cost_inr": 80000
}
]
},
"dasha": {
"mahadasha": "Jupiter",
"antardasha": "Saturn"
},
"tier": "fast"
}'const response = await fetch("https://api.96astro.com/v1/ai/vastu-explain-defect", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"defect": {
"key": "toilet_in_NE",
"title": "Toilet placed in NE",
"severity": "severe",
"has_remedy": true
},
"remedies": {
"defect": "Toilet placed in NE",
"severity": "severe",
"priority": 1,
"free": [
{
"action": "Keep toilet door closed at all times",
"effort": "low",
"cost_inr": 0
}
],
"objects": [
{
"action": "Hang a 9-rod metal wind-chime outside toilet entrance",
"effort": "low",
"cost_inr": 400
}
],
"structural": [
{
"action": "Relocate toilet to W or NW corner",
"effort": "very high",
"cost_inr": 80000
}
]
},
"dasha": {
"mahadasha": "Jupiter",
"antardasha": "Saturn"
},
"tier": "fast"
}),
});
const { data, meta } = await response.json();
console.log(data);import { Astro96Client } from "@96astro/api";
const astro = new Astro96Client({ apiKey: "YOUR_API_KEY" });
const { data, meta } = await astro.ai.vastuExplainDefect({
"defect": {
"key": "toilet_in_NE",
"title": "Toilet placed in NE",
"severity": "severe",
"has_remedy": true
},
"remedies": {
"defect": "Toilet placed in NE",
"severity": "severe",
"priority": 1,
"free": [
{
"action": "Keep toilet door closed at all times",
"effort": "low",
"cost_inr": 0
}
],
"objects": [
{
"action": "Hang a 9-rod metal wind-chime outside toilet entrance",
"effort": "low",
"cost_inr": 400
}
],
"structural": [
{
"action": "Relocate toilet to W or NW corner",
"effort": "very high",
"cost_inr": 80000
}
]
},
"dasha": {
"mahadasha": "Jupiter",
"antardasha": "Saturn"
},
"tier": "fast"
});
console.log(data);import requests
response = requests.post(
"https://api.96astro.com/v1/ai/vastu-explain-defect",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"defect": {
"key": "toilet_in_NE",
"title": "Toilet placed in NE",
"severity": "severe",
"has_remedy": True,
},
"remedies": {
"defect": "Toilet placed in NE",
"severity": "severe",
"priority": 1,
"free": [
{
"action": "Keep toilet door closed at all times",
"effort": "low",
"cost_inr": 0,
},
],
"objects": [
{
"action": "Hang a 9-rod metal wind-chime outside toilet entrance",
"effort": "low",
"cost_inr": 400,
},
],
"structural": [
{
"action": "Relocate toilet to W or NW corner",
"effort": "very high",
"cost_inr": 80000,
},
],
},
"dasha": {
"mahadasha": "Jupiter",
"antardasha": "Saturn",
},
"tier": "fast",
},
timeout=60,
)
response.raise_for_status()
data = response.json()["data"]
print(data)from astro96_api import Astro96Client
astro = Astro96Client(api_key="YOUR_API_KEY")
res = astro.ai.vastu_explain_defect({
"defect": {
"key": "toilet_in_NE",
"title": "Toilet placed in NE",
"severity": "severe",
"has_remedy": True,
},
"remedies": {
"defect": "Toilet placed in NE",
"severity": "severe",
"priority": 1,
"free": [
{
"action": "Keep toilet door closed at all times",
"effort": "low",
"cost_inr": 0,
},
],
"objects": [
{
"action": "Hang a 9-rod metal wind-chime outside toilet entrance",
"effort": "low",
"cost_inr": 400,
},
],
"structural": [
{
"action": "Relocate toilet to W or NW corner",
"effort": "very high",
"cost_inr": 80000,
},
],
},
"dasha": {
"mahadasha": "Jupiter",
"antardasha": "Saturn",
},
"tier": "fast",
})
print(res.data)<?php
$ch = curl_init('https://api.96astro.com/v1/ai/vastu-explain-defect');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'defect' => [
'key' => 'toilet_in_NE',
'title' => 'Toilet placed in NE',
'severity' => 'severe',
'has_remedy' => true,
],
'remedies' => [
'defect' => 'Toilet placed in NE',
'severity' => 'severe',
'priority' => 1,
'free' => [
[
'action' => 'Keep toilet door closed at all times',
'effort' => 'low',
'cost_inr' => 0,
],
],
'objects' => [
[
'action' => 'Hang a 9-rod metal wind-chime outside toilet entrance',
'effort' => 'low',
'cost_inr' => 400,
],
],
'structural' => [
[
'action' => 'Relocate toilet to W or NW corner',
'effort' => 'very high',
'cost_inr' => 80000,
],
],
],
'dasha' => [
'mahadasha' => 'Jupiter',
'antardasha' => 'Saturn',
],
'tier' => 'fast',
]),
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result['data']);package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"defect": {
"key": "toilet_in_NE",
"title": "Toilet placed in NE",
"severity": "severe",
"has_remedy": true
},
"remedies": {
"defect": "Toilet placed in NE",
"severity": "severe",
"priority": 1,
"free": [
{
"action": "Keep toilet door closed at all times",
"effort": "low",
"cost_inr": 0
}
],
"objects": [
{
"action": "Hang a 9-rod metal wind-chime outside toilet entrance",
"effort": "low",
"cost_inr": 400
}
],
"structural": [
{
"action": "Relocate toilet to W or NW corner",
"effort": "very high",
"cost_inr": 80000
}
]
},
"dasha": {
"mahadasha": "Jupiter",
"antardasha": "Saturn"
},
"tier": "fast"
}`)
req, err := http.NewRequest("POST", "https://api.96astro.com/v1/ai/vastu-explain-defect", body)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.Status, string(out))
}Example response (illustrative)
{
"data": {
"defect": {
"key": "toilet_in_NE",
"title": "Toilet placed in NE",
"severity": "severe"
},
"sections": [
{
"heading": "Why it matters",
"text": "The north-east (Ishanya) is the zone of water and clarity. A toilet here is treated in Vastu as the most serious placement defect."
},
{
"heading": "What you can do",
"text": "Keep the toilet door closed at all times. A 9-rod metal wind-chime outside the entrance is the usual object remedy. The structural fix is to relocate the toilet to the west or north-west."
},
{
"heading": "With your running dasha",
"text": "Jupiter, your Mahadasha lord, rules the north-east, so this zone deserves attention during the Jupiter-Saturn period."
}
…Written by hand from the documented shape: AI readings are not captured automatically. Real text, token counts and credits differ.
Error responses
- 400invalid_request
- 401invalid_key, expired_key
- 402payment_required
- 403account_suspended
- 404not_found
- 409idempotency_conflict
- 413payload_too_large
- 422invalid_request, unsupported_language
- 429rate_limited, quota_exhausted, spend_cap_reached, project_budget_exceeded
- 500computation_failed
- 502unavailable
- 503unavailable
- 504deadline_exceeded
Errors are never charged. What each status means and what to do: errors.
Vastu Remedy Ranking (AI)
POSTBeta
https://api.96astro.com/v1/ai/vastu-rank-remediesAI picks the top three actions across all defects and remedy tiers, each with what it addresses, effort and timeframe, and a summary.
- Credits
- Metered, from 15 credits
- Input
- Specific input
- Output
- JSON
- Delivery
- Direct response
- Languages
- English; translated term names with
labels
| Header | Value and description |
|---|---|
AuthorizationRequired | Bearer YOUR_API_KEYYour sandbox (sk_test_...) or live (sk_live_...) key. X-API-Key: <key> is accepted instead. |
Content-TypeRequired | application/jsonThe body is JSON. |
Idempotency-KeyOptional | <unique string>Makes retries safe: a repeated key with the same body replays the stored response and is never charged twice. (1 to 200 characters) |
| Field | Description |
|---|---|
remediesarray of objectsRequired | vastu-analyse data.remedies, as it came. Limits: 1 to 40 items |
remedies[].defectstringRequired | Title of the defect these remedies are for. Limits: 1 to 300 characters Example: |
remedies[].severitystringRequired | Allowed values: severepoormixed Example: |
remedies[].priorityinteger | nullOptional | 1 = most urgent. Default: Limits: minimum 1, maximum 5 Example: |
remedies[].freearray of objectsOptional | Limits: at most 5 items |
remedies[].free[].actionstringRequired | Limits: 1 to 200 characters Example: |
remedies[].free[].effortstringOptional | Default: Allowed values: lowmediumhighvery high Example: |
remedies[].free[].cost_inrintegerOptional | Default: Limits: minimum 0, maximum 10000000 Example: |
remedies[].objectsarray of objectsOptional | Limits: at most 5 items |
remedies[].objects[].actionstringRequired | Limits: 1 to 200 characters Example: |
remedies[].objects[].effortstringOptional | Default: Allowed values: lowmediumhighvery high Example: |
remedies[].objects[].cost_inrintegerOptional | Default: Limits: minimum 0, maximum 10000000 Example: |
remedies[].structuralarray of objectsOptional | Limits: at most 5 items |
remedies[].structural[].actionstringRequired | Limits: 1 to 200 characters Example: |
remedies[].structural[].effortstringOptional | Default: Allowed values: lowmediumhighvery high Example: |
remedies[].structural[].cost_inrintegerOptional | Default: Limits: minimum 0, maximum 10000000 Example: |
defectsarray of objectsOptional | vastu-analyse data.defects, as it came (optional). Limits: at most 100 items |
defects[].keystringOptional | The defect's key (empty when no remedy is written for it). Default: Limits: at most 80 characters |
defects[].titlestringRequired | e.g. 'Toilet placed in NE'. Limits: 1 to 300 characters |
defects[].severitystringRequired | Allowed values: severepoormixed |
defects[].has_remedyboolean | nullOptional | As in vastu-analyse; not used. Default: |
dashaobject | nullOptional | The running dasha; defects in its zones rank higher. Default: |
dasha.mahadashastringRequired | Allowed values: SunMoonMercuryVenusMarsJupiterSaturnRahuKetu |
dasha.antardashastring | nullOptional | Default: Allowed values: SunMoonMercuryVenusMarsJupiterSaturnRahuKetu |
dasha.mahadasha_endstring | nullOptional | Accepted; not used. Default: Limits: format date |
dasha.antardasha_endstring | nullOptional | Accepted; not used. Default: Limits: format date |
goalstring | nullOptional | The life goal to favour. Default: Allowed values: careermarriagewealthspiritualhealtheducationpeacechildrenpropertyromancefameforeigntravelpoliticsarts Example: |
tierstringOptional | fast (Claude Haiku), balanced (Sonnet) or deep (Opus). Sets the price range. Default: Allowed values: fastbalanceddeep Example: |
labelsstringOptional | Optional. Adds `meta.labels`: translated display names for the identifiers in the answer. `data` is unchanged. Free. Any other code is refused with 422 unsupported_language. Allowed values: asbndeesfrguhiitknkomlmrnenlorpaplptrusitatetrur |
Response · fields in data
Inferred from the example response: a guide to the shape, not a contract.
top3· array of objectsummary· stringgoal· stringtier· stringcandidates· integerdasha_used· boolean
Example request
curl -X POST https://api.96astro.com/v1/ai/vastu-rank-remedies \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"remedies": [
{
"defect": "Toilet placed in NE",
"severity": "severe",
"priority": 1,
"free": [
{
"action": "Keep toilet door closed at all times",
"effort": "low",
"cost_inr": 0
}
],
"objects": [
{
"action": "Hang a 9-rod metal wind-chime outside toilet entrance",
"effort": "low",
"cost_inr": 400
}
],
"structural": [
{
"action": "Relocate toilet to W or NW corner",
"effort": "very high",
"cost_inr": 80000
}
]
},
{
"defect": "Brahmasthan (central area) is blocked",
"severity": "poor",
"priority": 2,
"free": [
{
"action": "Clear all clutter, furniture, partitions from central area",
"effort": "medium"
}
],
"objects": [
{
"action": "Place a brass kalash or Vastu Purusha symbol at center",
"cost_inr": 800
}
],
"structural": []
}
],
"goal": "wealth",
"tier": "fast"
}'const response = await fetch("https://api.96astro.com/v1/ai/vastu-rank-remedies", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"remedies": [
{
"defect": "Toilet placed in NE",
"severity": "severe",
"priority": 1,
"free": [
{
"action": "Keep toilet door closed at all times",
"effort": "low",
"cost_inr": 0
}
],
"objects": [
{
"action": "Hang a 9-rod metal wind-chime outside toilet entrance",
"effort": "low",
"cost_inr": 400
}
],
"structural": [
{
"action": "Relocate toilet to W or NW corner",
"effort": "very high",
"cost_inr": 80000
}
]
},
{
"defect": "Brahmasthan (central area) is blocked",
"severity": "poor",
"priority": 2,
"free": [
{
"action": "Clear all clutter, furniture, partitions from central area",
"effort": "medium"
}
],
"objects": [
{
"action": "Place a brass kalash or Vastu Purusha symbol at center",
"cost_inr": 800
}
],
"structural": []
}
],
"goal": "wealth",
"tier": "fast"
}),
});
const { data, meta } = await response.json();
console.log(data);import { Astro96Client } from "@96astro/api";
const astro = new Astro96Client({ apiKey: "YOUR_API_KEY" });
const { data, meta } = await astro.ai.vastuRankRemedies({
"remedies": [
{
"defect": "Toilet placed in NE",
"severity": "severe",
"priority": 1,
"free": [
{
"action": "Keep toilet door closed at all times",
"effort": "low",
"cost_inr": 0
}
],
"objects": [
{
"action": "Hang a 9-rod metal wind-chime outside toilet entrance",
"effort": "low",
"cost_inr": 400
}
],
"structural": [
{
"action": "Relocate toilet to W or NW corner",
"effort": "very high",
"cost_inr": 80000
}
]
},
{
"defect": "Brahmasthan (central area) is blocked",
"severity": "poor",
"priority": 2,
"free": [
{
"action": "Clear all clutter, furniture, partitions from central area",
"effort": "medium"
}
],
"objects": [
{
"action": "Place a brass kalash or Vastu Purusha symbol at center",
"cost_inr": 800
}
],
"structural": []
}
],
"goal": "wealth",
"tier": "fast"
});
console.log(data);import requests
response = requests.post(
"https://api.96astro.com/v1/ai/vastu-rank-remedies",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"remedies": [
{
"defect": "Toilet placed in NE",
"severity": "severe",
"priority": 1,
"free": [
{
"action": "Keep toilet door closed at all times",
"effort": "low",
"cost_inr": 0,
},
],
"objects": [
{
"action": "Hang a 9-rod metal wind-chime outside toilet entrance",
"effort": "low",
"cost_inr": 400,
},
],
"structural": [
{
"action": "Relocate toilet to W or NW corner",
"effort": "very high",
"cost_inr": 80000,
},
],
},
{
"defect": "Brahmasthan (central area) is blocked",
"severity": "poor",
"priority": 2,
"free": [
{
"action": "Clear all clutter, furniture, partitions from central area",
"effort": "medium",
},
],
"objects": [
{
"action": "Place a brass kalash or Vastu Purusha symbol at center",
"cost_inr": 800,
},
],
"structural": [],
},
],
"goal": "wealth",
"tier": "fast",
},
timeout=60,
)
response.raise_for_status()
data = response.json()["data"]
print(data)from astro96_api import Astro96Client
astro = Astro96Client(api_key="YOUR_API_KEY")
res = astro.ai.vastu_rank_remedies({
"remedies": [
{
"defect": "Toilet placed in NE",
"severity": "severe",
"priority": 1,
"free": [
{
"action": "Keep toilet door closed at all times",
"effort": "low",
"cost_inr": 0,
},
],
"objects": [
{
"action": "Hang a 9-rod metal wind-chime outside toilet entrance",
"effort": "low",
"cost_inr": 400,
},
],
"structural": [
{
"action": "Relocate toilet to W or NW corner",
"effort": "very high",
"cost_inr": 80000,
},
],
},
{
"defect": "Brahmasthan (central area) is blocked",
"severity": "poor",
"priority": 2,
"free": [
{
"action": "Clear all clutter, furniture, partitions from central area",
"effort": "medium",
},
],
"objects": [
{
"action": "Place a brass kalash or Vastu Purusha symbol at center",
"cost_inr": 800,
},
],
"structural": [],
},
],
"goal": "wealth",
"tier": "fast",
})
print(res.data)<?php
$ch = curl_init('https://api.96astro.com/v1/ai/vastu-rank-remedies');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'remedies' => [
[
'defect' => 'Toilet placed in NE',
'severity' => 'severe',
'priority' => 1,
'free' => [
[
'action' => 'Keep toilet door closed at all times',
'effort' => 'low',
'cost_inr' => 0,
],
],
'objects' => [
[
'action' => 'Hang a 9-rod metal wind-chime outside toilet entrance',
'effort' => 'low',
'cost_inr' => 400,
],
],
'structural' => [
[
'action' => 'Relocate toilet to W or NW corner',
'effort' => 'very high',
'cost_inr' => 80000,
],
],
],
[
'defect' => 'Brahmasthan (central area) is blocked',
'severity' => 'poor',
'priority' => 2,
'free' => [
[
'action' => 'Clear all clutter, furniture, partitions from central area',
'effort' => 'medium',
],
],
'objects' => [
[
'action' => 'Place a brass kalash or Vastu Purusha symbol at center',
'cost_inr' => 800,
],
],
'structural' => [],
],
],
'goal' => 'wealth',
'tier' => 'fast',
]),
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result['data']);package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"remedies": [
{
"defect": "Toilet placed in NE",
"severity": "severe",
"priority": 1,
"free": [
{
"action": "Keep toilet door closed at all times",
"effort": "low",
"cost_inr": 0
}
],
"objects": [
{
"action": "Hang a 9-rod metal wind-chime outside toilet entrance",
"effort": "low",
"cost_inr": 400
}
],
"structural": [
{
"action": "Relocate toilet to W or NW corner",
"effort": "very high",
"cost_inr": 80000
}
]
},
{
"defect": "Brahmasthan (central area) is blocked",
"severity": "poor",
"priority": 2,
"free": [
{
"action": "Clear all clutter, furniture, partitions from central area",
"effort": "medium"
}
],
"objects": [
{
"action": "Place a brass kalash or Vastu Purusha symbol at center",
"cost_inr": 800
}
],
"structural": []
}
],
"goal": "wealth",
"tier": "fast"
}`)
req, err := http.NewRequest("POST", "https://api.96astro.com/v1/ai/vastu-rank-remedies", body)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.Status, string(out))
}Example response (illustrative)
{
"data": {
"top3": [
{
"rank": 1,
"action": "Keep toilet door closed at all times",
"matched": true,
"addresses": "Toilet placed in NE",
"tier": "free",
"cost_inr": 0,
"effort": "low",
"timeframe": "today",
"rationale": "Free, immediate, and it contains the most severe defect first."
},
{
"rank": 2,
"action": "Clear all clutter, furniture, partitions from central area",
"matched": true,
"addresses": "Brahmasthan (central area) is blocked",
"tier": "free",
…Written by hand from the documented shape: AI readings are not captured automatically. Real text, token counts and credits differ.
Error responses
- 400invalid_request
- 401invalid_key, expired_key
- 402payment_required
- 403account_suspended
- 404not_found
- 409idempotency_conflict
- 413payload_too_large
- 422invalid_request, unsupported_language
- 429rate_limited, quota_exhausted, spend_cap_reached, project_budget_exceeded
- 500computation_failed
- 502unavailable
- 503unavailable
- 504deadline_exceeded
Errors are never charged. What each status means and what to do: errors.
AI Reading: Structured reading
POSTBeta
https://api.96astro.com/v1/ai/ai-insightAn AI-written reading of a birth chart, grounded in chart data the service computes from the birth (or in one report named in `context`); choose persona, tier and language. Optional JSON output.
- Credits
- Metered, from 15 credits
- Input
- Specific input
- Output
- JSON
- Delivery
- Direct response
- Languages
- 26 languages; translated term names with
labels
| Header | Value and description |
|---|---|
AuthorizationRequired | Bearer YOUR_API_KEYYour sandbox (sk_test_...) or live (sk_live_...) key. X-API-Key: <key> is accepted instead. |
Content-TypeRequired | application/jsonThe body is JSON. |
Idempotency-KeyOptional | <unique string>Makes retries safe: a repeated key with the same body replays the stored response and is never charged twice. (1 to 200 characters) |
| Field | Description |
|---|---|
datetimestringRequired | Local date and time, ISO 8601 without offset, e.g. 1990-10-18T14:30:00 Limits: format local-date-time, pattern ^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d{1,6})?)?$ Example: |
timezonestring | nullOptional | IANA time zone, e.g. Asia/Kolkata Default: Example: |
utc_offsetstring | nullOptional | Fixed offset such as +05:30, if no IANA zone is known Default: |
latitudenumberRequired | Limits: minimum -90, maximum 90 Example: |
longitudenumberRequired | Limits: minimum -180, maximum 180 Example: |
ayanamshastringOptional | Default: |
languagestringOptional | Output language (ISO 639-1). The values listed are the ones this capability supports; any other is refused with 422 unsupported_language. Identifiers, enum values and numbers never change with language. Default: Allowed values: enasbndeesfrguhiitjaknkomlmrnenlorpaplptrusitatetrur |
nodestringOptional | Lunar node: true (osculating) or mean. Default: Allowed values: truemean |
tierstringOptional | fast (Claude Haiku), balanced (Sonnet) or deep (Opus). Sets the price range. Default: Allowed values: fastbalanceddeep Example: |
personastringOptional | Voice of the reading: coach (plain), pandit (traditional) or analyst. Default: Allowed values: coachpanditanalyst Example: |
contextstring | nullOptional | Ground the reading in this report's data instead of the natal chart. Only the AI reading is charged, never less than the report itself. Default: Allowed values: report-careerreport-childrenreport-educationreport-foreign-travelreport-healthreport-marriagereport-politicsreport-propertyreport-relocationreport-romancereport-spiritualreport-wealthdetailed-life |
json_modebooleanOptional | Return the reading as a JSON object (data.reading) as well as text. Default: |
labelsstringOptional | Optional. Adds `meta.labels`: translated display names for the identifiers in the answer. `data` is unchanged. Free. Any other code is refused with 422 unsupported_language. Allowed values: asbndeesfrguhiitknkomlmrnenlorpaplptrusitatetrur |
| Value | Meaning |
|---|---|
coach | Persona: coach |
pandit | Persona: pandit |
analyst | Persona: analyst |
Response · fields in data
Inferred from the example response: a guide to the shape, not a contract.
mode· stringtext· stringtier· stringpersona· stringas_of· stringgrounding· object
Example request
curl -X POST https://api.96astro.com/v1/ai/ai-insight \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"persona": "coach"
}'const response = await fetch("https://api.96astro.com/v1/ai/ai-insight", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"persona": "coach"
}),
});
const { data, meta } = await response.json();
console.log(data);import { Astro96Client } from "@96astro/api";
const astro = new Astro96Client({ apiKey: "YOUR_API_KEY" });
const { data, meta } = await astro.ai.aiInsight({
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"persona": "coach"
});
console.log(data);import requests
response = requests.post(
"https://api.96astro.com/v1/ai/ai-insight",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"persona": "coach",
},
timeout=60,
)
response.raise_for_status()
data = response.json()["data"]
print(data)from astro96_api import Astro96Client
astro = Astro96Client(api_key="YOUR_API_KEY")
res = astro.ai.ai_insight({
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"persona": "coach",
})
print(res.data)<?php
$ch = curl_init('https://api.96astro.com/v1/ai/ai-insight');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'datetime' => '1990-10-18T14:30:00',
'timezone' => 'Asia/Kolkata',
'latitude' => 28.6139,
'longitude' => 77.209,
'tier' => 'fast',
'persona' => 'coach',
]),
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result['data']);package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"persona": "coach"
}`)
req, err := http.NewRequest("POST", "https://api.96astro.com/v1/ai/ai-insight", body)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.Status, string(out))
}Example response (illustrative)
{
"data": {
"mode": "insight",
"text": "You are running Jupiter Mahadasha with Mars Antardasha until January 2027. Jupiter rules your 3rd and 12th houses from a Capricorn Ascendant, so this is a period of effort, writing, travel and foreign connections. Mars as the sub-period lord adds drive to work matters: start the projects you have been planning, but avoid hasty decisions around property. Your Moon in Virgo favours careful planning; use it.",
"tier": "fast",
"persona": "coach",
"as_of": "2026-10-14",
"grounding": {
"source": "birth-chart",
"characters": 9412,
"truncated": false
}
},
"meta": {
"request_id": "req_00000000000000000000",
"api_version": "v1",
"credits_used": 0,
"warnings": [],
"language": "en",
"ai": {
…Written by hand from the documented shape: AI readings are not captured automatically. Real text, token counts and credits differ.
Error responses
- 400invalid_request
- 401invalid_key, expired_key
- 402payment_required
- 403account_suspended
- 404not_found
- 409idempotency_conflict
- 413payload_too_large
- 422invalid_request, unsupported_language
- 429rate_limited, quota_exhausted, spend_cap_reached, project_budget_exceeded
- 500computation_failed
- 502unavailable
- 503unavailable
- 504deadline_exceeded
Errors are never charged. What each status means and what to do: errors.
AI Reading: Chat answer
POSTBeta
https://api.96astro.com/v1/ai/ai-chatAn AI answer to a question about a birth chart, with earlier turns as history; grounded in chart data the service computes from the birth (or in one report named in `context`).
- Credits
- Metered, from 15 credits
- Input
- Specific input
- Output
- JSON
- Delivery
- Direct response
- Languages
- 26 languages; translated term names with
labels
| Header | Value and description |
|---|---|
AuthorizationRequired | Bearer YOUR_API_KEYYour sandbox (sk_test_...) or live (sk_live_...) key. X-API-Key: <key> is accepted instead. |
Content-TypeRequired | application/jsonThe body is JSON. |
Idempotency-KeyOptional | <unique string>Makes retries safe: a repeated key with the same body replays the stored response and is never charged twice. (1 to 200 characters) |
| Field | Description |
|---|---|
datetimestringRequired | Local date and time, ISO 8601 without offset, e.g. 1990-10-18T14:30:00 Limits: format local-date-time, pattern ^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d{1,6})?)?$ Example: |
timezonestring | nullOptional | IANA time zone, e.g. Asia/Kolkata Default: Example: |
utc_offsetstring | nullOptional | Fixed offset such as +05:30, if no IANA zone is known Default: |
latitudenumberRequired | Limits: minimum -90, maximum 90 Example: |
longitudenumberRequired | Limits: minimum -180, maximum 180 Example: |
ayanamshastringOptional | Default: |
languagestringOptional | Output language (ISO 639-1). The values listed are the ones this capability supports; any other is refused with 422 unsupported_language. Identifiers, enum values and numbers never change with language. Default: Allowed values: enasbndeesfrguhiitjaknkomlmrnenlorpaplptrusitatetrur |
nodestringOptional | Lunar node: true (osculating) or mean. Default: Allowed values: truemean |
tierstringOptional | fast (Claude Haiku), balanced (Sonnet) or deep (Opus). Sets the price range. Default: Allowed values: fastbalanceddeep Example: |
personastringOptional | Voice of the reading: coach (plain), pandit (traditional) or analyst. Default: Allowed values: coachpanditanalyst |
contextstring | nullOptional | Ground the reading in this report's data instead of the natal chart. Only the AI reading is charged, never less than the report itself. Default: Allowed values: report-careerreport-childrenreport-educationreport-foreign-travelreport-healthreport-marriagereport-politicsreport-propertyreport-relocationreport-romancereport-spiritualreport-wealthdetailed-life |
questionstringRequired | Limits: 1 to 1000 characters Example: |
historyarray of objectsOptional | Earlier turns, oldest first. Limits: at most 6 items |
history[].rolestringRequired | Allowed values: userassistant |
history[].contentstringRequired | Limits: 1 to 4000 characters |
labelsstringOptional | Optional. Adds `meta.labels`: translated display names for the identifiers in the answer. `data` is unchanged. Free. Any other code is refused with 422 unsupported_language. Allowed values: asbndeesfrguhiitknkomlmrnenlorpaplptrusitatetrur |
| Value | Meaning |
|---|---|
coach | Persona: coach |
pandit | Persona: pandit |
analyst | Persona: analyst |
Response · fields in data
Inferred from the example response: a guide to the shape, not a contract.
mode· stringquestion· stringtext· stringtier· stringpersona· stringas_of· stringgrounding· object
Example request
curl -X POST https://api.96astro.com/v1/ai/ai-chat \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"question": "When is a good time to change jobs?"
}'const response = await fetch("https://api.96astro.com/v1/ai/ai-chat", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"question": "When is a good time to change jobs?"
}),
});
const { data, meta } = await response.json();
console.log(data);import { Astro96Client } from "@96astro/api";
const astro = new Astro96Client({ apiKey: "YOUR_API_KEY" });
const { data, meta } = await astro.ai.aiChat({
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"question": "When is a good time to change jobs?"
});
console.log(data);import requests
response = requests.post(
"https://api.96astro.com/v1/ai/ai-chat",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"question": "When is a good time to change jobs?",
},
timeout=60,
)
response.raise_for_status()
data = response.json()["data"]
print(data)from astro96_api import Astro96Client
astro = Astro96Client(api_key="YOUR_API_KEY")
res = astro.ai.ai_chat({
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"question": "When is a good time to change jobs?",
})
print(res.data)<?php
$ch = curl_init('https://api.96astro.com/v1/ai/ai-chat');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'datetime' => '1990-10-18T14:30:00',
'timezone' => 'Asia/Kolkata',
'latitude' => 28.6139,
'longitude' => 77.209,
'tier' => 'fast',
'question' => 'When is a good time to change jobs?',
]),
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result['data']);package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"question": "When is a good time to change jobs?"
}`)
req, err := http.NewRequest("POST", "https://api.96astro.com/v1/ai/ai-chat", body)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.Status, string(out))
}Example response (illustrative)
{
"data": {
"mode": "chat",
"question": "When is a good time to change jobs?",
"text": "The strongest window for a job change is from January 2027, when the Mars sub-period ends and Rahu's begins within your Jupiter Mahadasha. Rahu sub-periods favour unconventional moves and new environments, which supports a change of employer. Until then, prepare: update your skills and network rather than resign.",
"tier": "fast",
"persona": "coach",
"as_of": "2026-10-14",
"grounding": {
"source": "birth-chart",
"characters": 9412,
"truncated": false
}
},
"meta": {
"request_id": "req_00000000000000000000",
"api_version": "v1",
"credits_used": 0,
"warnings": [],
"language": "en",
…Written by hand from the documented shape: AI readings are not captured automatically. Real text, token counts and credits differ.
Error responses
- 400invalid_request
- 401invalid_key, expired_key
- 402payment_required
- 403account_suspended
- 404not_found
- 409idempotency_conflict
- 413payload_too_large
- 422invalid_request, unsupported_language
- 429rate_limited, quota_exhausted, spend_cap_reached, project_budget_exceeded
- 500computation_failed
- 502unavailable
- 503unavailable
- 504deadline_exceeded
Errors are never charged. What each status means and what to do: errors.
AI Reading: Custom lens
POSTBeta
https://api.96astro.com/v1/ai/ai-lensAn AI-written reading of a birth chart through one lens (career, marriage, wealth, health, spiritual or year ahead), grounded in chart data the service computes from the birth.
- Credits
- Metered, from 15 credits
- Input
- Specific input
- Output
- JSON
- Delivery
- Direct response
- Languages
- 26 languages; translated term names with
labels
| Header | Value and description |
|---|---|
AuthorizationRequired | Bearer YOUR_API_KEYYour sandbox (sk_test_...) or live (sk_live_...) key. X-API-Key: <key> is accepted instead. |
Content-TypeRequired | application/jsonThe body is JSON. |
Idempotency-KeyOptional | <unique string>Makes retries safe: a repeated key with the same body replays the stored response and is never charged twice. (1 to 200 characters) |
| Field | Description |
|---|---|
datetimestringRequired | Local date and time, ISO 8601 without offset, e.g. 1990-10-18T14:30:00 Limits: format local-date-time, pattern ^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d{1,6})?)?$ Example: |
timezonestring | nullOptional | IANA time zone, e.g. Asia/Kolkata Default: Example: |
utc_offsetstring | nullOptional | Fixed offset such as +05:30, if no IANA zone is known Default: |
latitudenumberRequired | Limits: minimum -90, maximum 90 Example: |
longitudenumberRequired | Limits: minimum -180, maximum 180 Example: |
ayanamshastringOptional | Default: |
languagestringOptional | Output language (ISO 639-1). The values listed are the ones this capability supports; any other is refused with 422 unsupported_language. Identifiers, enum values and numbers never change with language. Default: Allowed values: enasbndeesfrguhiitjaknkomlmrnenlorpaplptrusitatetrur |
nodestringOptional | Lunar node: true (osculating) or mean. Default: Allowed values: truemean |
tierstringOptional | fast (Claude Haiku), balanced (Sonnet) or deep (Opus). Sets the price range. Default: Allowed values: fastbalanceddeep Example: |
personastringOptional | Voice of the reading: coach (plain), pandit (traditional) or analyst. Default: Allowed values: coachpanditanalyst |
contextstring | nullOptional | Ground the reading in this report's data instead of the natal chart. Only the AI reading is charged, never less than the report itself. Default: Allowed values: report-careerreport-childrenreport-educationreport-foreign-travelreport-healthreport-marriagereport-politicsreport-propertyreport-relocationreport-romancereport-spiritualreport-wealthdetailed-life |
lensstringRequired | The focus of the reading. Allowed values: careermarriagewealthhealthspiritualyear_ahead Example: |
labelsstringOptional | Optional. Adds `meta.labels`: translated display names for the identifiers in the answer. `data` is unchanged. Free. Any other code is refused with 422 unsupported_language. Allowed values: asbndeesfrguhiitknkomlmrnenlorpaplptrusitatetrur |
| Value | Meaning |
|---|---|
coach | Persona: coach |
pandit | Persona: pandit |
analyst | Persona: analyst |
Response · fields in data
Inferred from the example response: a guide to the shape, not a contract.
mode· stringlens· stringtext· stringtier· stringpersona· stringas_of· stringgrounding· object
Example request
curl -X POST https://api.96astro.com/v1/ai/ai-lens \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"lens": "career"
}'const response = await fetch("https://api.96astro.com/v1/ai/ai-lens", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"lens": "career"
}),
});
const { data, meta } = await response.json();
console.log(data);import { Astro96Client } from "@96astro/api";
const astro = new Astro96Client({ apiKey: "YOUR_API_KEY" });
const { data, meta } = await astro.ai.aiLens({
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"lens": "career"
});
console.log(data);import requests
response = requests.post(
"https://api.96astro.com/v1/ai/ai-lens",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"lens": "career",
},
timeout=60,
)
response.raise_for_status()
data = response.json()["data"]
print(data)from astro96_api import Astro96Client
astro = Astro96Client(api_key="YOUR_API_KEY")
res = astro.ai.ai_lens({
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"lens": "career",
})
print(res.data)<?php
$ch = curl_init('https://api.96astro.com/v1/ai/ai-lens');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'datetime' => '1990-10-18T14:30:00',
'timezone' => 'Asia/Kolkata',
'latitude' => 28.6139,
'longitude' => 77.209,
'tier' => 'fast',
'lens' => 'career',
]),
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result['data']);package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"lens": "career"
}`)
req, err := http.NewRequest("POST", "https://api.96astro.com/v1/ai/ai-lens", body)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.Status, string(out))
}Example response (illustrative)
{
"data": {
"mode": "lens",
"lens": "career",
"text": "Career: your 10th house is ruled by Venus, which favours work involving design, finance or people. Saturn, your Ascendant lord, gives persistence and rewards long-term roles. In the D10 the 10th lord is well placed. The best timing windows in the current dasha sequence are mid-2027 to 2029.",
"tier": "fast",
"persona": "coach",
"as_of": "2026-10-14",
"grounding": {
"source": "birth-chart",
"characters": 9412,
"truncated": false
}
},
"meta": {
"request_id": "req_00000000000000000000",
"api_version": "v1",
"credits_used": 0,
"warnings": [],
"language": "en",
…Written by hand from the documented shape: AI readings are not captured automatically. Real text, token counts and credits differ.
Error responses
- 400invalid_request
- 401invalid_key, expired_key
- 402payment_required
- 403account_suspended
- 404not_found
- 409idempotency_conflict
- 413payload_too_large
- 422invalid_request, unsupported_language
- 429rate_limited, quota_exhausted, spend_cap_reached, project_budget_exceeded
- 500computation_failed
- 502unavailable
- 503unavailable
- 504deadline_exceeded
Errors are never charged. What each status means and what to do: errors.
AI Reading: General question
POSTBeta
https://api.96astro.com/v1/ai/ai-generalAn AI answer to a general astrology question, grounded in chart data the service computes from the birth (or in one report named in `context`); choose persona, tier and language.
- Credits
- Metered, from 15 credits
- Input
- Specific input
- Output
- JSON
- Delivery
- Direct response
- Languages
- 26 languages; translated term names with
labels
| Header | Value and description |
|---|---|
AuthorizationRequired | Bearer YOUR_API_KEYYour sandbox (sk_test_...) or live (sk_live_...) key. X-API-Key: <key> is accepted instead. |
Content-TypeRequired | application/jsonThe body is JSON. |
Idempotency-KeyOptional | <unique string>Makes retries safe: a repeated key with the same body replays the stored response and is never charged twice. (1 to 200 characters) |
| Field | Description |
|---|---|
datetimestringRequired | Local date and time, ISO 8601 without offset, e.g. 1990-10-18T14:30:00 Limits: format local-date-time, pattern ^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d{1,6})?)?$ Example: |
timezonestring | nullOptional | IANA time zone, e.g. Asia/Kolkata Default: Example: |
utc_offsetstring | nullOptional | Fixed offset such as +05:30, if no IANA zone is known Default: |
latitudenumberRequired | Limits: minimum -90, maximum 90 Example: |
longitudenumberRequired | Limits: minimum -180, maximum 180 Example: |
ayanamshastringOptional | Default: |
languagestringOptional | Output language (ISO 639-1). The values listed are the ones this capability supports; any other is refused with 422 unsupported_language. Identifiers, enum values and numbers never change with language. Default: Allowed values: enasbndeesfrguhiitjaknkomlmrnenlorpaplptrusitatetrur |
nodestringOptional | Lunar node: true (osculating) or mean. Default: Allowed values: truemean |
tierstringOptional | fast (Claude Haiku), balanced (Sonnet) or deep (Opus). Sets the price range. Default: Allowed values: fastbalanceddeep Example: |
personastringOptional | Voice of the reading: coach (plain), pandit (traditional) or analyst. Default: Allowed values: coachpanditanalyst |
contextstring | nullOptional | Ground the reading in this report's data instead of the natal chart. Only the AI reading is charged, never less than the report itself. Default: Allowed values: report-careerreport-childrenreport-educationreport-foreign-travelreport-healthreport-marriagereport-politicsreport-propertyreport-relocationreport-romancereport-spiritualreport-wealthdetailed-life |
questionstringRequired | Limits: 1 to 1000 characters Example: |
labelsstringOptional | Optional. Adds `meta.labels`: translated display names for the identifiers in the answer. `data` is unchanged. Free. Any other code is refused with 422 unsupported_language. Allowed values: asbndeesfrguhiitknkomlmrnenlorpaplptrusitatetrur |
| Value | Meaning |
|---|---|
coach | Persona: coach |
pandit | Persona: pandit |
analyst | Persona: analyst |
Response · fields in data
Inferred from the example response: a guide to the shape, not a contract.
mode· stringquestion· stringtext· stringtier· stringpersona· stringas_of· stringgrounding· object
Example request
curl -X POST https://api.96astro.com/v1/ai/ai-general \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"question": "What does my Moon sign say about me?"
}'const response = await fetch("https://api.96astro.com/v1/ai/ai-general", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"question": "What does my Moon sign say about me?"
}),
});
const { data, meta } = await response.json();
console.log(data);import { Astro96Client } from "@96astro/api";
const astro = new Astro96Client({ apiKey: "YOUR_API_KEY" });
const { data, meta } = await astro.ai.aiGeneral({
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"question": "What does my Moon sign say about me?"
});
console.log(data);import requests
response = requests.post(
"https://api.96astro.com/v1/ai/ai-general",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"question": "What does my Moon sign say about me?",
},
timeout=60,
)
response.raise_for_status()
data = response.json()["data"]
print(data)from astro96_api import Astro96Client
astro = Astro96Client(api_key="YOUR_API_KEY")
res = astro.ai.ai_general({
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"question": "What does my Moon sign say about me?",
})
print(res.data)<?php
$ch = curl_init('https://api.96astro.com/v1/ai/ai-general');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'datetime' => '1990-10-18T14:30:00',
'timezone' => 'Asia/Kolkata',
'latitude' => 28.6139,
'longitude' => 77.209,
'tier' => 'fast',
'question' => 'What does my Moon sign say about me?',
]),
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result['data']);package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"question": "What does my Moon sign say about me?"
}`)
req, err := http.NewRequest("POST", "https://api.96astro.com/v1/ai/ai-general", body)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.Status, string(out))
}Example response (illustrative)
{
"data": {
"mode": "general",
"question": "What does my Moon sign say about me?",
"text": "Your Moon is in Virgo in Chitra nakshatra. Virgo Moons are observant, practical and detail-minded; you feel settled when things are in order and you show care through useful help. Chitra adds an eye for craft and beauty. Watch a tendency to over-analyse your feelings.",
"tier": "fast",
"persona": "coach",
"as_of": "2026-10-14",
"grounding": {
"source": "birth-chart",
"characters": 9412,
"truncated": false
}
},
"meta": {
"request_id": "req_00000000000000000000",
"api_version": "v1",
"credits_used": 0,
"warnings": [],
"language": "en",
…Written by hand from the documented shape: AI readings are not captured automatically. Real text, token counts and credits differ.
Error responses
- 400invalid_request
- 401invalid_key, expired_key
- 402payment_required
- 403account_suspended
- 404not_found
- 409idempotency_conflict
- 413payload_too_large
- 422invalid_request, unsupported_language
- 429rate_limited, quota_exhausted, spend_cap_reached, project_budget_exceeded
- 500computation_failed
- 502unavailable
- 503unavailable
- 504deadline_exceeded
Errors are never charged. What each status means and what to do: errors.
AI Relocation Answer
POSTBeta
https://api.96astro.com/v1/ai/location-ai-analysisAn AI-written answer to a relocation question, grounded in the cities the service ranks for the birth (and KP analysis of the top ones); returns the answer and the ranked cities.
- Credits
- Metered, from 15 credits
- Input
- Birth details
- Output
- JSON
- Delivery
- Direct response
- Languages
- English; translated term names with
labels
| Header | Value and description |
|---|---|
AuthorizationRequired | Bearer YOUR_API_KEYYour sandbox (sk_test_...) or live (sk_live_...) key. X-API-Key: <key> is accepted instead. |
Content-TypeRequired | application/jsonThe body is JSON. |
Idempotency-KeyOptional | <unique string>Makes retries safe: a repeated key with the same body replays the stored response and is never charged twice. (1 to 200 characters) |
| Field | Description |
|---|---|
datetimestringRequired | Local date and time, ISO 8601 without offset, e.g. 1990-10-18T14:30:00 Limits: format local-date-time, pattern ^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d{1,6})?)?$ Example: |
timezonestring | nullOptional | IANA time zone, e.g. Asia/Kolkata Default: Example: |
utc_offsetstring | nullOptional | Fixed offset such as +05:30, if no IANA zone is known Default: |
latitudenumberRequired | Limits: minimum -90, maximum 90 Example: |
longitudenumberRequired | Limits: minimum -180, maximum 180 Example: |
ayanamshastringOptional | This capability is computed with Lahiri only. Default: Allowed value: lahiri |
languagestringOptional | Output language (ISO 639-1). The values listed are the ones this capability supports; any other is refused with 422 unsupported_language. Identifiers, enum values and numbers never change with language. Default: Allowed value: en |
questionstringRequired | Limits: 1 to 1000 characters Example: |
tierstringOptional | fast, balanced or deep. Sets the price range. Default: Allowed values: fastbalanceddeep Example: |
goalstring | nullOptional | Life goal to rank places for. Inferred from the question when omitted. Default: Allowed values: careermarriagewealthspiritualhealtheducationpeacechildrenpropertyromancefameforeigntravelpoliticsartsbusiness |
regionstringOptional | Limit the catalogue to one region. Default: Allowed values: worldasiaeuropeamericasafricaoceania |
as_ofstring | nullOptional | Date whose running dasha is used (YYYY-MM-DD). Today in UTC when omitted. Default: Limits: format date |
limitintegerOptional | How many ranked places ground the answer. Default: Limits: minimum 1, maximum 10 |
kp_citiesintegerOptional | How many of the top places get a full KP analysis. Default: Limits: minimum 0, maximum 3 |
labelsstringOptional | Optional. Adds `meta.labels`: translated display names for the identifiers in the answer. `data` is unchanged. Free. Any other code is refused with 422 unsupported_language. Allowed values: asbndeesfrguhiitknkomlmrnenlorpaplptrusitatetrur |
| Value | Meaning |
|---|---|
fast | Tier: fast |
balanced | Tier: balanced |
deep | Tier: deep |
Response · fields in data
Inferred from the example response: a guide to the shape, not a contract.
question· stringgoal· stringgoal_inferred· booleanregion· stringas_of· stringanswer· stringrunning· objectformula· array of objectkp_cities_analysed· integercities· array of object
Example request
curl -X POST https://api.96astro.com/v1/ai/location-ai-analysis \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"question": "Where should I move for my career?"
}'const response = await fetch("https://api.96astro.com/v1/ai/location-ai-analysis", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"question": "Where should I move for my career?"
}),
});
const { data, meta } = await response.json();
console.log(data);import { Astro96Client } from "@96astro/api";
const astro = new Astro96Client({ apiKey: "YOUR_API_KEY" });
const { data, meta } = await astro.ai.locationAiAnalysis({
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"question": "Where should I move for my career?"
});
console.log(data);import requests
response = requests.post(
"https://api.96astro.com/v1/ai/location-ai-analysis",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"question": "Where should I move for my career?",
},
timeout=60,
)
response.raise_for_status()
data = response.json()["data"]
print(data)from astro96_api import Astro96Client
astro = Astro96Client(api_key="YOUR_API_KEY")
res = astro.ai.location_ai_analysis({
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"question": "Where should I move for my career?",
})
print(res.data)<?php
$ch = curl_init('https://api.96astro.com/v1/ai/location-ai-analysis');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'datetime' => '1990-10-18T14:30:00',
'timezone' => 'Asia/Kolkata',
'latitude' => 28.6139,
'longitude' => 77.209,
'tier' => 'fast',
'question' => 'Where should I move for my career?',
]),
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result['data']);package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
"tier": "fast",
"question": "Where should I move for my career?"
}`)
req, err := http.NewRequest("POST", "https://api.96astro.com/v1/ai/location-ai-analysis", body)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.Status, string(out))
}Example response (illustrative)
{
"data": {
"question": "Where should I move for my career?",
"goal": "career",
"goal_inferred": true,
"region": "world",
"as_of": "2026-10-14",
"answer": "For career, Seoul ranks first: it puts your career houses on strong angles, and your running Jupiter-Mars period favours a move made for work. The next places on the list are close behind; compare their reasons before deciding.",
"running": {
"vimshottari": {
"mahadasha": "Jupiter",
"antardasha": "Mars",
"mahadasha_end": "2029-05-30",
"antardasha_end": "2027-01-04"
},
"char": {
"sign": "Leo",
"lord": "Sun",
"end": "2031-10-18"
},
…Written by hand from the documented shape: AI readings are not captured automatically. Real text, token counts and credits differ.
Error responses
- 400invalid_request
- 401invalid_key, expired_key
- 402payment_required
- 403account_suspended
- 404not_found
- 409idempotency_conflict
- 413payload_too_large
- 422invalid_request, unsupported_language
- 429rate_limited, quota_exhausted, spend_cap_reached, project_budget_exceeded
- 500computation_failed
- 502unavailable
- 503unavailable
- 504deadline_exceeded
Errors are never charged. What each status means and what to do: errors.