人类设计API文档

概述

人类设计(Human Design)是一套结合西方占星学、易经、印度脉轮、卡巴拉等体系的自我认知系统。本API提供三大核心功能:本命盘计算、合盘分析和流日解读。

/hdnatal POST

接口说明

生成本命盘,分析个人的能量类型、策略、权威、侧剖面、轮回交叉等核心要素。返回完整的行星位置数据(个性化层面和设计层面)。

基本信息

参数 值
Base URL https://chart.12sign.top
接口URL /hdnatal
请求方式 POST
Content-Type application/json

请求参数

参数名 类型 必选 说明
year integer 是 出生年份,如1990
month integer 是 出生月份,1-12
day integer 是 出生日期,1-31
hour integer 是 出生小时,0-23
minute integer 是 出生分钟,0-59
name string 否 姓名,默认"Unknown"

请求示例

{
    "year": 1990,
    "month": 5,
    "day": 15,
    "hour": 10,
    "minute": 30,
    "name": "张三"
}

返回参数

参数名 类型 说明
type string 能量类型:Manifestor/Generator/Manifesting Generator/Projector/Reflector
profile string 侧剖面,如"6/2"
strategy string 内在权威
incarnation_cross string 轮回交叉
definition string/integer 定义:"Single"或分割数(1-4)
centers array 已定义的中心列表
channels array 激活的通道列表
variables object 变量:消化、环境、动机、视角
planets object 行星数据:personality(个性化层面)和design(设计层面)
svg string 人类设计图SVG

返回示例

{
    "type": "Projector",
    "profile": "6/2",
    "strategy": "Emotional Authority",
    "incarnation_cross": "The Left Angle Cross of Dedication",
    "definition": 2,
    "centers": ["Root", "Ajna", "G", "Throat", "Head", "SolarPlexus"],
    "channels": [
        {"gate1": 13, "gate2": 33},
        {"gate1": 23, "gate2": 43}
    ],
    "variables": {
        "digestion": "Right Light (C6/T5)",
        "environment": "Left Kitchens (C3/T2)",
        "motivation": "Right Guilt (C5/T6)",
        "perspective": "Right Probability (C5/T5)"
    },
    "planets": {
        "personality": {
            "Sun": {"gate": 23, "line": 6, "color": 5, "tone": 6, "base": 4, "longitude": 54.3359},
            "Moon": {"gate": 60, "line": 1, "color": 1, "tone": 1, "base": 3, "longitude": 296.3902}
        },
        "design": {
            "Sun": {"gate": 30, "line": 2, "color": 6, "tone": 5, "base": 3, "longitude": 326.3359},
            "Moon": {"gate": 50, "line": 4, "color": 1, "tone": 4, "base": 1, "longitude": 209.2692}
        }
    },
    "svg": "..."
}
/hdcomposite POST

接口说明

生成两人合盘,分析两人之间的关系类型、能量互动、通道机制等。适用于伴侣、朋友、家人等人际关系分析。

基本信息

参数 值
Base URL https://chart.12sign.top
接口URL /hdcomposite
请求方式 POST
Content-Type application/json

请求参数

参数名 类型 必选 说明
person_a object 是 用户A的出生信息,包含year/month/day/hour/minute/name
person_b object 是 用户B的出生信息,包含year/month/day/hour/minute/name

请求示例

{
    "person_a": {
        "year": 1990,
        "month": 5,
        "day": 15,
        "hour": 10,
        "minute": 30,
        "name": "张三"
    },
    "person_b": {
        "year": 1992,
        "month": 8,
        "day": 20,
        "hour": 14,
        "minute": 45,
        "name": "李四"
    }
}

返回参数

参数名 类型 说明
relationship_type string 关系能量类型
definition string/integer 合盘定义
channels_mechanics array 通道机制分析列表
defined_centers array 合盘已定义的中心
active_channels array 合盘激活的通道
person_a object 用户A的完整信息(含行星数据)
person_b object 用户B的完整信息(含行星数据)
svg string 合盘图SVG

返回示例

{
    "relationship_type": "Manifesting Generator",
    "definition": 2,
    "channels_mechanics": [
        {
            "channel": [1, 8],
            "mechanic": "Electromagnetic"
        },
        {
            "channel": [2, 14],
            "mechanic": "Dominance (用户B)"
        }
    ],
    "defined_centers": ["Root", "Ajna", "G", "Throat"],
    "active_channels": [{"gate1": 1, "gate2": 8}, {"gate1": 13, "gate2": 33}],
    "person_a": {
        "name": "张三",
        "birth_date": "1990-05-15T10:30:00",
        "type": "Projector",
        "profile": "6/2",
        "planets": {
            "Sun": {"gate": 23, "line": 6, "color": 5, "tone": 6, "base": 4, "longitude": 54.3359}
        },
        "design_planets": {
            "Sun": {"gate": 30, "line": 2, "color": 6, "tone": 5, "base": 3, "longitude": 326.3359}
        }
    },
    "person_b": {
        "name": "李四",
        "birth_date": "1992-08-20T14:45:00",
        "type": "Generator",
        "profile": "4/6",
        "planets": {
            "Sun": {"gate": 15, "line": 1, "color": 3, "tone": 2, "base": 1, "longitude": 128.5}
        },
        "design_planets": {
            "Sun": {"gate": 45, "line": 3, "color": 2, "tone": 4, "base": 2, "longitude": 205.3}
        }
    },
    "svg": "..."
}
/hdtransit POST

接口说明

