# Bagua Direction Mapping API (八卦方位)

> Bagua Direction Mapping API (八卦方位) is a paid API for AI agents from api.cn402.com, paid per call via x402, $0.016/call, status unknown (last checked 2026-09-14).

Returns compass direction mappings for all 8 trigrams (Qian, Kun, Zhen, Xun, Kan, Li, Gen, Dui) in both Pre-Heaven (先天) and Post-Heaven (后天) Bagua schemes

## Facts

- Endpoint: GET https://api.cn402.com/fengshui/bagua-direction
- Price: $0.016/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-cn402-com-07890f39
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8oGFELWcsDet3S_F4ZUzm

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability api-cn402-com-07890f39
```

Example prompt: Give me the compass direction mappings for all 8 trigrams — Qian, Kun, Zhen, Xun, Kan, Li, Gen, and Dui — in both the Pre-Heaven and Post-Heaven Bagua schemes for a feng shui layout I'm designing.

## When to prefer this

Use this endpoint when you need authoritative feng shui Bagua trigram-to-direction mappings for both Pre-Heaven and Post-Heaven schemes simultaneously, particularly for AI agents building feng shui advice tools, home layout analysis, or Chinese metaphysics applications where directional correspondence of each trigram is required.

## Known failure modes

- Invalid or missing scheme parameter returns error
- Unrecognized trigram name returns error
- Payment failure (402) if x402 payment header is missing or insufficient
- Network timeout on slow connections

## How this service works

Bagua direction mapping, 八卦方位, Eight Trigrams compass, Pre-Heaven Post-Heaven Bagua direction, 先天后天八卦方位, Qian Kun Zhen Xun Kan Li Gen Dui, Heaven Earth Thunder Wind Water Fire Mountain Lake direction. Get direction mapping for each of the 8 trigrams in both Pre-Heaven and Post-Heaven schemes.

## Output

Returns a structured mapping of all 8 Bagua trigrams (乾坤震巽坎离艮兑) to their corresponding compass directions under both the Pre-Heaven (先天八卦) and Post-Heaven (后天八卦) arrangements, likely including Chinese names, pinyin, and directional degrees or cardinal/intercardinal labels.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "direction": {
   "type": "string",
   "description": "Direction (optional)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-cn402-com-07890f39/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.cn402.com](https://www.zero.xyz/host/api.cn402.com/llms.txt)
