Skip to main content
POST
https://sajuapi.dev
/
v1
/
calculations
/
saju
사주 계산
curl --request POST \
  --url https://sajuapi.dev/v1/calculations/saju \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "birth_year": 123,
  "birth_month": 123,
  "birth_day": 123,
  "birth_hour": 123,
  "gender": "<string>",
  "calendar_type": "<string>",
  "include_analysis": true
}
'
v1 Enterprise API (Coming Soon)이 엔드포인트는 Enterprise 버전에서 제공될 예정입니다. 현재는 v0 API를 사용하세요.
생년월일시를 기반으로 사주팔자(四柱八字)를 계산합니다. 이 API는 프로필을 생성하지 않고 순수한 계산 결과만 반환합니다.
프로필과 함께 사주를 저장하려면 프로필 생성 API를 사용하세요. 이 API는 일회성 계산에 적합합니다.

Request Body 파라미터

birth_year
integer
required
출생 연도입니다. 1900에서 2100 사이의 값이어야 합니다.
birth_month
integer
required
출생 월입니다. 1에서 12 사이의 값이어야 합니다.
birth_day
integer
required
출생 일입니다. 1에서 31 사이의 값이어야 합니다.
birth_hour
integer
출생 시입니다. 0에서 23 사이의 값이어야 합니다. 값을 넣지 않으면 시주(時柱) 없이 연주, 월주, 일주만 계산됩니다.
gender
string
required
성별입니다. male 또는 female 중 하나입니다. 대운(大運) 계산에 사용됩니다.
calendar_type
string
default:"solar"
달력 유형입니다. solar(양력) 또는 lunar(음력) 중 하나입니다.
include_analysis
boolean
default:"true"
상세 분석을 포함할지 여부입니다.

Response

성공

사주 계산에 성공하면 Saju 객체가 반환됩니다.

실패

상태 코드에러 타입설명
400validation_error요청 데이터가 유효하지 않음
401authentication_errorAPI 키가 유효하지 않음
429rate_limited요청 한도 초과

요청 예시

curl -X POST https://api.sajuapi.dev/v1/calculations/saju \
  -H "X-API-Key: bs_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "birth_year": 1990,
    "birth_month": 3,
    "birth_day": 15,
    "birth_hour": 14,
    "gender": "male",
    "calendar_type": "solar",
    "include_analysis": true
  }'

응답 예시

{
  "pillars": {
    "year": {
      "stem": "경",
      "stem_hanja": "庚",
      "stem_meaning": "양금(陽金)",
      "branch": "오",
      "branch_hanja": "午",
      "branch_meaning": "말",
      "element": "metal",
      "hidden_stems": ["정", "기"]
    },
    "month": {
      "stem": "기",
      "stem_hanja": "己",
      "stem_meaning": "음토(陰土)",
      "branch": "묘",
      "branch_hanja": "卯",
      "branch_meaning": "토끼",
      "element": "earth",
      "hidden_stems": ["을"]
    },
    "day": {
      "stem": "병",
      "stem_hanja": "丙",
      "stem_meaning": "양화(陽火)",
      "branch": "인",
      "branch_hanja": "寅",
      "branch_meaning": "호랑이",
      "element": "fire",
      "hidden_stems": ["갑", "병", "무"]
    },
    "hour": {
      "stem": "을",
      "stem_hanja": "乙",
      "stem_meaning": "음목(陰木)",
      "branch": "미",
      "branch_hanja": "未",
      "branch_meaning": "양",
      "element": "wood",
      "hidden_stems": ["기", "정", "을"]
    }
  },
  "day_master": {
    "stem": "병",
    "hanja": "丙",
    "name": "병화",
    "element": "fire",
    "polarity": "yang",
    "description": "태양과 같이 밝고 뜨거운 기운입니다. 열정적이고 적극적인 성격을 가집니다.",
    "characteristics": [
      "밝고 명랑한 성격",
      "리더십이 강함",
      "열정적이고 진취적",
      "자기 표현력이 뛰어남"
    ]
  },
  "elements": {
    "wood": {
      "count": 2,
      "percentage": 25,
      "stems": ["을"],
      "branches": ["묘", "인"]
    },
    "fire": {
      "count": 3,
      "percentage": 37.5,
      "stems": ["병"],
      "branches": ["오"]
    },
    "earth": {
      "count": 1,
      "percentage": 12.5,
      "stems": ["기"],
      "branches": []
    },
    "metal": {
      "count": 1,
      "percentage": 12.5,
      "stems": ["경"],
      "branches": []
    },
    "water": {
      "count": 1,
      "percentage": 12.5,
      "stems": [],
      "branches": []
    }
  },
  "element_balance": {
    "strongest": "fire",
    "weakest": "water",
    "needed": ["water", "metal"],
    "excess": ["fire"]
  },
  "ten_year_cycles": [
    {
      "age_start": 1,
      "age_end": 10,
      "stem": "경",
      "branch": "진",
      "element": "metal",
      "description": "초년운"
    },
    {
      "age_start": 11,
      "age_end": 20,
      "stem": "신",
      "branch": "사",
      "element": "metal",
      "description": "청년운"
    }
  ],
  "analysis": {
    "personality": "병화 일주는 태양처럼 밝고 따뜻한 성격을 가집니다. 자신감이 넘치고 리더십이 강하며, 다른 사람들에게 영감을 주는 능력이 있습니다.",
    "strengths": [
      "강한 리더십과 카리스마",
      "밝고 긍정적인 에너지",
      "창의력과 표현력",
      "결단력과 추진력"
    ],
    "weaknesses": [
      "지나친 자신감으로 인한 독선",
      "인내심 부족",
      "감정 기복"
    ],
    "career_advice": "창의적인 분야, 리더십이 필요한 직종, 대중을 상대하는 직업에 적합합니다.",
    "relationship_advice": "수(水) 기운이 있는 사람과의 관계가 조화롭습니다."
  }
}

Saju 객체

사주(四柱) 정보

필드타입설명
pillarsobject사주(四柱) 정보입니다.
pillars.yearobject연주(年柱)입니다. 태어난 해의 기둥입니다.
pillars.monthobject월주(月柱)입니다. 태어난 달의 기둥입니다.
pillars.dayobject일주(日柱)입니다. 태어난 날의 기둥입니다.
pillars.hourobject시주(時柱)입니다. 태어난 시간의 기둥입니다.

기둥(柱) 정보

필드타입설명
stemstring천간(天干)입니다.
stem_hanjastring천간의 한자입니다.
branchstring지지(地支)입니다.
branch_hanjastring지지의 한자입니다.
elementstring오행입니다.
hidden_stemsarray지장간(支藏干)입니다.

일주(日柱) 정보

필드타입설명
day_master.stemstring일간(日干)입니다.
day_master.namestring일간의 이름입니다.
day_master.elementstring일간의 오행입니다.
day_master.polaritystring음양입니다. yang 또는 yin입니다.
day_master.descriptionstring일간에 대한 설명입니다.

천간(天干)과 지지(地支)

천간 (10개)

천간한자오행음양
목(木)
목(木)
화(火)
화(火)
토(土)
토(土)
금(金)
금(金)
수(水)
수(水)

지지 (12개)

지지한자오행
수(水)
토(土)
호랑이목(木)
토끼목(木)
토(土)
화(火)
화(火)
토(土)
원숭이금(金)
금(金)
토(土)
돼지수(水)