生成流日分析,对比本命盘与指定日期的星体位置,分析当天的能量影响、通道激活等。transit_date为可选,不传则使用当前时间。

基本信息

参数 值
Base URL https://chart.12sign.top
接口URL /hdtransit
请求方式 POST
Content-Type application/json

请求参数

参数名 类型 必选 说明
person object 是 本命盘出生信息,包含year/month/day/hour/minute/name
transit_date object 否 流日日期,不传则使用当前时间,格式同person

请求示例

{
    "person": {
        "year": 1990,
        "month": 5,
        "day": 15,
        "hour": 10,
        "minute": 30,
        "name": "张三"
    },
    "transit_date": {
        "year": 2026,
        "month": 1,
        "day": 13,
        "hour": 12,
        "minute": 0
    }
}

返回参数

参数名 类型 说明
transit_date string 流日日期时间(ISO格式)
relationship_type string 当天能量类型
channels_mechanics array 通道机制分析
defined_centers array 流日已定义的中心
active_channels array 流日激活的通道
person object 本命盘完整信息
transit object 流日完整信息
svg string 流日图SVG

返回示例

{
    "transit_date": "2026-01-13T12:00:00",
    "relationship_type": "Generator",
    "channels_mechanics": [
        {
            "channel": [1, 8],
            "mechanic": "Compromise (Transit has Channel)"
        },
        {
            "channel": [13, 33],
            "mechanic": "Dominance (测试用户)"
        }
    ],
    "defined_centers": ["Root", "Ajna", "G", "Throat", "SolarPlexus"],
    "active_channels": [{"gate1": 1, "gate2": 8}, {"gate1": 18, "gate2": 58}],
    "person": {
        "name": "张三",
        "birth_date": "1990-05-15T10:30:00",
        "type": "Projector",
        "profile": "6/2",
        "planets": {
            "Sun": {"gate": 23, "line": 6, "color": 5, "tone": 6, "base": 4, "longitude": 54.3359}
        },
        "design_planets": {
            "Sun": {"gate": 30, "line": 2, "color": 6, "tone": 5, "base": 3, "longitude": 326.3359}
        }
    },
    "transit": {
        "name": "Transit",
        "transit_date": "2026-01-13T12:00:00",
        "type": "Generator",
        "profile": "4/6",
        "planets": {
            "Sun": {"gate": 45, "line": 1, "color": 3, "tone": 2, "base": 1, "longitude": 128.5}
        },
        "design_planets": {
            "Sun": {"gate": 60, "line": 4, "color": 2, "tone": 4, "base": 2, "longitude": 205.3}
        }
    },
    "svg": "..."
}

Python测试代码示例

import requests
import json

BASE_URL = "https://chart.12sign.top"

def test_natal():
    """测试本命盘"""
    payload = {
        "year": 1990,
        "month": 5,
        "day": 15,
        "hour": 10,
        "minute": 30,
        "name": "测试用户"
    }
    
    response = requests.post(f"{BASE_URL}/hdnatal", json=payload)
    print(f"本命盘: {response.status_code}")
    if response.status_code == 200:
        data = response.json()
        print(f"类型: {data['type']}")
        print(f"侧剖面: {data['profile']}")
        print(f"策略: {data['strategy']}")
    return response.json()

def test_composite():
    """测试合盘"""
    payload = {
        "person_a": {
            "year": 1990, "month": 5, "day": 15, "hour": 10, "minute": 30, "name": "张三"
        },
        "person_b": {
            "year": 1992, "month": 8, "day": 20, "hour": 14, "minute": 45, "name": "李四"
        }
    }
    
    response = requests.post(f"{BASE_URL}/hdcomposite", json=payload)
    print(f"合盘: {response.status_code}")
    if response.status_code == 200:
        data = response.json()
        print(f"关系类型: {data['relationship_type']}")
    return response.json()

def test_transit():
    """测试流日"""
    payload = {
        "person": {
            "year": 1990, "month": 5, "day": 15, "hour": 10, "minute": 30, "name": "张三"
        },
        "transit_date": {
            "year": 2026, "month": 1, "day": 13, "hour": 12, "minute": 0
        }
    }
    
    response = requests.post(f"{BASE_URL}/hdtransit", json=payload)
    print(f"流日: {response.status_code}")
    if response.status_code == 200:
        data = response.json()
        print(f"流日类型: {data['relationship_type']}")
    return response.json()

if __name__ == "__main__":
    print("=== 测试所有接口 ===")
    test_natal()
    test_composite()
    test_transit()
    print("=== 测试完成 ===")

注意事项

  • 人类设计基础:基于出生时刻的星体位置计算,不需要地理位置和时区
  • 时间精度:年月日时分都必须准确,影响设计层计算(出生前约88天)
  • 行星数据:每颗星包含gate(闸门)、line(线)、color(色1-6)、tone(调1-6)、base(基1-5)、longitude(黄道经度)
  • 层面区分:personality(个性化层面)展现意识层面,design(设计层面)展现潜意识层面
  • 13颗行星:Sun、Moon、true Node、Mercury、Venus、Mars、Jupiter、Saturn、Uranus、Neptune、Pluto、Earth、South Node
  • 合盘机制:包含Electromagnetic(电磁)、Dominance(支配)、Companionship(同伴)、Compromise(妥协)等通道机制
  • 流日应用:不传transit_date则自动使用当前UTC时间
  • 返回格式:所有接口均返回JSON,包含info和svg字段
  • 错误处理:无效参数返回422或500状态码,详情在detail字段
  • SVG图形:返回完整SVG代码,可直接嵌入网页或保存为.svg文件