Send a birthdate, get clean JSON back — Four Pillars, Five Elements, Day Master, Ten Gods, Yongshin, and a 0–100 compatibility score. One engine for Korean Saju (사주) and Chinese BaZi (八字). Free tier, no credit card.
Building a product? See OEM / white-label plans → for dating, wellness & AI apps.
# POST a solar birthdate → Four Pillars JSON
curl -X POST https://saju-api.pages.dev/api/v1/calculate \
-H "X-API-Key: sajuapi_free_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "year":1990, "month":5, "day":15,
"hour":14, "gender":"M", "lang":"en" }'
const res = await fetch("https://saju-api.pages.dev/api/v1/calculate", {
method: "POST",
headers: { "X-API-Key": "sajuapi_free_YOUR_KEY",
"Content-Type": "application/json" },
body: JSON.stringify({ year:1990, month:5, day:15,
hour:14, gender:"M", lang:"en" }),
});
const data = await res.json();
console.log(data.day_master); // { stem, element, polarity }
import requests
res = requests.post(
"https://saju-api.pages.dev/api/v1/calculate",
headers={"X-API-Key": "sajuapi_free_YOUR_KEY"},
json={"year":1990, "month":5, "day":15,
"hour":14, "gender":"M", "lang":"en"},
)
print(res.json()["day_master"])
Why teams use it
The same calculation that Korean and Chinese astrologers use, exposed as endpoints you can ship today.
Compatibility scoring beyond Western zodiac. /compatibility returns a 0–100 score
with element-balance, day-master and branch breakdown.
A cacheable /daily snapshot per (day-master, date). Drop-in for push notifications,
widgets, and morning briefs.
Structured JSON — Ten Gods, 12 Life Stages, hidden stems, Yongshin. Clean grounding facts for retrieval and tool use.
Interpret reference →10 output languages. Every pillar returns Hanja, and the /bazi endpoint adds
pinyin romanization per stem & branch — render in any script or chart it directly.
Quickstart
Self-serve a free key, then call any endpoint with copy-paste curl / JavaScript / Python.
Keys are sent as the X-API-Key header on every request.
curl -X POST https://saju-api.pages.dev/api/v1/keys/create \
-H "Content-Type: application/json" \
-d '{ "email": "dev@yourcompany.io" }'
# → { "api_key": "sajuapi_free_…", "tier": "free", "daily_limit": 100 }
Reference
REST over HTTPS, JSON in and out. CORS-enabled. Korean /calculate and
Chinese /bazi share one engine — pick the labels your audience expects.
| Method | Path | Returns |
|---|---|---|
| POST | /api/v1/calculate | Four Pillars, Five-Element distribution, Day Master, zodiac (Korean labels). |
| POST | /api/v1/bazi | Same pillars with pinyin + English BaZi labels and Ten Gods. |
| POST | /api/v1/interpret | Ten Gods, 12 Life Stages, hidden stems, Yongshin, Daeun (luck cycles). |
| POST | /api/v1/compatibility | Two-person 0–100 score with a four-factor breakdown. |
| GET | /api/v1/daily | Cacheable daily fortune snapshot by Day Master + date. |
| GET | /api/v1/usage | Remaining quota for your key. |
Machine-readable spec: OpenAPI 3.1 · Postman collection · Try on Postman
Accuracy you can audit
Most astrology APIs assert accuracy. This one ships a benchmark you can clone and re-run yourself — the exact engine the live API serves, asserting independently verifiable calendar facts (Lichun year boundary, sexagenary day continuity, hour-branch edges, label mapping).
node benchmark/run_benchmark.js, no key or network needed./calculate and Chinese BaZi /bazi share one deterministic core — same input, same chart, byte for byte. Read endpoints are idempotent and safe to retry./bazi.Methodology mirrors RoxyAPI's public, clonable approach (publish a benchmark anyone can re-run). Sources: Four Pillars of Destiny · RoxyAPI benchmark approach.
Stability you can build on
An API is only as useful as the promise behind it. Here is exactly what we commit to — plain enough to design around, honest enough that you can hold us to it.
/v1 — additive changes onlyWithin /api/v1 we only make backward-compatible changes: new endpoints,
new optional request fields, and new response properties. We won't remove a field,
rename one, or change its type under v1. A breaking change ships as /v2 —
your code keeps working until you choose to move.
Every calculation is a pure function of its input — the same birthdate always returns the same chart, byte for byte. There is no hidden state to corrupt, so a retried or duplicated request can never double-charge or produce a different result. Read endpoints are naturally idempotent.
Failures return a JSON body with a stable error code and a machine-readable
reason (e.g. year_out_of_range) — never a bare HTML page. Codes are part of
the v1 contract, so you can branch on them with confidence.
Field presence is stable; values you should treat as opaque (Hanja strings, romanizations)
may gain detail over time. pillars.hour is null when birth time is unknown —
documented, not a surprise. Check a key before reading nested values and upgrades stay invisible.
This mirrors the versioning discipline of mature developer APIs such as Stripe's backward-compatibility policy — adapted to a small, focused API we actually maintain.
Pricing
Usage-based, billed monthly, cancel anytime. Same endpoints on every tier — no per-endpoint surcharges.
| Tier | Included calls / mo | Rate | Price | Get started |
|---|---|---|---|---|
| Free | 3,000 (100/day) | 1 RPS | $0 | Get a free key → |
| Developer | 30,000 (1,000/day) | 5 RPS | $9/mo | Get Developer → |
| Pro popular | Unmetered | 10 RPS | $49/mo | Get Pro → |
Start free in minutes — self-serve a key, no card. On a paid tier we provision your higher limits and send a checkout link, usually within one business day. 30-day money-back guarantee on paid tiers. Building a product on top of Saju / BaZi? See OEM below.
OEM & white-label — for products
Hybrid base + usage, the dominant 2026 B2B SaaS structure. White-label the four-pillar compatibility widget and ship 궁합 matching as a paid feature — without building a Saju engine.
| Plan | Included calls / mo | White-label | Price | Get started |
|---|---|---|---|---|
| Starter OEM | 100,000 | — | $390/mo | Scope this plan → |
| Growth OEM target | 1,000,000 | Logo-light | $1,490/mo | Talk to us → |
| Scale OEM | 10,000,000 | Full white-label + SLA | $4,990/mo | Scope this plan → |
Outcome-based option available: pay per compatibility match surfaced, or rev-share on paid readings. Market context (June 2026): VedicAstroAPI's Bestseller bundle is ₹3,999/mo (~$48) for 110K calls; AstrologyAPI starts at $99/mo. Among the few Korean Saju / BaZi engines, Saju API is differentiated by 10-language structured output, a reproducible accuracy benchmark you can re-run yourself, and deterministic responses built for an AI-interpretation layer (engine computes the chart; your LLM writes the reading). Western/Vedic APIs cannot produce Korean 사주 / BaZi 궁합 at all.
Talk to us
Tell us the plan you want and your monthly volume. We'll reply with your key, a checkout link, and (for OEM) the white-label widget — usually within one business day. Just testing? Grab a free key instead →
Prefer email? Write to ghdejr11@gmail.com.