Live · REST + JSON · 10 languages

The Korean Saju & BaZi API,
built for developers.

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.

Auth · X-API-Key header Latency · edge-served (Cloudflare) Output · 10 languages

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"])
Calls the real /calculate endpoint with a demo key.

  

Why teams use it

One destiny engine, four product shapes

The same calculation that Korean and Chinese astrologers use, exposed as endpoints you can ship today.

Dating & social apps

Compatibility scoring beyond Western zodiac. /compatibility returns a 0–100 score with element-balance, day-master and branch breakdown.

Dating use case →

Wellness & horoscope

A cacheable /daily snapshot per (day-master, date). Drop-in for push notifications, widgets, and morning briefs.

Daily fortune API →

AI assistants & LLMs

Structured JSON — Ten Gods, 12 Life Stages, hidden stems, Yongshin. Clean grounding facts for retrieval and tool use.

Interpret reference →

K-content & media

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.

Embeddable widget →

Quickstart

From zero to your first chart in 5 minutes

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.

get a free key
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 }

Full quickstart with every endpoint →

Reference

Endpoints (v1)

REST over HTTPS, JSON in and out. CORS-enabled. Korean /calculate and Chinese /bazi share one engine — pick the labels your audience expects.

MethodPathReturns
POST/api/v1/calculateFour Pillars, Five-Element distribution, Day Master, zodiac (Korean labels).
POST/api/v1/baziSame pillars with pinyin + English BaZi labels and Ten Gods.
POST/api/v1/interpretTen Gods, 12 Life Stages, hidden stems, Yongshin, Daeun (luck cycles).
POST/api/v1/compatibilityTwo-person 0–100 score with a four-factor breakdown.
GET/api/v1/dailyCacheable daily fortune snapshot by Day Master + date.
GET/api/v1/usageRemaining quota for your key.

Machine-readable spec: OpenAPI 3.1 · Postman collection · Try on Postman

Accuracy you can audit

A reproducible benchmark, not a marketing claim

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).

8 / 8
Reproducible benchmark cases passing — run node benchmark/run_benchmark.js, no key or network needed.
立春
Year pillar advances at Lichun (~Feb 4), not Jan 1 — the most common bug in naive calculators, covered by the test set.
1 engine
Korean Saju /calculate and Chinese BaZi /bazi share one deterministic core — same input, same chart, byte for byte. Read endpoints are idempotent and safe to retry.
10
Output languages (ko, en, ja, zh, es, pt-br, vi, id, hi, th). Hanja on every pillar; pinyin romanization via /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

Versioned, deterministic, and safe to retry

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.

Pinned /v1 — additive changes only

Within /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.

Deterministic & safe to retry

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.

Predictable errors

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.

Defensive-by-default fields

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

Start free, scale by request volume

Usage-based, billed monthly, cancel anytime. Same endpoints on every tier — no per-endpoint surcharges.

TierIncluded calls / moRatePriceGet started
Free3,000 (100/day)1 RPS$0Get a free key →
Developer30,000 (1,000/day)5 RPS$9/moGet Developer →
Pro popularUnmetered10 RPS$49/moGet 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

License the engine that powers dating, wellness & AI apps

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.

PlanIncluded calls / moWhite-labelPriceGet started
Starter OEM100,000$390/moScope this plan →
Growth OEM target1,000,000Logo-light$1,490/moTalk to us →
Scale OEM10,000,000Full white-label + SLA$4,990/moScope 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

Ready for a paid tier or an OEM plan? Let's get you set up.

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.