Solar Return Chart Image
POST https://starsapi.com/api/v3/western/forecasting/solar-return-chart-image
Overview
Renders a solar return chart wheel as a 1100×1100 PNG image. Computes the exact SR moment (Sun returning to natal longitude in the requested year), calculates all positions and aspects, and returns a signed URL to the rendered chart. The signed URL is valid for 24 hours and can be embedded in a UI or downloaded.
For the raw SR data (positions, houses, aspects, angles) without the rendered image, use forecasting/solar-return. For SR with text interpretations, use predictions/solar-return.
Authentication
| Method | Example |
|---|---|
| Header (recommended) | X-Api-Key: sa_live_xxxxxxxxxxxx |
| Bearer | Authorization: Bearer sa_live_xxxxxxxxxxxx |
Auth is required only for the POST request. The returned chart_url is pre-signed with HMAC and does not require an API key when fetched.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
year – minute | integer | Yes | Standard birth data fields. |
latitude, longitude | number | Yes | Birth location (signed decimal degrees). |
timezone | string | Yes | IANA timezone (e.g. Asia/Kolkata). |
return_year | integer | Yes | Year to calculate the solar return for. Range: 1800–2400. |
house_system | string | No | Default placidus. Supports koch, whole_sign, equal, and 19 more. |
return_latitude | number | No | Relocation latitude. Default: birth latitude. |
return_longitude | number | No | Relocation longitude. Default: birth longitude. |
return_timezone | string | No | Relocation IANA timezone. Default: birth timezone. |
name | string | No | Native's name (used in chart footer if branding is enabled). |
center_text | string | No | Text rendered in the center of the wheel. Default: SR {year}. |
branding | object | No | Optional footer branding: { "name": "...", "url": "..." }. |
Relocation
Solar return charts are highly location-sensitive — the house cusps and rendered wheel change based on where the native is at the moment of the return. Pass return_latitude, return_longitude, and return_timezone to render the SR wheel for a different location (e.g. the native has relocated).
The return_location block in the response echoes back the coordinates and timezone actually used.
Response shape
The response envelope follows the standard v3 shape (status, success, data, meta). The data.chart object contains:
| Field | Description |
|---|---|
code | Chart code: SR. |
name | Display name (e.g. Solar Return 2026). |
significance | Short human-readable description of what this chart represents. |
return_year | Year requested. |
solar_return_moment | Exact UTC timestamp, datetime, and Julian day of the solar return. |
return_location | Location used for the SR chart (birth or relocation). |
ascendant | SR ascendant with longitude, sign, degree, and DMS string. |
chart_url | Signed URL to the rendered PNG. Valid for 24 hours. Embed directly in <img src> or fetch as binary. |
meta.house_system confirms the system used and meta.cache indicates cache HIT or MISS.
Fetching the image
The chart_url is a pre-signed URL of the form:
https://starsapi.com/api/v3/western/forecasting/solar-return-chart-image?key=<cacheKey>&expires=<unix>&token=<hmac>
Fetch it with a plain GET (no auth headers required). The response is an image/png with dimensions 1100×1100. Typical size: 250–280 KB.
Since the URL is signed with an expiry, do not store it long-term. Store the birth details and re-request the endpoint when you need the image again — the response will be a fast cache HIT if the same inputs were used recently.
Caching
Chart images are cached on disk for 24 hours, keyed by the full input set (birth data, return year, return location, house system). Identical requests return meta.cache: "HIT" with response times of ~3–5 ms; fresh computations show MISS with ~50–70 ms compute time.
Coordinates are rounded to 4 decimal places before hashing to avoid cache misses from floating-point drift (e.g. 77.2090 vs 77.209 hit the same cache entry).
Errors
| HTTP | Code | Cause |
|---|---|---|
| 400 | MISSING_FIELD | Required field absent (including return_year). |
| 400 | INVALID_RETURN_YEAR | return_year outside 1800–2400. |
| 400 | INVALID_TIMEZONE | return_timezone is not a valid IANA identifier. |
| 400 | INVALID_COORDINATES | return_latitude or return_longitude out of range. |
| 401 | INVALID_SIGNATURE | Signed URL token invalid or tampered with. Re-request via POST. |
| 410 | URL_EXPIRED | Signed URL past its 24-hour expiry. Re-request via POST. |
| 500 | COMPUTE_ERROR | Solar return moment not found. |
| 500 | RENDER_ERROR | Wheel rendering failed. |
See also
- Solar Return — raw data version (positions, houses, aspects)
- Solar Return Predictions — SR with text interpretations
- Progressions
- Transits