Skip to main content

Generate Kundali chart SVG

Generate Vedic astrological chart SVGs. Returns North Indian and South Indian style charts for both Lagna (D1) and Navamsa (D9), as SVG strings. Each planet shows abbreviation, degree°minutes', and superscripts for Vakri (ᴿ), Asta (ᶜ), and Vargottama (ᵛ). Returns North Indian (Uttar Bharatiya) and South Indian (Dakshina Bharatiya) Kundali charts as inline SVG. Also returns Navamsa (D9) chart. The response contains SVG strings for each chart style. To render them: 1. In browser: create an HTML file, paste the SVG string directly into the body tag. 2. In React/Vue/Angular: use dangerouslySetInnerHTML or v-html to render the SVG string. 3. To preview instantly: copy the lagna_north value and paste into https://svgviewer.dev Chart styles returned: - lagna_north: North Indian style (diamond layout) - lagna_south: South Indian style (square grid layout) - navamsa_north: D9 Navamsa chart North Indian style - navamsa_south: D9 Navamsa chart South Indian style - legend: R=Vakri(Retrograde) C=Asta(Combust) V=Vargottama

Endpoint

POST /v1/astro/chart

Request parameters

FieldTypeRequiredDescription
locationstring | nullNoCity name to resolve to lat/lon/tz automatically. Example: 'Mumbai' or 'New Delhi, India'. If provided, latitude, longitude and timezone are not required.
namestringNoPerson name associated with the birth record
datestringYesBirth date in YYYY-MM-DD format
timestring | nullNoBirth time in HH:MM 24-hour format. If omitted, sunrise chart is used as fallback.
latitudenumber | nullNoLatitude. Required if location not provided.
longitudenumber | nullNoLongitude. Required if location not provided.
timezonestring | nullNoIANA timezone. Required if location not provided.
ayanamsastringNoSidereal ayanamsa mode used in calculations

Example request

curl -X POST "https://api.asterwise.com/v1/astro/chart" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"date":"1985-11-12","time":"06:45","latitude":19.076,"longitude":72.8777,"timezone":"Asia/Kolkata"}'

Example response

{
"success": true,
"message": "success",
"data": {
"lagna_north": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"500\" height=\"560\" viewBox=\"0 0 500 560\"><rect x=\"0\" y=\"0\" width=\"500\" hei…",
"lagna_south": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"500\" height=\"560\" viewBox=\"0 0 500 560\"><rect x=\"0\" y=\"0\" width=\"500\" hei…",
"navamsa_north": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"500\" height=\"560\" viewBox=\"0 0 500 560\"><rect x=\"0\" y=\"0\" width=\"500\" hei…",
"navamsa_south": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"500\" height=\"560\" viewBox=\"0 0 500 560\"><rect x=\"0\" y=\"0\" width=\"500\" hei…",
"legend": "R = Vakri (Retrograde) C = Asta (Combust) V = Vargottama"
}
}

Response fields

FieldTypeDescription
successbooleanTrue if the request succeeded
messagestringHuman-readable status message
dataobject
data.lagna_northstringNorth Indian Lagna chart SVG string
data.lagna_southstringSouth Indian Lagna chart SVG string
data.navamsa_northstringNorth Indian Navamsa (D9) chart SVG string
data.navamsa_southstringSouth Indian Navamsa (D9) chart SVG string
data.legendstring | nullSuperscript legend explaining chart markers

Errors

CodeDescriptionReference
authentication_failedMissing or invalid API key.authentication_failed
ephemeris_unavailableUpstream ephemeris service error.ephemeris_unavailable
insufficient_tierAPI key tier does not include this endpoint.insufficient_tier
internal_errorUnexpected server error.internal_error
ip_rate_limit_exceededToo many requests in a short window.ip_rate_limit_exceeded
payload_too_largeRequest body exceeds the size limit.payload_too_large
resource_not_foundReferenced resource was not found.resource_not_found
validation_errorRequest body failed schema validation.validation_error