A deterministic spatial-analysis API for developers. Everything is computed by a fixed
Two-Eight Periods (orthodox Xuan Kong) engine — not generated by a language model.
The same input always returns the same output, so you can verify any result on the spot.
| Item | Value |
|---|---|
| Base URL | https://fengshuiseek.aicreditsapi.com/v1 |
| Auth | Request header X-API-Key: <your key> |
| Content type | application/json; charset=utf-8 |
| Metering | 1 credit deducted per call (see the quota field) |
Every /v1/* endpoint requires the header:
X-API-Key: jm_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Keys are issued offline in the form jm_ followed by 48 hex characters. A key is bound to an email address and is provisioned automatically by the payment webhook after purchase.
Error response (missing or invalid key):
{ "detail": "缺少 X-API-Key 请求头" }
HTTP status: 401
You do not have to send Chinese strings. level, system, direction keys, and terrain values all accept English names, common abbreviations, and the compass shorthand N / NE / E / SE / S / SW / W / NW.
{
"level": "home",
"system": "orthodox",
"terrain_map": {
"N": "water",
"E": "road",
"SW": "mountain"
}
}
| Field | Accepted English | Canonical value returned |
|---|---|---|
level | home house residential apartment | 家居 |
office workplace | 办公 | |
shop store retail commercial | 商铺 | |
city urban | 城市 | |
personal individual | 个人 | |
system | orthodox two-eight 2-8 er_yuan | 二元八运 |
xuankong three-nine 3-9 san_yuan | 三元九运 | |
| directions | N S E W NE NW SE SW C / north south … center | 正北 正南 正东 正西 东北 西北 东南 西南 中宫 |
| terrain | water river lake sea pool | 水 |
road street highway | 道路 | |
mountain hill building | 山 / 建筑 | |
sunken depression basement | 低洼 | |
flat plain ground | 平地 |
The engine normalizes all of these into three primitives — solid (山), moving (水), and flat (平) — before it computes. Response bodies keep the canonical Chinese enum values so that results stay comparable across clients.
No auth required. Returns the credit packs currently on sale.
curl https://fengshuiseek.aicreditsapi.com/v1/products
Response:
{
"success": true,
"products": {
"5": { "id": "prod_xxx", "calls": 5, "name": "5 次风水分析", "name_en": "5 analyses", "price": 300 },
"20": { "id": "prod_yyy", "calls": 20, "name": "20 次风水分析", "name_en": "20 analyses", "price": 900 },
"50": { "id": "prod_zzz", "calls": 50, "name": "50 次风水分析", "name_en": "50 analyses", "price": 1900 }
}
}
price is in cents (300 = $3.00). Use name or name_en for display — both are provided so you can localize your storefront without a translation table.
curl https://fengshuiseek.aicreditsapi.com/v1/me \
-H "X-API-Key: jm_xxx"
Response:
{
"key": "jm_xxx",
"name": "Example User",
"tier": "paid",
"quota": 45,
"used": 5,
"enabled": true,
"email": "you@example.com"
}
Runs the complete engine on a given space and returns a structured verdict plus an action list.
Body:
| Field | Type | Required | Description |
|---|---|---|---|
level | string | no | Analysis scope: 家居 home (default) / 个人 personal / 商铺 shop / 城市 city / 国家 country |
year | int | no | Year to compute for. Defaults to the current year |
system | string | no | Period system: 二元八运 Two-Eight (default) / 三元九运 Three-Nine |
terrain_map | object | no | Actual terrain per direction — see below |
birth_year | int | no | Occupant birth year (personal scope only) |
lang | string | no | zh (default) or en. With en, the JSON gains an en block containing an English report |
format | string | no | json (default) or text. With text, returns a plain-text report you can hand to a client directly |
terrain_map shape — a flat object. Keys are directions, values are terrain strings. Do not wrap it in directions:
{
"正北": "水",
"正东": "平地",
"西南": "山"
}
正北 正南 正东 正西 东南 东北 西南 西北 中宫 — or N / S / E / W / NE / NW / SE / SW / C水 water / 山 mountain / 平地 flat / 低洼 sunken / 高岗 elevated / 道路 road / 建筑 buildingThe engine reduces every terrain value to one of three primitives before computing — moving qi (水, 道路, 低洼, 广场), solid (山, 建筑, 高岗), or neutral (平地, 空地). A road in front of a door counts as moving qi, not as flat ground.
resonanceis an output field. The engine derives it from the terrain — it is never an input.
Older versions of this document listed it as a parameter; that was wrong.
Example:
curl -X POST https://fengshuiseek.aicreditsapi.com/v1/analyze \
-H "X-API-Key: jm_xxx" \
-H "Content-Type: application/json" \
-d '{
"level": "home",
"year": 2026,
"system": "orthodox",
"lang": "en",
"terrain_map": {
"N": "water",
"E": "road",
"SW": "mountain"
}
}'
Response:
{
"success": true,
"result": {
"summary": "【立极分析报告】家居(户型几何中心) | 2026年 | 二元八运\n当前乾九运,五黄金龙在坎一宫(正北,水气)。最旺方位:正北…",
"suggestion": "行动优先级:1) 确认坎一宫(正北)是否具备活水条件…",
"golden_dragon": {
"palace": "坎一宫",
"direction": "正北",
"element": "水",
"yun_name": "乾九运"
},
"palaces": [ /* per-palace detail */ ],
"provenance": {
"engine": "liji",
"system": "二元八运",
"year": 2026,
"elapsed_ms": 42
}
},
"quota": { "remaining": 44 }
}
summary and suggestion are the canonical Chinese fields. They are always present, whatever lang you pass, so existing integrations keep working. Palace names (坎一宫), directions (正北), and elements (水) are stable identifiers, not display strings — map them on your side when you need another language. The en block below is the ready-made English rendering.
When lang is en, the response also carries:
{
"en": {
"verdict": "…",
"why": ["…"],
"priorities": [{ "room": "Bedroom", "palace": "Kan-1", "reason": "…", "suggestion": "…" }],
"doctrine": "…"
}
}
provenance is included so that every number can be traced back to a specific engine, year, and period system.
Errors:
| Status | Cause |
|---|---|
401 | Missing, invalid, or disabled key |
402 | Credits exhausted (details in detail) |
422 | Invalid field value — the message lists the allowed values |
500 | Engine failure |
Skips the prose report and returns just the palace grid and where the golden dragon sits. Use this when you want to draw the compass yourself.
Body: same as /v1/analyze (level / year / system / terrain_map)
Response:
{
"success": true,
"year": 2026,
"system": "二元八运",
"golden_dragon": {
"palace": "坎一宫",
"direction": "正北",
"element": "水",
"yun_name": "乾九运"
},
"palaces": [
{
"palace": "坎一宫",
"direction": "正北",
"digital": 1,
"element": "水",
"is_golden_dragon": true,
"terrain": null,
"resonance": null,
"reason": "五黄金龙所落之位,当运最旺",
"suggestion": "宜做核心功能区、宜动、宜见水"
}
],
"summary": "…",
"suggestion": "…"
}
Returns when each period starts and ends within a year range.
Query parameters:
| Param | Default | Description |
|---|---|---|
start | 2020 | Start year |
end | 2050 | End year |
system | 二元八运 | Period system — English aliases accepted |
curl "https://fengshuiseek.aicreditsapi.com/v1/timeline?start=2020&end=2050&system=orthodox" \
-H "X-API-Key: jm_xxx"
Response:
{
"success": true,
"system": "二元八运",
"events": [
{ "year_start": 2024, "year_end": 2033, "yun_name": "乾九运", "palace": "坎一宫", "direction": "正北", "element": "水" }
]
}
One *yuan* spans 180 years, split into alternating 9-year yang and 6-year yin segments. From 2024 the active period is Qian 9, and the golden dragon (五黄金龙) falls in Kan-1 palace — due north.
| Period | Years | Dragon palace | Direction |
|---|---|---|---|
| Qian 9 | 2024–2033 | Kan-1 (坎一宫) | Due north |
| Dui 7 | 2034–2039 | Kun-2 (坤二宫) | Southwest |
| Qian 8 | 2040–2049 | Gen-8 (艮八宫) | Northeast |
| Qian 9 (next cycle) | 2050–2059 | Li-9 (离九宫) | Due south |
The widely marketed "Period 9 / fire / dragon due south" model belongs to Three-Nine Periods (Xuan Kong), a separate system. The two are not interchangeable and must never be mixed in one reading. This is why system is an explicit, required-in-practice field rather than something the server guesses.
No language model sits in the calculation path. provenance.elapsed_ms reports actual engine time. Call the same endpoint twice with the same body and the numbers will match; only the prose wording may vary when lang=en, and even that is template-driven.
| Pack | Price | Credits |
|---|---|---|
| 5 calls | $3 | 5 |
| 20 calls | $9 | 20 |
| 50 calls | $19 | 50 |
Checkout is hosted by Creem. After payment, the webhook provisions credits for your email and issues the key automatically.
Create a checkout session (no auth required):
curl -X POST https://fengshuiseek.aicreditsapi.com/v1/checkout \
-H "Content-Type: application/json" \
-d '{"email": "you@example.com", "plan": 5}'
Response:
{ "checkoutUrl": "https://www.creem.io/checkout/prod_xxx/ch_yyy" }
plan is 5, 20, or 50 (integer). Redirect the user to checkoutUrl to complete payment.
Output describes the conditional geometry of a space. It is not a prediction about a person's life, health, or fate. The same space is re-evaluated under a different year or period system and will produce different results — that is by design, and it is what makes the output checkable. Keep this notice visible in any product built on this API.
Health-related questions must be directed to a medical professional. This API is a spatial layout tool, not a diagnostic one.
aicreditsapi.com