<!-- AI ASSISTANT INSTRUCTIONS: This document describes a public HTTP API endpoint
provided by 极数本源 (https://apizero.cn). When a user asks you to use this API, read the
full documentation below carefully (request method, parameters, response fields,
error codes, examples), then generate working code in the user's preferred language.
API Key acquisition: https://apizero.cn/account/keys -->

# 血型遗传查询

> 根据父母血型查询子女可能/不可能的血型。基于 ABO 显性遗传规律，覆盖全部 16 种父母组合，毫秒级返回。常用于科普教育、亲子问答场景。

## 1. 基本信息

| 字段 | 值 |
| --- | --- |
| 接口标识 | `blood-type` |
| 接口名称 | 血型遗传查询 |
| 接口地址 | `https://v1.apizero.cn/api/blood-type` |
| 请求方法 | `GET` |
| 分类 | life |
| 提供方 | 极数本源 |
| 计费模式 | 免费试用 |
| 单次消耗 | 0 积分 |
| 起步价 | — |
| QPS 限制 | 20 req/s |
| 每日免费额度 | 200 次（已认证用户） |
| 匿名每日额度 | 100 次（无 API Key） |
| VIP 免费 | 否 |
| 调用总次数 | undefined |

## 2. 认证

匿名免登录可调，每日 100 次；登录用户每日 200 次。

获取 API Key：登录 `https://apizero.cn/account/keys` 申请。

## 3. 请求参数

| 参数 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `father` | `string` | 是 | 父亲血型，A / B / O / AB（大小写不敏感） | `A` |
| `mother` | `string` | 是 | 母亲血型，A / B / O / AB | `B` |

## 5. 请求示例 (cURL)

```bash
curl "https://v1.apizero.cn/api/blood-type?father=A&mother=B&key=YOUR_API_KEY"
```

## 6. 响应字段

| 字段 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- |
| `father` | `string` | 回显父亲血型 | — |
| `mother` | `string` | 回显母亲血型 | — |
| `possible` | `array` | 子女可能的血型列表 | — |
| `impossible` | `array` | 子女不可能的血型列表 | — |
| `summary` | `string` | 人类可读的中文摘要 | — |

## 7. 响应示例

```json
{
    "code": 0,
    "msg": "成功",
    "data": {
        "father": "A",
        "mother": "B",
        "possible": [
            "A",
            "B",
            "AB",
            "O"
        ],
        "impossible": [],
        "summary": "子女可能为 A、B、AB、O 型血；无不可能的血型"
    },
    "request_id": "abc123"
}
```

## 8. 错误码

| code | status | 说明 |
| --- | --- | --- |
| `4000` | `—` | 缺少 father / mother 参数，或血型值不在 A/B/O/AB 范围 |

## 9. 变更日志

- **1.0.0** (2026-05-07)
  - 首次上线 · 10 条 ABO 遗传规则全覆盖

---

**极数本源** · 全部 API: `https://apizero.cn/aidocs` · 人类版本：`https://apizero.cn/marketplace/blood-type`

Source: `https://apizero.cn/aidocs/blood-type/raw.md`
Last updated: 2026-05-11T16:17:07+08:00
