# BaZi Compatibility API

Four Pillars matching of two people: day-master elements and stem combinations, the spouse palace (day branches), year branches, each chart's useful element, the spouse star, and the year Na Yin, each factor with its rule and points, and a score from 50.

- Endpoint: `POST https://api.96astroapi.com/v1/chinese/bazi-match`
- Family: [Chinese astrology](https://96astroapi.com/apis/chinese.md)
- Input: Specific input
- Cost: 1 credit per successful call (sandbox keys are free)
- Status: available
- Delivery: Direct response
- Output languages: en
- Web page: https://96astroapi.com/apis/chinese/bazi-match

## Example request

```bash
curl https://api.96astroapi.com/v1/chinese/bazi-match \
  -H "Authorization: Bearer $ASTRO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"person_a":{"birth":{"datetime":"1990-10-18T14:30:00","timezone":"Asia/Kolkata","latitude":28.6139,"longitude":77.209},"gender":"male"},"person_b":{"birth":{"datetime":"1992-03-04T06:15:00","timezone":"Asia/Kolkata","latitude":19.076,"longitude":72.8777},"gender":"female"}}'
```

## Response

Every response is `{ "data": …, "meta": { "request_id", "credits_used", "warnings", "language" } }`.
The full request and response schema, with a captured example, is in the OpenAPI document: https://api.96astroapi.com/v1/openapi.json (path `/v1/chinese/bazi-match`).
