EndpointPOST https://starsapi.com/api/v3/western/natal/chart-image GET https://starsapi.com/api/v3/western/natal/chart-image?key=...&expires=...&token=...
Overview
Returns a direct PNG image of the natal wheel chart (not JSON). Two access modes:
POST — send birth data + API key, receive PNG directly. Good for server-side generation.
GET — use a signed URL from natal/chart. No API key needed. Good for embedding in <img> tags and sharing.
Image specs: 1100×1100 pixels, PNG RGBA, typically 250–300 KB. Shows zodiac wheel with house cusps, planet glyphs, degree markers, and color-coded aspect lines.
Authentication
Mode
Authentication
POST
API key via X-Api-Key header or request body.
GET
HMAC-signed URL parameters (key, expires, token). No API key needed.
POST mode (direct)
Send birth data as JSON, receive PNG:
Field
Type
Required
Description
year
integer
Yes
Birth year (1800–2400).
month
integer
Yes
Birth month (1–12).
day
integer
Yes
Birth day.
hour
integer
Yes
Birth hour (0–23).
minute
integer
Yes
Birth minute (0–59).
second
integer
No
Default 0.
latitude
number
Yes
Decimal degrees (−90 to 90).
longitude
number
Yes
Decimal degrees (−180 to 180).
timezone
string
Yes
IANA timezone.
house_system
string
No
Default placidus.
show_aspects
boolean
No
Draw aspect lines on chart. Default true.
major_aspects_only
boolean
No
Only draw major aspect lines. Default true.
name
string
No
Native’s name (top-left corner).
place
string
No
Birth place (separate line below date/time).
branding
string
No
Attribution line below birth info.
center_text
string
No
Chart center text. Empty string = no center text.
birth_info
string
No
Custom birth info line. If omitted, auto-generated as May 20, 1990, 14:30 IST.
birth_place
string
No
Explicit place line. Falls back to place if not set.
Unix timestamp when the URL expires (24 hours from generation).
token
HMAC-SHA256 signature.
The GET mode uses cached chart data and branding from the original natal/chart call. The branding options you sent when generating the signed URL are baked into the cache.
Branding
See natal/chart branding options for the full layout. Same options apply in POST mode. In GET mode, branding is taken from the cached data.
Caching
Generated PNGs are cached on disk for 24 hours. The X-Cache response header indicates HIT (served from cache) or MISS (freshly rendered). Cache keys include birth data and branding options, so the same birth data with different branding produces separate cached images.
Errors
Errors are returned as JSON (not PNG) with appropriate HTTP status codes:
HTTP
Code
Cause
400
MISSING_FIELD
Required field absent (POST mode).
400
INVALID_JSON
Request body is not valid JSON.
400
VALIDATION_ERROR
Missing signed URL parameters (GET mode).
403
TOKEN_EXPIRED
Signed URL has expired (GET mode).
403
INVALID_TOKEN
HMAC signature mismatch (GET mode).
404
CACHE_MISS
Chart data not in cache — regenerate via natal/chart.
500
EPHEMERIS_ERROR
Swiss Ephemeris computation failed.
500
CHART_ERROR
Image generation failed.
See also
Natal Chart — get a signed URL (recommended for client-side apps)