POST · VEDIC

Chart Image

Endpoint POST https://starsapi.com/api/v3/vedic/natal/chart-image

Returns signed, time-limited image URLs for the D1 (Rashi) birth chart in both North Indian and South Indian styles. The URLs point to rendered chart images that can be embedded directly in an <img> tag or downloaded. Each URL includes a secure token and expiry — no additional authentication is needed to fetch the image.

This is a convenience endpoint for apps that need a visual chart without client-side rendering. For the underlying planet and house data, call /natal/planets or /natal/planets-in-houses.

Authentication

Required. Three methods accepted:

MethodExample
Header (recommended)X-Api-Key: am_live_xxxxxxxxxxxx
BearerAuthorization: Bearer am_live_xxxxxxxxxxxx
Query?api_key=am_live_xxxxxxxxxxxx

See authentication for security considerations.

Request body

Send a JSON object with Content-Type: application/json. All core fields are required.

FieldTypeRequiredDescription
yearintegerYesBirth year, 4-digit (e.g. 1990).
monthintegerYesBirth month, 112.
dayintegerYesDay of month, 131.
hourintegerYesHour in 24-hour local clock time, 023.
minuteintegerYesMinute, 059.
secondintegerNoSecond, 059. Default 0.
latitudenumberYesSigned decimal degrees, −90…90. Positive = North.
longitudenumberYesSigned decimal degrees, −180…180. Positive = East.
timezonestringYesIANA timezone identifier.
namestringNoUse /vedic/birth-details to retrieve.
placestringNoUse /vedic/birth-details to retrieve.
ayanamsastringNoDefault lahiri. Full list →
node_typestringNomean (default) or true.

Response shape

A single data.chart object with chart metadata and two signed image URLs.

FieldTypeDescription
data.chart
codestringDivisional chart code (always D1 for this endpoint).
namestringChart name (always Rashi).
data.chart.images
northstring (URL)Signed URL for the North Indian style chart image. Token-authenticated, time-limited.
southstring (URL)Signed URL for the South Indian style chart image. Token-authenticated, time-limited.
Image URLs are time-limited. Each URL contains an expires timestamp and a token. The image can be fetched directly (no API key needed) but will return 403 after expiry. Generate fresh URLs by calling this endpoint again.

Use cases

  • Instant chart display — embed the URL in an <img> tag for immediate chart rendering without any client-side drawing.
  • PDF reports — download the image and insert it into generated kundli reports.
  • Chat/messaging — send the chart image URL directly in WhatsApp, Telegram, or in-app chat.
  • North vs South preference — let users choose their regional chart style — both are always returned.

Errors

HTTPCodeCause
400MISSING_FIELDA required birth field is absent.
400INVALID_DATEInvalid calendar date.
400INVALID_TIMEHour/minute/second out of range.
400INVALID_TIMEZONENumeric or non-IANA timezone.
400INVALID_COORDINATElatitude / longitude out of range.
401AUTH_MISSING_KEYNo API key in request.
401AUTH_INVALID_KEYKey format invalid or not found.
401AUTH_REVOKED_KEYKey has been revoked.
403AUTH_ORIGIN_DENIEDRequest from non-whitelisted origin.
405METHOD_NOT_ALLOWEDNon-POST request.
429RATE_LIMIT_EXCEEDEDPlan quota exceeded.
500CALCULATION_ERROREphemeris calculation failed.

Error response format

{
  "success": false,
  "error": {
    "code": "INVALID_TIMEZONE",
    "message": "Unrecognised timezone: 'Asia/Calcutta_'. Use a valid IANA identifier such as 'Asia/Kolkata'."
  }
}

See also