Natal Chart
POST https://starsapi.com/api/v3/western/natal/chart
Overview
Computes the natal chart and returns a signed URL to a PNG wheel chart image. The URL is valid for 24 hours and can be embedded in <img> tags, shared with users, or opened directly in a browser. No API key is needed to load the image URL itself — it’s protected by HMAC signature.
This endpoint does not return planet positions, aspects, or house cusps in the response body. Use planets, aspects, and houses for data. This endpoint is purely for the chart image.
The chart image can be customized with branding: native’s name, birth info, place (on separate line), and a branding/attribution line in the top-left corner, plus optional center text replacing the default watermark.
Authentication
| Method | Example |
|---|---|
| Header (recommended) | X-Api-Key: am_live_xxxxxxxxxxxx |
| Bearer | Authorization: Bearer am_live_xxxxxxxxxxxx |
| Query | ?api_key=am_live_xxxxxxxxxxxx |
Request body
| 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. See house systems. |
node_type | string | No | true, mean, or both. Default true. |
include_minor_aspects | boolean | No | Show minor aspects on the chart. Default true. |
name | string | No | Native’s name. Displayed in chart top-left corner. |
place | string | No | Birth place. Displayed on a separate line below date/time. |
branding | string | No | Attribution line (e.g. "Powered by MyApp.com"). Displayed below birth info. |
center_text | string | No | Text to display in chart center. Replaces default watermark. Send empty string for no center text. |
Branding options
The chart image renders an optional information block in the top-left corner:
Priya ← name (bold, 26px) May 20, 1990, 14:30 IST ← auto-generated from birth data (20px) New Delhi ← place on separate line (18px) Powered by MyAstroApp.com ← branding attribution (18px, lighter)
Auto-generated birth info: if you send name and/or place but no explicit birth_info, the chart auto-formats the date/time line as May 20, 1990, 14:30 IST using the timezone abbreviation from the birth data. DST is correctly resolved.
If no branding fields are sent, the chart renders clean with no corner text and no center watermark.
Response shape
data.chart_url
Signed HTTPS URL to the PNG chart image. Valid for 24 hours. The URL uses HMAC-SHA256 authentication — no API key needed to load the image. Suitable for embedding in <img> tags, sharing via links, or downloading.
Image specs: 1100×1100 PNG, RGBA, typically 250–300 KB. Aspect lines color-coded by type (red = challenging, green = harmonious, etc.).
Errors
| HTTP | Code | Cause |
|---|---|---|
| 400 | MISSING_FIELD | A required field is absent. |
| 400 | INVALID_DATE | Invalid calendar date or year outside range. |
| 400 | INVALID_TIME | Hour/minute/second outside valid range. |
| 400 | INVALID_TIMEZONE | Not a valid IANA identifier. |
| 400 | INVALID_COORDINATE | Latitude or longitude out of range. |
| 400 | INVALID_PARAM | Invalid house_system. |
| 500 | EPHEMERIS_ERROR | Swiss Ephemeris computation failed. |
See also
- Chart Image — direct PNG rendering (POST with api_key or GET with signed URL)
- Planets — positional data for chart analysis
- Aspects — aspect data