> ## Documentation Index
> Fetch the complete documentation index at: https://docs.astrom8.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Build with the Qi Men API

> Generate reproducible Shi Jia Qi Men plates with explicit earth and heaven layers.

AstroM8 implements **Shi Jia Qi Men (时家奇门)** using the **Chai Bu (拆补)**
convention. The calculation is deterministic; interpretation is an optional
Pro-tier enhancement.

## Request a chart

```bash theme={null}
curl --request POST \
  --url 'https://api.astrom8.com/api/v3/chinese/qimen' \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: astrom8_...' \
  --data '{
    "date": "1990-05-15",
    "time": "14:30",
    "latitude": 13.7563,
    "longitude": 100.5018,
    "timezoneOffsetMinutes": 420,
    "type": "hour",
    "interpret": false
  }'
```

## Read the plate

Each item in `palaces` exposes the layers separately:

* `earth_qi_yi`: fixed earth-plate stem (地盘三奇六仪)
* `heaven_qi_yi`: heaven-plate stem carried with the rotated star plate
* `star`, `door`, and `god`: the nine-star, eight-door, and eight-god layers
* `qi_yi`: deprecated compatibility alias of `earth_qi_yi`

The top-level `zhi_fu_star` and `zhi_shi_door` identify the direct star and
direct door. `ge_ju` contains patterns detected from the calculated
heaven-over-earth stem relationship.

## Reproducibility

Store the complete request with the result, especially `timezoneOffsetMinutes`
and `type`. Solar terms use the actual instant, while the local day pillar
selects the Fu Tou and yuan.

AstroM8 currently supports the Chai Bu convention. Zhi Run (置閏), Chao
Shen/Jie Qi (超神接氣), and lineage-specific alternatives are not silently
mixed into this output; future methods will be exposed as explicit versioned
calculation modes.
