NaturaOS

Tài liệu API

Cùng một engine, hai cách gọi: REST (/api/v1/*) và MCP (/mcp). Mỗi op dưới đây có tham số, ví dụ copy-chạy-được, và response thật. Envelope luôn là { ok, data, meta } hoặc { ok:false, error }.

Thay <key> bằng key của bạn. Tên miền trong ví dụ là tên miền thật.

Lịch

Âm lịch Việt Nam theo thuật toán Hồ Ngọc Đức: đổi ngày, xem ngày, tiết khí, giờ hoàng đạo.

Xem ngày: âm lịch, can chi ngày/tháng/năm, giờ đầu ngày, tiết khí, giờ hoàng đạo.

calendar.dayInfo · 1 lượt/lần gọi

Full almanac day view: lunar date, day/month/year stem-branch (can chi), first hour of the day, solar term, auspicious hours. ⚠️ Two conventions coexist here on purpose: canChi follows the LUNAR calendar (year turns at Tết, month at lunar day 1), while almanac.dayOfficer/dutyGod follow the SOLAR TERM (the twelve day officers are term-based). Both are declared in meta.conventions. canChi is therefore NOT a bazi (bát tự) chart — see ganzhi.calendarPillars for the same caveat. Input: 'date' (YYYY-MM-DD) OR day+month+year, never both.

REST
GET /api/v1/calendar/day · POST /api/v1/calendar/day
MCP tool
calendar_dayInfo

Tham số

GET nhận tham số trên query string, POST nhận cùng tham số trong JSON body. Mảng qua GET viết cách nhau bằng dấu phẩy.

Tham sốKiểuBắt buộcMô tả
day integer — Solar day (1-31). FORM B — needs all of day+month+year; or omit the whole set and use 'date'.
month integer — Solar month (1-12). With day+year (form B).
year integer — Solar year (1-9999). With day+month (form B).
date string — Solar date as ISO 'YYYY-MM-DD' (e.g. 2026-07-01). FORM A for entering a date — use this field OR the numeric day+month+year set, never both (sending both → 400).
tz number = 7 — Timezone (UTC offset). Default 7 = Vietnam (UTC+7).
lang 'vi' | 'en' | 'zh' | 'all' = "vi" — Language of the labels in the response. vi (default) · en · zh (with pinyin) · all (every available language). A label missing the requested language falls back to vi; meta.language.available reports which languages this response actually carries. Error messages are unaffected.
format 'json' | 'text-tree' = "json" — Output format: json (default) or text-tree (an indented outline, easy for a person or an LLM to read).

Ví dụ

curl · GET
curl -H "Authorization: Bearer <key>" \
  "https://naturaos.mza.vn/api/v1/calendar/day?date=2026-09-06"
curl · POST
curl -X POST "https://naturaos.mza.vn/api/v1/calendar/day" \
  -H "Authorization: Bearer <key>" \
  -H "content-type: application/json" \
  -d '{"date":"2026-09-06"}'
JavaScript · fetch
const res = await fetch("https://naturaos.mza.vn/api/v1/calendar/day", {
  method: "POST",
  headers: { authorization: "Bearer <key>", "content-type": "application/json" },
  body: JSON.stringify({
    "date": "2026-09-06"
  }),
});
const { ok, data, meta } = await res.json();

Response

Kết quả thật của engine cho đúng input ở trên — sinh lúc dựng trang, không phải mẫu dán tay.

200 · application/json
{
  "ok": true,
  "data": {
    "solar": {
      "day": 6,
      "month": 9,
      "year": 2026,
      "weekday": {
        "vi": "Chủ nhật",
        "en": "Sunday"
      }
    },
    "lunar": {
      "day": 25,
      "month": 7,
      "year": 2026,
      "leap": false
    },
    "canChi": {
      "day": {
        "code": "Gui-Wei",
        "stem": "Gui",
        "branch": "Wei",
        "label": {
          "vi": "Quý Mùi"
        }
      },
      "month": {
        "code": "Bing-Shen",
        "stem": "Bing",
        "branch": "Shen",
        "label": {
          "vi": "Bính Thân"
        }
      },
      "year": {
        "code": "Bing-Wu",
        "stem": "Bing",
        "branch": "Wu",
        "label": {
          "vi": "Bính Ngọ"
        }
      }
    },
    "firstHour": {
      "code": "Ren-Zi",
      "stem": "Ren",
      "branch": "Zi",
      "label": {
        "vi": "Nhâm Tý"
      }
    },
    "solarTerm": {
      "vi": "Xử thử"
    },
    "solarTermStart": null,
    "auspiciousHours": [
      {
        "code": "Yin",
        "label": {
          "vi": "Dần",
          "pinyin": "Yín",
          "zh": "寅"
        },
        "range": "3–5",
        "startHour": 3,
        "endHour": 5
      },
      {
        "code": "Mao",
        "label": {
          "vi": "Mão",
          "pinyin": "Mǎo",
          "zh": "卯"
        },
        "range": "5–7",
        "startHour": 5,
        "endHour": 7
      },
      {
        "code": "Si",
        "label": {
          "vi": "Tỵ",
          "pinyin": "Sì",
          "zh": "巳"
        },
        "range": "9–11",
        "startHour": 9,
        "endHour": 11
      },
      {
        "code": "Shen",
        "label": {
          "vi": "Thân",
          "pinyin": "Shēn",
          "zh": "申"
        },
        "range": "15–17",
        "startHour": 15,
        "endHour": 17
      },
      {
        "code": "Xu",
        "label": {
          "vi": "Tuất",
          "pinyin": "Xū",
          "zh": "戌"
        },
        "range": "19–21",
        "startHour": 19,
        "endHour": 21
      },
      {
        "code": "Hai",
        "label": {
          "vi": "Hợi",
          "pinyin": "Hài",
          "zh": "亥"
        },
        "range": "21–23",
        "startHour": 21,
        "endHour": 23
      }
    ],
    "almanac": {
      "nayin": {
        "code": "YangLiuMu",
        "element": "wood",
        "label": {
          "vi": "Dương Liễu Mộc",
          "zh": "楊柳木",
          "pinyin": "Yáng Liǔ Mù"
        }
      },
      "dayOfficer": {
        "code": "Bi",
        "label": {
          "vi": "Bế",
          "zh": "閉",
          "pinyin": "Bì"
        }
      },
      "dutyGod": {
        "code": "YuTang",
        "type": "hoang",
        "auspicious": true,
        "label": {
          "vi": "Ngọc Đường",
          "zh": "玉堂",
          "pinyin": "Yù Táng"
        }
      }
    },
    "jd": 2461290
  },
  "meta": {
    "disclaimer": "Kết quả mang tính chất tham khảo học thuật và chiêm nghiệm triết học tự nhiên. Không nên tin tưởng tuyệt đối 100%, người dùng hãy tự mình quan sát, chiêm nghiệm và kiểm chứng qua thực tế đời sống.",
    "motto": "Nhân pháp Địa • Địa pháp Thiên • Thiên pháp Đạo • Đạo pháp Tự Nhiên",
    "engine": "calendar@0.2.0",
    "conventions": {
      "pillarBasis": "lunar_calendar",
      "yearBoundary": "lunar_new_year",
      "monthBoundary": "lunar_first",
      "almanacBasis": "solar_term",
      "ziHourBoundary": "midnight",
      "calendarEngine": "ho_ngoc_duc",
      "solarTermMark": "day_of_crossing"
    }
  }
}

Minh triết tự nhiên chỉ là gợi ý — quyết định và kết quả nằm ở hành động thực tế của chính bạn.

Đổi ngày dương sang ngày âm lịch Việt Nam.

calendar.convertSolarToLunar · 1 lượt/lần gọi

Convert a solar (Gregorian) date to the Vietnamese lunar date (âm lịch, Hồ Ngọc Đức algorithm). Input: 'date' (YYYY-MM-DD) OR day+month+year, never both.

REST
GET /api/v1/calendar/lunar-date · POST /api/v1/calendar/lunar-date
MCP tool
calendar_convertSolarToLunar

Tham số

GET nhận tham số trên query string, POST nhận cùng tham số trong JSON body. Mảng qua GET viết cách nhau bằng dấu phẩy.

Tham sốKiểuBắt buộcMô tả
day integer — Solar day (1-31). FORM B — needs all of day+month+year; or omit the whole set and use 'date'.
month integer — Solar month (1-12). With day+year (form B).
year integer — Solar year (1-9999). With day+month (form B).
date string — Solar date as ISO 'YYYY-MM-DD' (e.g. 2026-07-01). FORM A for entering a date — use this field OR the numeric day+month+year set, never both (sending both → 400).
tz number = 7 — Timezone (UTC offset). Default 7 = Vietnam (UTC+7).
lang 'vi' | 'en' | 'zh' | 'all' = "vi" — Language of the labels in the response. vi (default) · en · zh (with pinyin) · all (every available language). A label missing the requested language falls back to vi; meta.language.available reports which languages this response actually carries. Error messages are unaffected.
format 'json' | 'text-tree' = "json" — Output format: json (default) or text-tree (an indented outline, easy for a person or an LLM to read).

Ví dụ

curl · GET
curl -H "Authorization: Bearer <key>" \
  "https://naturaos.mza.vn/api/v1/calendar/lunar-date?date=2026-09-06"
curl · POST
curl -X POST "https://naturaos.mza.vn/api/v1/calendar/lunar-date" \
  -H "Authorization: Bearer <key>" \
  -H "content-type: application/json" \
  -d '{"date":"2026-09-06"}'
JavaScript · fetch
const res = await fetch("https://naturaos.mza.vn/api/v1/calendar/lunar-date", {
  method: "POST",
  headers: { authorization: "Bearer <key>", "content-type": "application/json" },
  body: JSON.stringify({
    "date": "2026-09-06"
  }),
});
const { ok, data, meta } = await res.json();

Response

Kết quả thật của engine cho đúng input ở trên — sinh lúc dựng trang, không phải mẫu dán tay.

200 · application/json
{
  "ok": true,
  "data": {
    "solar": {
      "day": 6,
      "month": 9,
      "year": 2026
    },
    "lunar": {
      "day": 25,
      "month": 7,
      "year": 2026,
      "leap": false
    },
    "jd": 2461290
  },
  "meta": {
    "disclaimer": "Kết quả mang tính chất tham khảo học thuật và chiêm nghiệm triết học tự nhiên. Không nên tin tưởng tuyệt đối 100%, người dùng hãy tự mình quan sát, chiêm nghiệm và kiểm chứng qua thực tế đời sống.",
    "motto": "Nhân pháp Địa • Địa pháp Thiên • Thiên pháp Đạo • Đạo pháp Tự Nhiên",
    "engine": "calendar@0.2.0",
    "conventions": {
      "calendarEngine": "ho_ngoc_duc"
    }
  }
}

Minh triết tự nhiên chỉ là gợi ý — quyết định và kết quả nằm ở hành động thực tế của chính bạn.

Đổi ngày âm lịch Việt Nam sang ngày dương.

calendar.convertLunarToSolar · 1 lượt/lần gọi

Convert a Vietnamese lunar date (âm lịch, Hồ Ngọc Đức algorithm) to its solar (Gregorian) date — e.g. find the solar day of Giỗ Tổ (10/3), Phật Đản (15/4) or Trung thu (15/8) in a given year. Input: year + month + day, and leap=true only for that year's leap month. A date that does not exist (day 30 of a 29-day month, a leap flag on a non-leap month) → BAD_INPUT.

REST
GET /api/v1/calendar/solar-date · POST /api/v1/calendar/solar-date
MCP tool
calendar_convertLunarToSolar

Tham số

GET nhận tham số trên query string, POST nhận cùng tham số trong JSON body. Mảng qua GET viết cách nhau bằng dấu phẩy.

Tham sốKiểuBắt buộcMô tả
year integer có Lunar year (the year Tết opens), e.g. 2027.
month integer có Lunar month (1-12).
day integer có Lunar day (1-30). Day 30 exists only in a 30-day month.
leap boolean = false — True for the leap (nhuận) month. Only valid when that year's leap month is this month.
tz number = 7 — Timezone (UTC offset). Default 7 = Vietnam (UTC+7).
lang 'vi' | 'en' | 'zh' | 'all' = "vi" — Language of the labels in the response. vi (default) · en · zh (with pinyin) · all (every available language). A label missing the requested language falls back to vi; meta.language.available reports which languages this response actually carries. Error messages are unaffected.
format 'json' | 'text-tree' = "json" — Output format: json (default) or text-tree (an indented outline, easy for a person or an LLM to read).

Ví dụ

curl · GET
curl -H "Authorization: Bearer <key>" \
  "https://naturaos.mza.vn/api/v1/calendar/solar-date?year=2027&month=8&day=15"
curl · POST
curl -X POST "https://naturaos.mza.vn/api/v1/calendar/solar-date" \
  -H "Authorization: Bearer <key>" \
  -H "content-type: application/json" \
  -d '{"year":2027,"month":8,"day":15}'
JavaScript · fetch
const res = await fetch("https://naturaos.mza.vn/api/v1/calendar/solar-date", {
  method: "POST",
  headers: { authorization: "Bearer <key>", "content-type": "application/json" },
  body: JSON.stringify({
    "year": 2027,
    "month": 8,
    "day": 15
  }),
});
const { ok, data, meta } = await res.json();

Response

Kết quả thật của engine cho đúng input ở trên — sinh lúc dựng trang, không phải mẫu dán tay.

200 · application/json
{
  "ok": true,
  "data": {
    "solar": {
      "day": 15,
      "month": 9,
      "year": 2027
    },
    "lunar": {
      "day": 15,
      "month": 8,
      "year": 2027,
      "leap": false
    },
    "jd": 2461664
  },
  "meta": {
    "disclaimer": "Kết quả mang tính chất tham khảo học thuật và chiêm nghiệm triết học tự nhiên. Không nên tin tưởng tuyệt đối 100%, người dùng hãy tự mình quan sát, chiêm nghiệm và kiểm chứng qua thực tế đời sống.",
    "motto": "Nhân pháp Địa • Địa pháp Thiên • Thiên pháp Đạo • Đạo pháp Tự Nhiên",
    "engine": "calendar@0.2.0",
    "conventions": {
      "calendarEngine": "ho_ngoc_duc"
    }
  }
}

Minh triết tự nhiên chỉ là gợi ý — quyết định và kết quả nằm ở hành động thực tế của chính bạn.

Ngày Tết Nguyên đán (mùng 1 tháng Giêng) của một năm, kèm can chi năm.

calendar.lunarNewYear · 1 lượt/lần gọi

The solar date of Vietnamese Tết (mùng 1 tháng Giêng) for a lunar year, with the year's can chi. Computed at UTC+7, so it differs from the Chinese New Year in 1985, 2007, 2030 and 2053. Input: year.

REST
GET /api/v1/calendar/lunar-new-year · POST /api/v1/calendar/lunar-new-year
MCP tool
calendar_lunarNewYear

Tham số

GET nhận tham số trên query string, POST nhận cùng tham số trong JSON body. Mảng qua GET viết cách nhau bằng dấu phẩy.

Tham sốKiểuBắt buộcMô tả
year integer có The lunar year whose Tết (mùng 1 tháng Giêng) to find, e.g. 2027.
tz number = 7 — Timezone (UTC offset). Default 7 = Vietnam (UTC+7).
lang 'vi' | 'en' | 'zh' | 'all' = "vi" — Language of the labels in the response. vi (default) · en · zh (with pinyin) · all (every available language). A label missing the requested language falls back to vi; meta.language.available reports which languages this response actually carries. Error messages are unaffected.
format 'json' | 'text-tree' = "json" — Output format: json (default) or text-tree (an indented outline, easy for a person or an LLM to read).

Ví dụ

curl · GET
curl -H "Authorization: Bearer <key>" \
  "https://naturaos.mza.vn/api/v1/calendar/lunar-new-year?year=2027"
curl · POST
curl -X POST "https://naturaos.mza.vn/api/v1/calendar/lunar-new-year" \
  -H "Authorization: Bearer <key>" \
  -H "content-type: application/json" \
  -d '{"year":2027}'
JavaScript · fetch
const res = await fetch("https://naturaos.mza.vn/api/v1/calendar/lunar-new-year", {
  method: "POST",
  headers: { authorization: "Bearer <key>", "content-type": "application/json" },
  body: JSON.stringify({
    "year": 2027
  }),
});
const { ok, data, meta } = await res.json();

Response

Kết quả thật của engine cho đúng input ở trên — sinh lúc dựng trang, không phải mẫu dán tay.

200 · application/json
{
  "ok": true,
  "data": {
    "date": "2027-02-06",
    "solar": {
      "day": 6,
      "month": 2,
      "year": 2027
    },
    "canChiYear": {
      "code": "Ding-Wei",
      "stem": "Ding",
      "branch": "Wei",
      "label": {
        "vi": "Đinh Mùi"
      }
    },
    "jd": 2461443
  },
  "meta": {
    "disclaimer": "Kết quả mang tính chất tham khảo học thuật và chiêm nghiệm triết học tự nhiên. Không nên tin tưởng tuyệt đối 100%, người dùng hãy tự mình quan sát, chiêm nghiệm và kiểm chứng qua thực tế đời sống.",
    "motto": "Nhân pháp Địa • Địa pháp Thiên • Thiên pháp Đạo • Đạo pháp Tự Nhiên",
    "engine": "calendar@0.2.0",
    "conventions": {
      "calendarEngine": "ho_ngoc_duc"
    }
  }
}

Minh triết tự nhiên chỉ là gợi ý — quyết định và kết quả nằm ở hành động thực tế của chính bạn.

Lịch tháng: âm lịch, can chi ngày, mùng 1, rằm và ngày bắt đầu tiết khí cho từng ngày.

calendar.month · 1 lượt/lần gọi

The lunar overlay of one solar month — a wall calendar's month page. One cell per day: lunar date, day can chi, and marks for mùng 1 (lunar month start), rằm (15th) and the day a solar term begins. One call replaces 28–31 calendar.dayInfo calls. solarTermStart marks the civil day during which the sun crosses the term's longitude — the same day calendar.dayInfo and calendar.dayCard name the new term (meta.conventions.solarTermMark). Input: year + month.

REST
GET /api/v1/calendar/month · POST /api/v1/calendar/month
MCP tool
calendar_month

Tham số

GET nhận tham số trên query string, POST nhận cùng tham số trong JSON body. Mảng qua GET viết cách nhau bằng dấu phẩy.

Tham sốKiểuBắt buộcMô tả
year integer có Solar year (1-9999).
month integer có Solar month (1-12).
tz number = 7 — Timezone (UTC offset). Default 7 = Vietnam (UTC+7).
lang 'vi' | 'en' | 'zh' | 'all' = "vi" — Language of the labels in the response. vi (default) · en · zh (with pinyin) · all (every available language). A label missing the requested language falls back to vi; meta.language.available reports which languages this response actually carries. Error messages are unaffected.
format 'json' | 'text-tree' = "json" — Output format: json (default) or text-tree (an indented outline, easy for a person or an LLM to read).

Ví dụ

curl · GET
curl -H "Authorization: Bearer <key>" \
  "https://naturaos.mza.vn/api/v1/calendar/month?year=2026&month=9"
curl · POST
curl -X POST "https://naturaos.mza.vn/api/v1/calendar/month" \
  -H "Authorization: Bearer <key>" \
  -H "content-type: application/json" \
  -d '{"year":2026,"month":9}'
JavaScript · fetch
const res = await fetch("https://naturaos.mza.vn/api/v1/calendar/month", {
  method: "POST",
  headers: { authorization: "Bearer <key>", "content-type": "application/json" },
  body: JSON.stringify({
    "year": 2026,
    "month": 9
  }),
});
const { ok, data, meta } = await res.json();

Response

Kết quả thật của engine cho đúng input ở trên — sinh lúc dựng trang, không phải mẫu dán tay.

200 · application/json
{
  "ok": true,
  "data": {
    "year": 2026,
    "month": 9,
    "days": [
      {
        "solar": {
          "day": 1,
          "weekday": {
            "vi": "Thứ Ba",
            "en": "Tuesday"
          }
        },
        "lunar": {
          "day": 20,
          "month": 7,
          "year": 2026,
          "leap": false
        },
        "canChiDay": {
          "code": "Wu-Yin",
          "stem": "Wu",
          "branch": "Yin",
          "label": {
            "vi": "Mậu Dần"
          }
        },
        "lunarMonthStart": false,
        "fullMoon": false,
        "jd": 2461285
      },
      {
        "solar": {
          "day": 2,
          "weekday": {
            "vi": "Thứ Tư",
            "en": "Wednesday"
          }
        },
        "lunar": {
          "day": 21,
          "month": 7,
          "year": 2026,
          "leap": false
        },
        "canChiDay": {
          "code": "Ji-Mao",
          "stem": "Ji",
          "branch": "Mao",
          "label": {
            "vi": "Kỷ Mão"
          }
        },
        "lunarMonthStart": false,
        "fullMoon": false,
        "jd": 2461286
      },
      "… (28 phần tử nữa — gọi thật để xem đủ)"
    ]
  },
  "meta": {
    "disclaimer": "Kết quả mang tính chất tham khảo học thuật và chiêm nghiệm triết học tự nhiên. Không nên tin tưởng tuyệt đối 100%, người dùng hãy tự mình quan sát, chiêm nghiệm và kiểm chứng qua thực tế đời sống.",
    "motto": "Nhân pháp Địa • Địa pháp Thiên • Thiên pháp Đạo • Đạo pháp Tự Nhiên",
    "engine": "calendar@0.2.0",
    "conventions": {
      "calendarEngine": "ho_ngoc_duc",
      "solarTermMark": "day_of_crossing"
    }
  }
}

Minh triết tự nhiên chỉ là gợi ý — quyết định và kết quả nằm ở hành động thực tế của chính bạn.

Lịch cả năm: 12 trang lịch tháng trong một lần gọi.

calendar.year · 3 lượt/lần gọi

A whole solar year of month pages in one call — the same cells calendar.month returns, for all twelve months. Built for a year-at-a-glance view, which otherwise costs twelve calendar.month calls. Per day: lunar date, day can chi, and marks for mùng 1, rằm and the day a solar term begins (the civil day of the crossing, as in calendar.month). Input: year.

REST
GET /api/v1/calendar/year · POST /api/v1/calendar/year
MCP tool
calendar_year

Tham số

GET nhận tham số trên query string, POST nhận cùng tham số trong JSON body. Mảng qua GET viết cách nhau bằng dấu phẩy.

Tham sốKiểuBắt buộcMô tả
year integer có Solar year (1-9999).
tz number = 7 — Timezone (UTC offset). Default 7 = Vietnam (UTC+7).
lang 'vi' | 'en' | 'zh' | 'all' = "vi" — Language of the labels in the response. vi (default) · en · zh (with pinyin) · all (every available language). A label missing the requested language falls back to vi; meta.language.available reports which languages this response actually carries. Error messages are unaffected.
format 'json' | 'text-tree' = "json" — Output format: json (default) or text-tree (an indented outline, easy for a person or an LLM to read).

Ví dụ

curl · GET
curl -H "Authorization: Bearer <key>" \
  "https://naturaos.mza.vn/api/v1/calendar/year?year=2026"
curl · POST
curl -X POST "https://naturaos.mza.vn/api/v1/calendar/year" \
  -H "Authorization: Bearer <key>" \
  -H "content-type: application/json" \
  -d '{"year":2026}'
JavaScript · fetch
const res = await fetch("https://naturaos.mza.vn/api/v1/calendar/year", {
  method: "POST",
  headers: { authorization: "Bearer <key>", "content-type": "application/json" },
  body: JSON.stringify({
    "year": 2026
  }),
});
const { ok, data, meta } = await res.json();

Response

Kết quả thật của engine cho đúng input ở trên — sinh lúc dựng trang, không phải mẫu dán tay.

200 · application/json
{
  "ok": true,
  "data": {
    "year": 2026,
    "months": [
      {
        "month": 1,
        "days": [
          {
            "solar": {
              "day": 1,
              "weekday": {
                "vi": "Thứ Năm",
                "en": "Thursday"
              }
            },
            "lunar": {
              "day": 13,
              "month": 11,
              "year": 2025,
              "leap": false
            },
            "canChiDay": {
              "code": "Yi-Hai",
              "stem": "Yi",
              "branch": "Hai",
              "label": {
                "vi": "Ất Hợi"
              }
            },
            "lunarMonthStart": false,
            "fullMoon": false,
            "jd": 2461042
          },
          {
            "solar": {
              "day": 2,
              "weekday": {
                "vi": "Thứ Sáu",
                "en": "Friday"
              }
            },
            "lunar": {
              "day": 14,
              "month": 11,
              "year": 2025,
              "leap": false
            },
            "canChiDay": {
              "code": "Bing-Zi",
              "stem": "Bing",
              "branch": "Zi",
              "label": {
                "vi": "Bính Tý"
              }
            },
            "lunarMonthStart": false,
            "fullMoon": false,
            "jd": 2461043
          },
          "… (29 phần tử nữa — gọi thật để xem đủ)"
        ]
      },
      {
        "month": 2,
        "days": [
          {
            "solar": {
              "day": 1,
              "weekday": {
                "vi": "Chủ nhật",
                "en": "Sunday"
              }
            },
            "lunar": {
              "day": 14,
              "month": 12,
              "year": 2025,
              "leap": false
            },
            "canChiDay": {
              "code": "Bing-Wu",
              "stem": "Bing",
              "branch": "Wu",
              "label": {
                "vi": "Bính Ngọ"
              }
            },
            "lunarMonthStart": false,
            "fullMoon": false,
            "jd": 2461073
          },
          {
            "solar": {
              "day": 2,
              "weekday": {
                "vi": "Thứ Hai",
                "en": "Monday"
              }
            },
            "lunar": {
              "day": 15,
              "month": 12,
              "year": 2025,
              "leap": false
            },
            "canChiDay": {
              "code": "Ding-Wei",
              "stem": "Ding",
              "branch": "Wei",
              "label": {
                "vi": "Đinh Mùi"
              }
            },
            "lunarMonthStart": false,
            "fullMoon": true,
            "jd": 2461074
          },
          "… (26 phần tử nữa — gọi thật để xem đủ)"
        ]
      },
      "… (10 phần tử nữa — gọi thật để xem đủ)"
    ]
  },
  "meta": {
    "disclaimer": "Kết quả mang tính chất tham khảo học thuật và chiêm nghiệm triết học tự nhiên. Không nên tin tưởng tuyệt đối 100%, người dùng hãy tự mình quan sát, chiêm nghiệm và kiểm chứng qua thực tế đời sống.",
    "motto": "Nhân pháp Địa • Địa pháp Thiên • Thiên pháp Đạo • Đạo pháp Tự Nhiên",
    "engine": "calendar@0.2.0",
    "conventions": {
      "calendarEngine": "ho_ngoc_duc",
      "solarTermMark": "day_of_crossing"
    }
  }
}

Minh triết tự nhiên chỉ là gợi ý — quyết định và kết quả nằm ở hành động thực tế của chính bạn.

Tờ lịch một ngày: âm lịch, can chi, tiết khí, trăng, ngày lễ, đếm ngược, câu nói và nguyên liệu bài đăng.

calendar.dayCard · 1 lượt/lần gọi

The tear-off calendar page for one day, in one call: the calendar.dayInfo almanac (lunar date, can chi, solar term, auspicious hours, day officer, duty god), the lunar month's length, the evening moon, the day's holidays with anniversaries, countdowns to New Year, Tết and the next holiday, the day's wisdom.dailyQuote, and 'post' — the ingredients of a social post as separate Vietnamese lines, for the caller to compose. Built for a daily share image or an automated post. Input: 'date' (YYYY-MM-DD) OR day+month+year.

REST
GET /api/v1/calendar/day-card · POST /api/v1/calendar/day-card
MCP tool
calendar_dayCard

Tham số

GET nhận tham số trên query string, POST nhận cùng tham số trong JSON body. Mảng qua GET viết cách nhau bằng dấu phẩy.

Tham sốKiểuBắt buộcMô tả
day integer — Solar day (1-31). FORM B — needs all of day+month+year; or use 'date'.
month integer — Solar month (1-12). With day+year (form B).
year integer — Solar year (1-9999). With day+month (form B).
date string — Solar date as ISO 'YYYY-MM-DD' (e.g. 2026-07-01). FORM A for entering a date — use this field OR the numeric day+month+year set, never both (sending both → 400).
tz number = 7 — Timezone (UTC offset). Default 7 = Vietnam (UTC+7).
occasions object[] — Set by the server from its holiday table; a value sent by a caller is replaced.
lang 'vi' | 'en' | 'zh' | 'all' = "vi" — Language of the labels in the response. vi (default) · en · zh (with pinyin) · all (every available language). A label missing the requested language falls back to vi; meta.language.available reports which languages this response actually carries. Error messages are unaffected.
format 'json' | 'text-tree' = "json" — Output format: json (default) or text-tree (an indented outline, easy for a person or an LLM to read).

Ví dụ

curl · GET
curl -H "Authorization: Bearer <key>" \
  "https://naturaos.mza.vn/api/v1/calendar/day-card?date=2026-09-06"
curl · POST
curl -X POST "https://naturaos.mza.vn/api/v1/calendar/day-card" \
  -H "Authorization: Bearer <key>" \
  -H "content-type: application/json" \
  -d '{"date":"2026-09-06"}'
JavaScript · fetch
const res = await fetch("https://naturaos.mza.vn/api/v1/calendar/day-card", {
  method: "POST",
  headers: { authorization: "Bearer <key>", "content-type": "application/json" },
  body: JSON.stringify({
    "date": "2026-09-06"
  }),
});
const { ok, data, meta } = await res.json();

Response

Kết quả thật của engine cho đúng input ở trên — sinh lúc dựng trang, không phải mẫu dán tay.

200 · application/json
{
  "ok": true,
  "data": {
    "solar": {
      "day": 6,
      "month": 9,
      "year": 2026,
      "weekday": "{ … }"
    },
    "lunar": {
      "day": 25,
      "month": 7,
      "year": 2026,
      "leap": false,
      "monthName": "{ … }",
      "monthNameTraditional": "{ … }",
      "nextMonthNameTraditional": "{ … }",
      "monthLength": 29,
      "isMonthStart": false,
      "isMonthEnd": false,
      "isFifteenth": false
    },
    "isTet": false,
    "season": "autumn",
    "occasions": [],
    "countdowns": {
      "newYear": "{ … }",
      "lunarNewYear": "{ … }",
      "nextOccasion": null
    },
    "canChi": {
      "day": "{ … }",
      "month": "{ … }",
      "year": "{ … }"
    },
    "solarTerm": {
      "vi": "Xử thử"
    },
    "solarTermStart": null,
    "moon": {
      "age": 24.81,
      "illumination": 0.255,
      "phase": "waning_crescent",
      "phaseName": "{ … }",
      "isAstronomicalFull": false
    },
    "auspiciousHours": [
      "{ … }",
      "{ … }",
      "… (4 phần tử nữa — gọi thật để xem đủ)"
    ],
    "almanac": {
      "dayOfficer": "{ … }",
      "dutyGod": "{ … }",
      "nayin": "{ … }"
    },
    "quote": {
      "id": "ddj.47.a",
      "work": "daodejing",
      "ref": "{ … }",
      "original": "{ … }",
      "hanViet": "Bất xuất hộ, tri thiên hạ; bất khuy dũ, kiến thiên đạo. K…",
      "text": "{ … }",
      "attribution": "{ … }"
    },
    "week": [
      "{ … }",
      "{ … }",
      "… (5 phần tử nữa — gọi thật để xem đủ)"
    ],
    "post": {
      "hook": null,
      "date": "Chủ nhật, 6/9/2026",
      "lunar": "25 tháng Bảy năm Bính Ngọ",
      "solarTerm": "{ … }",
      "canChi": "Ngày Quý Mùi, tháng Bính Thân",
      "nayin": "Nạp âm Dương Liễu Mộc",
      "almanac": "Trực Bế · Ngọc Đường (hoàng đạo)",
      "hours": "Dần 3–5 · Mão 5–7 · Tỵ 9–11 · Thân 15–17 · Tuất 19–21 · H…",
      "quote": "{ … }",
      "countdowns": [
        "{ … }",
        "{ … }"
      ],
      "hashtags": [
        "#LichAm",
        "#LichVanNien",
        "… (1 phần tử nữa — gọi thật để xem đủ)"
      ],
      "link": "https://naturaos.mza.vn/calendar",
      "imageUrl": "https://naturaos.mza.vn/api/v1/calendar/day-card.png?date…",
      "slogan": "Thuận thời mà sống, tự mình chiêm nghiệm."
    },
    "jd": 2461290
  },
  "meta": {
    "disclaimer": "Kết quả mang tính chất tham khảo học thuật và chiêm nghiệm triết học tự nhiên. Không nên tin tưởng tuyệt đối 100%, người dùng hãy tự mình quan sát, chiêm nghiệm và kiểm chứng qua thực tế đời sống.",
    "motto": "Nhân pháp Địa • Địa pháp Thiên • Thiên pháp Đạo • Đạo pháp Tự Nhiên",
    "engine": "calendar@0.2.0+wisdom@0.2.0",
    "conventions": {
      "pillarBasis": "lunar_calendar",
      "yearBoundary": "lunar_new_year",
      "monthBoundary": "lunar_first",
      "almanacBasis": "solar_term",
      "ziHourBoundary": "midnight",
      "calendarEngine": "ho_ngoc_duc",
      "solarTermMark": "day_of_crossing",
      "moonInstant": "20:00_local",
      "quoteSelection": "social_card",
      "quoteCycleDays": "151"
    },
    "sources": [
      {
        "id": "daodejing-wangbi-zh-wikisource",
        "rightsStatus": "public_domain",
        "appliesTo": [
          "quote.text"
        ],
        "note": "Original 道德經 (王弼本) from zh.wikisource, revision pinned in the corpus; ~2,500 years old."
      },
      {
        "id": "naturaos-vi-translation",
        "rightsStatus": "permissive",
        "appliesTo": [
          "quote.text"
        ],
        "note": "Bản dịch tiếng Việt do naturaos thực hiện, dịch thẳng từ nguyên văn."
      }
    ]
  }
}

Minh triết tự nhiên chỉ là gợi ý — quyết định và kết quả nằm ở hành động thực tế của chính bạn.

Can chi

Can chi năm / tháng / ngày / giờ theo lịch (năm đổi ở Tết). Không phải bát tự — xem lưu ý trong từng op.

Can chi năm/tháng/ngày/giờ theo lịch (năm đổi ở Tết) — không phải bát tự.

ganzhi.calendarPillars · 1 lượt/lần gọi

Stems and branches (can chi) for a datetime on the CALENDAR basis: the year turns at Tết, the month at lunar day 1. This is the can chi a Vietnamese almanac prints, for viewing and choosing days. ⚠️ NOT a bazi (bát tự / tứ trụ) chart: bazi turns the year at Lập xuân and the month at the solar term, so between those boundaries the two disagree. Do not cast a bazi with this op. Every convention that decides the answer — including the zi-hour boundary — is declared in meta.conventions. Input: 'datetime' (YYYY-MM-DD HH:mm) OR year+month+day+hour, never both.

REST
GET /api/v1/ganzhi/calendar-pillars · POST /api/v1/ganzhi/calendar-pillars
MCP tool
ganzhi_calendarPillars

Tham số

GET nhận tham số trên query string, POST nhận cùng tham số trong JSON body. Mảng qua GET viết cách nhau bằng dấu phẩy.

Tham sốKiểuBắt buộcMô tả
year integer — Solar year. FORM B — needs all of year+month+day+hour; or omit the whole set and use 'datetime'.
month integer — Solar month (1-12). With year+day+hour (form B).
day integer — Solar day (1-31). With year+month+hour (form B).
hour integer — Hour (0-23) — decides the hour pillar. With year+month+day (form B).
datetime string — Solar datetime as ISO 'YYYY-MM-DD HH:mm[:ss]' (e.g. '2026-07-01 10:30'). FORM A for entering a moment — use this field OR the numeric year+month+day+hour set, never both.
tz number = 7 — Timezone (UTC offset). Default 7 = Vietnam (UTC+7).
lang 'vi' | 'en' | 'zh' | 'all' = "vi" — Language of the labels in the response. vi (default) · en · zh (with pinyin) · all (every available language). A label missing the requested language falls back to vi; meta.language.available reports which languages this response actually carries. Error messages are unaffected.
format 'json' | 'text-tree' = "json" — Output format: json (default) or text-tree (an indented outline, easy for a person or an LLM to read).

Ví dụ

curl · GET
curl -H "Authorization: Bearer <key>" \
  "https://naturaos.mza.vn/api/v1/ganzhi/calendar-pillars?datetime=2026-09-06+10%3A30"
curl · POST
curl -X POST "https://naturaos.mza.vn/api/v1/ganzhi/calendar-pillars" \
  -H "Authorization: Bearer <key>" \
  -H "content-type: application/json" \
  -d '{"datetime":"2026-09-06 10:30"}'
JavaScript · fetch
const res = await fetch("https://naturaos.mza.vn/api/v1/ganzhi/calendar-pillars", {
  method: "POST",
  headers: { authorization: "Bearer <key>", "content-type": "application/json" },
  body: JSON.stringify({
    "datetime": "2026-09-06 10:30"
  }),
});
const { ok, data, meta } = await res.json();

Response

Kết quả thật của engine cho đúng input ở trên — sinh lúc dựng trang, không phải mẫu dán tay.

200 · application/json
{
  "ok": true,
  "data": {
    "lunar": {
      "day": 25,
      "month": 7,
      "year": 2026,
      "leap": false
    },
    "pillars": {
      "year": {
        "code": "Bing-Wu",
        "stem": "Bing",
        "branch": "Wu",
        "label": {
          "vi": "Bính Ngọ"
        }
      },
      "month": {
        "code": "Bing-Shen",
        "stem": "Bing",
        "branch": "Shen",
        "label": {
          "vi": "Bính Thân"
        }
      },
      "day": {
        "code": "Gui-Wei",
        "stem": "Gui",
        "branch": "Wei",
        "label": {
          "vi": "Quý Mùi"
        }
      },
      "hour": {
        "code": "Ding-Si",
        "stem": "Ding",
        "branch": "Si",
        "label": {
          "vi": "Đinh Tỵ"
        }
      }
    }
  },
  "meta": {
    "disclaimer": "Kết quả mang tính chất tham khảo học thuật và chiêm nghiệm triết học tự nhiên. Không nên tin tưởng tuyệt đối 100%, người dùng hãy tự mình quan sát, chiêm nghiệm và kiểm chứng qua thực tế đời sống.",
    "motto": "Nhân pháp Địa • Địa pháp Thiên • Thiên pháp Đạo • Đạo pháp Tự Nhiên",
    "engine": "ganzhi@0.2.0",
    "conventions": {
      "pillarBasis": "lunar_calendar",
      "yearBoundary": "lunar_new_year",
      "monthBoundary": "lunar_first",
      "ziHourBoundary": "midnight",
      "calendarEngine": "ho_ngoc_duc"
    }
  }
}

Minh triết tự nhiên chỉ là gợi ý — quyết định và kết quả nằm ở hành động thực tế của chính bạn.

Ngũ hành

Quan hệ sinh / khắc giữa năm hành. Không phụ thuộc lịch, trường phái hay thời điểm.

Quan hệ sinh/khắc ngũ hành của một hành, và giữa hai hành.

wuxing.relations · 1 lượt/lần gọi

Five-element (ngũ hành) generating/controlling lookup. Given one element, returns its full row of the two cycles — what it generates (我生), is generated by (生我), controls (我克), is controlled by (克我). Given a second element via 'target', also names their directed relation. Universal relations — no school variance, no calendar, no time input. Element codes match the element/nayin fields other ops emit: wood, fire, earth, metal, water.

REST
GET /api/v1/wuxing/relations · POST /api/v1/wuxing/relations
MCP tool
wuxing_relations

Tham số

GET nhận tham số trên query string, POST nhận cùng tham số trong JSON body. Mảng qua GET viết cách nhau bằng dấu phẩy.

Tham sốKiểuBắt buộcMô tả
element 'wood' | 'fire' | 'earth' | 'metal' | 'water' có Element, by machine code: wood=Mộc, fire=Hỏa, earth=Thổ, metal=Kim, water=Thủy — the same codes calendar.dayInfo and ganzhi.calendarPillars emit in their element/nayin fields.
target 'wood' | 'fire' | 'earth' | 'metal' | 'water' — Second element (optional). When present the response adds a 'withTarget' block: the DIRECTED relation from 'element' toward 'target' (generates / generated by / controls / controlled by / same).
lang 'vi' | 'en' | 'zh' | 'all' = "vi" — Language of the labels in the response. vi (default) · en · zh (with pinyin) · all (every available language). A label missing the requested language falls back to vi; meta.language.available reports which languages this response actually carries. Error messages are unaffected.
format 'json' | 'text-tree' = "json" — Output format: json (default) or text-tree (an indented outline, easy for a person or an LLM to read).

Ví dụ

curl · GET
curl -H "Authorization: Bearer <key>" \
  "https://naturaos.mza.vn/api/v1/wuxing/relations?element=wood&target=fire"
curl · POST
curl -X POST "https://naturaos.mza.vn/api/v1/wuxing/relations" \
  -H "Authorization: Bearer <key>" \
  -H "content-type: application/json" \
  -d '{"element":"wood","target":"fire"}'
JavaScript · fetch
const res = await fetch("https://naturaos.mza.vn/api/v1/wuxing/relations", {
  method: "POST",
  headers: { authorization: "Bearer <key>", "content-type": "application/json" },
  body: JSON.stringify({
    "element": "wood",
    "target": "fire"
  }),
});
const { ok, data, meta } = await res.json();

Response

Kết quả thật của engine cho đúng input ở trên — sinh lúc dựng trang, không phải mẫu dán tay.

200 · application/json
{
  "ok": true,
  "data": {
    "element": {
      "code": "wood",
      "label": {
        "vi": "Mộc",
        "zh": "木",
        "pinyin": "mù",
        "en": "Wood"
      }
    },
    "cycle": {
      "generates": {
        "code": "fire",
        "label": {
          "vi": "Hỏa",
          "zh": "火",
          "pinyin": "huǒ",
          "en": "Fire"
        }
      },
      "generatedBy": {
        "code": "water",
        "label": {
          "vi": "Thủy",
          "zh": "水",
          "pinyin": "shuǐ",
          "en": "Water"
        }
      },
      "controls": {
        "code": "earth",
        "label": {
          "vi": "Thổ",
          "zh": "土",
          "pinyin": "tǔ",
          "en": "Earth"
        }
      },
      "controlledBy": {
        "code": "metal",
        "label": {
          "vi": "Kim",
          "zh": "金",
          "pinyin": "jīn",
          "en": "Metal"
        }
      }
    },
    "withTarget": {
      "target": {
        "code": "fire",
        "label": {
          "vi": "Hỏa",
          "zh": "火",
          "pinyin": "huǒ",
          "en": "Fire"
        }
      },
      "relation": {
        "code": "generates",
        "label": {
          "vi": "ta sinh",
          "zh": "我生",
          "pinyin": "wǒ shēng",
          "en": "generates"
        }
      }
    }
  },
  "meta": {
    "disclaimer": "Kết quả mang tính chất tham khảo học thuật và chiêm nghiệm triết học tự nhiên. Không nên tin tưởng tuyệt đối 100%, người dùng hãy tự mình quan sát, chiêm nghiệm và kiểm chứng qua thực tế đời sống.",
    "motto": "Nhân pháp Địa • Địa pháp Thiên • Thiên pháp Đạo • Đạo pháp Tự Nhiên",
    "engine": "wuxing@0.1.0"
  }
}

Minh triết tự nhiên chỉ là gợi ý — quyết định và kết quả nằm ở hành động thực tế của chính bạn.

Minh triết

Câu nói trong ngày từ Đạo Đức Kinh (Lão Tử) và Kinh Pháp Cú (bản dịch HT. Thích Minh Châu), cố định theo ngày.

Câu nói trong ngày từ Đạo Đức Kinh hoặc Kinh Pháp Cú, cố định theo ngày.

wisdom.dailyQuote · 1 lượt/lần gọi

The quote of the day: one passage from the Đạo Đức Kinh (Laozi) or the Dhammapada (Kinh Pháp Cú), chosen deterministically from the date — the same date always returns the same quote. Each quote carries the original (Chinese or Pali), Vietnamese, and attribution; Đạo Đức Kinh quotes also carry the Hán-Việt reading. Input: 'date' (YYYY-MM-DD) OR day+month+year.

REST
GET /api/v1/wisdom/daily-quote · POST /api/v1/wisdom/daily-quote
MCP tool
wisdom_dailyQuote

Tham số

GET nhận tham số trên query string, POST nhận cùng tham số trong JSON body. Mảng qua GET viết cách nhau bằng dấu phẩy.

Tham sốKiểuBắt buộcMô tả
day integer — Solar day (1-31). FORM B — needs all of day+month+year; or use 'date'.
month integer — Solar month (1-12). With day+year (form B).
year integer — Solar year (1-9999). With day+month (form B).
date string — Solar date as ISO 'YYYY-MM-DD' (e.g. 2026-07-01). FORM A for entering a date — use this field OR the numeric day+month+year set, never both (sending both → 400).
tz number = 7 — Timezone (UTC offset). Default 7 = Vietnam (UTC+7).
lang 'vi' | 'en' | 'zh' | 'all' = "vi" — Language of the labels in the response. vi (default) · en · zh (with pinyin) · all (every available language). A label missing the requested language falls back to vi; meta.language.available reports which languages this response actually carries. Error messages are unaffected.
format 'json' | 'text-tree' = "json" — Output format: json (default) or text-tree (an indented outline, easy for a person or an LLM to read).

Ví dụ

curl · GET
curl -H "Authorization: Bearer <key>" \
  "https://naturaos.mza.vn/api/v1/wisdom/daily-quote?date=2026-09-06"
curl · POST
curl -X POST "https://naturaos.mza.vn/api/v1/wisdom/daily-quote" \
  -H "Authorization: Bearer <key>" \
  -H "content-type: application/json" \
  -d '{"date":"2026-09-06"}'
JavaScript · fetch
const res = await fetch("https://naturaos.mza.vn/api/v1/wisdom/daily-quote", {
  method: "POST",
  headers: { authorization: "Bearer <key>", "content-type": "application/json" },
  body: JSON.stringify({
    "date": "2026-09-06"
  }),
});
const { ok, data, meta } = await res.json();

Response

Kết quả thật của engine cho đúng input ở trên — sinh lúc dựng trang, không phải mẫu dán tay.

200 · application/json
{
  "ok": true,
  "data": {
    "date": {
      "day": 6,
      "month": 9,
      "year": 2026
    },
    "jd": 2461290,
    "quote": {
      "id": "dhp.228",
      "work": "dhammapada",
      "ref": {
        "verse": 228
      },
      "original": {
        "lang": "pi",
        "text": "Na cāhu na ca bhavissati,\nna cetarahi vijjati;\nEkantaṁ nindito poso,\nekantaṁ vā pasaṁsito."
      },
      "text": {
        "vi": "Xưa, vị lai, và nay,\nĐâu có sự kiện này,\nNgười hoàn toàn bị chê,\nNgười trọn vẹn được khen."
      },
      "attribution": {
        "author": {
          "vi": "Đức Phật",
          "en": "The Buddha",
          "zh": "佛陀",
          "pinyin": "Fótuó"
        },
        "work": {
          "vi": "Kinh Pháp Cú",
          "en": "Dhammapada",
          "zh": "法句經",
          "pinyin": "Fǎjùjīng"
        },
        "translator": "HT. Thích Minh Châu"
      }
    }
  },
  "meta": {
    "disclaimer": "Kết quả mang tính chất tham khảo học thuật và chiêm nghiệm triết học tự nhiên. Không nên tin tưởng tuyệt đối 100%, người dùng hãy tự mình quan sát, chiêm nghiệm và kiểm chứng qua thực tế đời sống.",
    "motto": "Nhân pháp Địa • Địa pháp Thiên • Thiên pháp Đạo • Đạo pháp Tự Nhiên",
    "engine": "wisdom@0.2.0",
    "sources": [
      {
        "id": "dhammapada-pali-mahasangiti",
        "rightsStatus": "public_domain",
        "appliesTo": [
          "quote.text"
        ],
        "note": "Pali original, Mahāsaṅgīti Tipiṭaka edition via suttacentral/sc-data, commit pinned in the corpus."
      },
      {
        "id": "dhammapada-vi-thich-minh-chau",
        "rightsStatus": "public_domain",
        "appliesTo": [
          "quote.text"
        ],
        "note": "Vietnamese by HT. Thích Minh Châu, dedicated CC0 (SuttaCentral publication scpub43)."
      }
    ]
  }
}

Minh triết tự nhiên chỉ là gợi ý — quyết định và kết quả nằm ở hành động thực tế của chính bạn.

Kinh dịch

Gieo quẻ theo số hoặc theo thời điểm, và tra cứu cấu trúc, kinh văn, luận quẻ của 64 quẻ.

Gieo quẻ kinh dịch theo số Thượng–Hạ–Động hoặc theo thời điểm.

iching.cast · 1 lượt/lần gọi

Cast an I Ching (kinh dịch) hexagram by the Upper–Lower–Moving number method or by time. method=numbers → upper/lower/moving; method=time → datetime OR year+month+day+hour. Deliberately thin: for the full scripture and commentary of the hexagram just cast, follow up with iching.hexagram using query=<kingWen> and include=canonicalText,interpretation.

REST
GET /api/v1/iching/cast · POST /api/v1/iching/cast
MCP tool
iching_cast

Tham số

GET nhận tham số trên query string, POST nhận cùng tham số trong JSON body. Mảng qua GET viết cách nhau bằng dấu phẩy.

Tham sốKiểuBắt buộcMô tả
method 'numbers' | 'time' có Casting method. 'numbers' = by the Upper–Lower–Moving numbers → fill upper/lower/moving. 'time' = by datetime → fill datetime OR year+month+day+hour.
upper integer — [method=numbers · REQUIRED] Upper number → upper (outer) trigram; taken mod 8 (0 → 8).
lower integer — [method=numbers · REQUIRED] Lower number → lower (inner) trigram; taken mod 8.
moving integer — [method=numbers · optional] Moving number → moving line; taken mod 6. Omitted → (upper+lower) mod 6.
year integer — [method=time] Solar year. Needs all of year+month+day+hour, or use 'datetime'.
month integer — [method=time] Month (1-12). With year+day+hour.
day integer — [method=time] Day (1-31). With year+month+hour.
hour integer — [method=time] Hour (0-23). With year+month+day.
datetime string — Solar datetime as ISO 'YYYY-MM-DD HH:mm[:ss]' (e.g. '2026-07-01 10:30'). FORM A for entering a moment — use this field OR the numeric year+month+day+hour set, never both.
tz number = 7 — Timezone (UTC offset). Default 7 = Vietnam (UTC+7).
lang 'vi' | 'en' | 'zh' | 'all' = "vi" — Language of the labels in the response. vi (default) · en · zh (with pinyin) · all (every available language). A label missing the requested language falls back to vi; meta.language.available reports which languages this response actually carries. Error messages are unaffected.
format 'json' | 'text-tree' = "json" — Output format: json (default) or text-tree (an indented outline, easy for a person or an LLM to read).

Ví dụ

curl · GET
curl -H "Authorization: Bearer <key>" \
  "https://naturaos.mza.vn/api/v1/iching/cast?method=numbers&upper=7&lower=3&moving=5"
curl · POST
curl -X POST "https://naturaos.mza.vn/api/v1/iching/cast" \
  -H "Authorization: Bearer <key>" \
  -H "content-type: application/json" \
  -d '{"method":"numbers","upper":7,"lower":3,"moving":5}'
JavaScript · fetch
const res = await fetch("https://naturaos.mza.vn/api/v1/iching/cast", {
  method: "POST",
  headers: { authorization: "Bearer <key>", "content-type": "application/json" },
  body: JSON.stringify({
    "method": "numbers",
    "upper": 7,
    "lower": 3,
    "moving": 5
  }),
});
const { ok, data, meta } = await res.json();

Response

Kết quả thật của engine cho đúng input ở trên — sinh lúc dựng trang, không phải mẫu dán tay.

200 · application/json
{
  "ok": true,
  "data": {
    "primary": {
      "code": "hex.22",
      "kingWen": 22,
      "glyph": "䷕",
      "binary": "101001",
      "name": {
        "vi": "Sơn Hỏa Bí",
        "zh": "山火賁",
        "en": "Adornment",
        "pinyin": "bì"
      },
      "judgment": {
        "zh": "亨。小利有攸往。",
        "vi": "Hanh thông. Hơi lợi có sự đi.",
        "en": "Pî indicates that there should be free course (in what it denotes). There will be little advantage (however) if it be allowed to advance (and take the lead)."
      }
    },
    "mutual": {
      "code": "hex.40",
      "kingWen": 40,
      "glyph": "䷧",
      "binary": "010100",
      "name": {
        "vi": "Lôi Thủy Giải",
        "zh": "雷水解",
        "en": "Release",
        "pinyin": "xiè"
      },
      "judgment": {
        "zh": "利西南,无所往,其來復吉。有攸往,夙吉。",
        "vi": "Lợi ở phía tây nam. Không có chỗ nào đi, thì trở về là tốt. Có sự đi, thì đi sớm là tốt.",
        "en": "In (the state indicated by) Kieh advantage will be found in the south-west. If no (further) operations be called for, there will be good fortune in coming back (to the old conditions). If some operations be called for, there will be good fortune in the early conducting of them."
      }
    },
    "changed": {
      "code": "hex.37",
      "kingWen": 37,
      "glyph": "䷤",
      "binary": "101011",
      "name": {
        "vi": "Phong Hỏa Gia Nhân",
        "zh": "風火家人",
        "en": "The Family",
        "pinyin": "jiā rén"
      },
      "judgment": {
        "zh": "利女貞。",
        "vi": "Lợi cho người con gái giữ chính bền.",
        "en": "For (the realisation of what is taught in) Aia Zan, (or for the regulation of the family), what is most advantageous is that the wife be firm and correct."
      }
    },
    "movingLine": {
      "position": 5,
      "primary": {
        "zh": "賁於丘園,束帛戔戔,吝,終吉。",
        "vi": "Làm vẻ ở vườn trên gò, bó lụa ít ỏi, đáng tiếc, nhưng cuối cùng thì tốt.",
        "en": "The fifth line, divided, shows its subject adorned by (the occupants of) the heights and gardens. He bears his roll of silk, small and slight. He may appear stingy; but there will be good fortune in the end."
      },
      "mutual": {
        "zh": "君子維有解,吉;有孚于小人。",
        "vi": "Quân tử chỉ có việc cởi bỏ, tốt; và có lòng thành đối với tiểu nhân.",
        "en": "The fifth line, divided, shows (its subject), the superior man (=the ruler), executing his function of removing (whatever is injurious to the idea of the hexagram), in which case there will be good fortune, and confidence in him will be shown even by the small men."
      },
      "changed": {
        "zh": "王假有家,勿恤。吉。",
        "vi": "Nhà vua đến với nhà; chớ lo, tốt.",
        "en": "The fifth line, undivided, shows the influence of the king extending to his family. There need be no anxiety; there will be good fortune."
      }
    },
    "numbers": {
      "upper": 7,
      "lower": 3,
      "moving": 5
    }
  },
  "meta": {
    "disclaimer": "Kết quả mang tính chất tham khảo học thuật và chiêm nghiệm triết học tự nhiên. Không nên tin tưởng tuyệt đối 100%, người dùng hãy tự mình quan sát, chiêm nghiệm và kiểm chứng qua thực tế đời sống.",
    "motto": "Nhân pháp Địa • Địa pháp Thiên • Thiên pháp Đạo • Đạo pháp Tự Nhiên",
    "engine": "iching@0.1.1",
    "conventions": {
      "bitOrder": "bottom_up",
      "ziHourBoundary": "midnight"
    },
    "sources": [
      {
        "id": "zhouyi-zh-wikisource",
        "rightsStatus": "public_domain",
        "appliesTo": [
          "primary.judgment",
          "mutual.judgment",
          "changed.judgment",
          "movingLine.primary",
          "movingLine.mutual",
          "movingLine.changed"
        ],
        "note": "周易 nguyên văn, nhập từ zh.wikisource; revid ghim trong iching.hexagram.canonicalText.source."
      },
      {
        "id": "naturaos-vi-translation",
        "rightsStatus": "permissive",
        "appliesTo": [
          "primary.judgment",
          "mutual.judgment",
          "changed.judgment",
          "movingLine.primary",
          "movingLine.mutual",
          "movingLine.changed"
        ],
        "note": "Bản dịch tiếng Việt do naturaos thực hiện, dịch thẳng từ nguyên văn."
      },
      {
        "id": "legge-1882",
        "rightsStatus": "public_domain",
        "appliesTo": [
          "primary.judgment",
          "mutual.judgment",
          "changed.judgment",
          "movingLine.primary",
          "movingLine.mutual",
          "movingLine.changed"
        ],
        "note": "Bản dịch tiếng Anh James Legge 1882 (Sacred Books of the East XVI), public domain. Số hoá: en.wikisource (quẻ 1–31, ghim revid) + archive.org mlbd.sacredbooksofeas0000fmax.vol.16 (32–64); sha256 corpus ghi trong canonical-text.ts."
      }
    ]
  }
}

Minh triết tự nhiên chỉ là gợi ý — quyết định và kết quả nằm ở hành động thực tế của chính bạn.

Tra một quẻ kinh dịch: hai quái, sáu hào, quan hệ, kinh văn và luận quẻ.

iching.hexagram · 3 lượt/lần gọi

Look up an I Ching (kinh dịch) hexagram WITHOUT casting — no datetime, no moving line. Returns structural facts: the two trigrams with their virtue (卦德), image and element, the six lines with their classical relations (correctness, centrality, correspondence, adjacency, three powers), and optionally the relation graph (opposite, inverse, nuclear, dual-image, tidal hexagrams). Text rides on include: 'canonicalText' = the 周易 scripture (zh + vi; Text layer also en/Legge 1882), 'interpretation' = naturaos's own editorial commentary (vi only). query = King Wen number, 6-bit binary, 'hex.NN', or the full Vietnamese name.

REST
GET /api/v1/iching/hexagram · POST /api/v1/iching/hexagram
MCP tool
iching_hexagram

Tham số

GET nhận tham số trên query string, POST nhận cùng tham số trong JSON body. Mảng qua GET viết cách nhau bằng dấu phẩy.

Tham sốKiểuBắt buộcMô tả
query integer | string có Hexagram to look up. Five forms, resolved in this order: (1) integer 1-64 → King Wen number; (2) 6-character 0/1 string → binary read bottom-up, e.g. '100000' = Địa Lôi Phục; (3) 1-2 digit string → also a King Wen number, e.g. '24' (GET passes everything as a string; no zero padding — '024' fails because form 2 takes precedence); (4) 'hex.NN' → hexagram code, exactly 2 digits, lowercase, e.g. 'hex.24' (not 'hex.1'); (5) anything else → the full Vietnamese name, e.g. 'Địa Lôi Phục' (Vietnamese only; short forms like 'Phục' do NOT resolve). Names that collide once diacritics are stripped → an error listing the candidates.
view 'compact' | 'standard' | 'full' = "standard" — Detail level: compact = identity + the two trigrams; standard (default) = plus a six-line summary; full = plus the complete line-position relations (correspondence, adjacency, three powers, roles).
include 'relations' | 'canonicalText' | 'interpretation'[] = [] — Optional blocks, orthogonal to view. 'relations' = the relation graph (opposite, inverse, nuclear, dual-image, tidal hexagrams). 'canonicalText' = scripture: judgment, judgment commentary, great image, line texts and small images, with Vietnamese translation. 'interpretation' = naturaos's own editorial commentary — NOT scripture. Over GET: ?include=relations,canonicalText,interpretation.
lang 'vi' | 'en' | 'zh' | 'all' = "vi" — Language of the labels in the response. vi (default) · en · zh (with pinyin) · all (every available language). A label missing the requested language falls back to vi; meta.language.available reports which languages this response actually carries. Error messages are unaffected.
format 'json' | 'text-tree' = "json" — Output format: json (default) or text-tree (an indented outline, easy for a person or an LLM to read).

Ví dụ

curl · GET
curl -H "Authorization: Bearer <key>" \
  "https://naturaos.mza.vn/api/v1/iching/hexagram?query=24&view=compact"
curl · POST
curl -X POST "https://naturaos.mza.vn/api/v1/iching/hexagram" \
  -H "Authorization: Bearer <key>" \
  -H "content-type: application/json" \
  -d '{"query":24,"view":"compact"}'
JavaScript · fetch
const res = await fetch("https://naturaos.mza.vn/api/v1/iching/hexagram", {
  method: "POST",
  headers: { authorization: "Bearer <key>", "content-type": "application/json" },
  body: JSON.stringify({
    "query": 24,
    "view": "compact"
  }),
});
const { ok, data, meta } = await res.json();

Response

Kết quả thật của engine cho đúng input ở trên — sinh lúc dựng trang, không phải mẫu dán tay.

200 · application/json
{
  "ok": true,
  "data": {
    "id": {
      "kingWen": 24,
      "code": "hex.24",
      "glyph": "䷗",
      "binary": "100000"
    },
    "name": {
      "vi": "Địa Lôi Phục",
      "zh": "地雷復",
      "en": "Return",
      "pinyin": "fù"
    },
    "trigrams": {
      "lower": {
        "code": "Zhen",
        "binary": "100",
        "glyph": "☳",
        "name": {
          "vi": "Chấn",
          "pinyin": "Zhèn",
          "zh": "震",
          "en": "Thunder"
        },
        "attribute": {
          "code": "movement",
          "label": {
            "vi": "động",
            "zh": "動",
            "en": "moving"
          }
        },
        "image": {
          "code": "thunder",
          "label": {
            "vi": "lôi",
            "zh": "雷",
            "en": "thunder"
          }
        },
        "phase": "wood",
        "familyRole": {
          "code": "eldest_son",
          "label": {
            "vi": "trưởng nam",
            "zh": "長男",
            "en": "eldest son"
          }
        },
        "fuxiSequenceNumber": 4,
        "earlierHeaven": {
          "direction": "NE"
        },
        "laterHeaven": {
          "number": 3,
          "direction": "E"
        }
      },
      "upper": {
        "code": "Kun",
        "binary": "000",
        "glyph": "☷",
        "name": {
          "vi": "Khôn",
          "pinyin": "Kūn",
          "zh": "坤",
          "en": "Earth"
        },
        "attribute": {
          "code": "yielding",
          "label": {
            "vi": "thuận",
            "zh": "順",
            "en": "docile"
          }
        },
        "image": {
          "code": "ground",
          "label": {
            "vi": "địa",
            "zh": "地",
            "en": "ground"
          }
        },
        "phase": "earth",
        "familyRole": {
          "code": "mother",
          "label": {
            "vi": "mẫu",
            "zh": "母",
            "en": "mother"
          }
        },
        "fuxiSequenceNumber": 8,
        "earlierHeaven": {
          "direction": "N"
        },
        "laterHeaven": {
          "number": 2,
          "direction": "SW"
        }
      }
    },
    "combinedAttribute": {
      "vi": "động mà thuận",
      "zh": "動而順",
      "en": "moving yet docile"
    }
  },
  "meta": {
    "disclaimer": "Kết quả mang tính chất tham khảo học thuật và chiêm nghiệm triết học tự nhiên. Không nên tin tưởng tuyệt đối 100%, người dùng hãy tự mình quan sát, chiêm nghiệm và kiểm chứng qua thực tế đời sống.",
    "motto": "Nhân pháp Địa • Địa pháp Thiên • Thiên pháp Đạo • Đạo pháp Tự Nhiên",
    "engine": "iching@0.1.1",
    "conventions": {
      "bitOrder": "bottom_up",
      "hexagramOrder": "king_wen"
    }
  }
}

Minh triết tự nhiên chỉ là gợi ý — quyết định và kết quả nằm ở hành động thực tế của chính bạn.