Render BaZi Chart (SVG/PNG)
Render the Four Pillars (八字 BaZi) as a finished chart image — the same computation as POST /chinese/bazi, drawn.
Returns the four pillars, the Day Master, the Five-Element (五行 Wu Xing) balance and the Yong Shen (用神, favourable element) as a single self-contained SVG, a base64 PNG, or a bare SVG blob — no client-side charting required.
Output — select with visual_config.format:
- svg (default): JSON envelope with the SVG string in visual.data.
- png: JSON envelope with base64 PNG in visual.data.
- svg-raw: a bare image/svg+xml body, no JSON envelope. Convenient for <img src>, but it carries no calculation_metadata, so the convention echo is unavailable in this mode.
Conventions: accepts the same five convention fields as POST /chinese/bazi (solar-term boundary, hour-pillar rule, zone handling), and echoes what was used in calculation_metadata.
Metering: 3 units per call — 1 for the pillar computation plus 2 for the visual render. credits_used reports the total actually charged.
Request
- Base URL: https://api.openephemeris.com
- URL: https://api.openephemeris.com/chinese/bazi/chart
- Auth: one of:
- HTTP bearer
- API key in header X-OpenEphemeris-API-Key
- API key in header X-API-Key
- API key in header X-Service-Key
Headers
Request body
Example request
{
"latitude": 31.2304,
"longitude": 121.4737,
"minute": 30,
"timezone": {
"iana_name": "America/New_York"
}
}Response
Rendered BaZi chart. svg and png return the JSON envelope; svg-raw returns a bare SVG document.
Changes
No recorded changes to this operation across all 1 revision of this API.