{"openapi":"3.1.0","info":{"title":"Feng Shui API","version":"2.0.0","summary":"Chinese astrology and feng shui calculations over HTTP/JSON.","description":"Chinese zodiac signs and pillars, compatibility, Kua numbers, Eight Mansions, Flying Star charts and\nLu Ban ruler checks for any date from **1700-01-01 to 2300-12-31**.\n\n**Authentication** — send your API key in the `X-API-Key` header (or `Authorization: Bearer <key>`).\nCreate a free account at `/account` (or with `POST /api/v2/accounts`); the key is shown once and the e-mail address\nmust be confirmed within 7 days. Lost the key? Sign in at `/account` or call `POST /api/v2/api-keys` with your\nemail and password to issue a new one.\n\n**Errors** use [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem details (`application/problem+json`).\nValidation errors (422) list every invalid parameter in `errors`.\n\n**Rate limits** — each key has an hourly quota (1000 requests by default), advertised in the `RateLimit-Policy`\nand `RateLimit` response headers. When it is used up the API answers 429 with `Retry-After`.\n\n**Calendar data** — lunar months and the 24 solar terms are precomputed astronomically (China Standard Time, UTC+8).\n`calendar=lunar` (default) starts years at the lunar new year and months at new moons;\n`calendar=solar` starts years at Li Chun (≈4 February) and months at the 12 \"jie\" solar terms, as in Four Pillars (Ba Zi).\n","license":{"name":"MIT","identifier":"MIT"}},"servers":[{"url":"/"}],"tags":[{"name":"Zodiac","description":"Chinese zodiac signs, pillars and relationships."},{"name":"Compatibility","description":"Love and business compatibility of two zodiac signs."},{"name":"Feng Shui","description":"Kua number, Eight Mansions, Flying Star and Lu Ban ruler."},{"name":"Account","description":"Registration, API keys and account data."},{"name":"Operations","description":"Service health."}],"security":[{"ApiKeyHeader":[]},{"BearerAuth":[]}],"paths":{"/api/v2/zodiac/year":{"get":{"tags":["Zodiac"],"operationId":"getZodiacYear","summary":"Year sign and pillar","description":"Zodiac animal, element and stem–branch pillar of the Chinese year containing the date.","parameters":[{"$ref":"#/components/parameters/Date"},{"$ref":"#/components/parameters/Calendar"}],"responses":{"200":{"description":"Chinese year.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZodiacYear"},"example":{"date":"1990-06-15","calendar":"lunar","year":1990,"startsOn":"1990-01-27","endsOn":"1991-02-14","animal":"Horse","element":"Metal","polarity":"Yang","pillar":{"name":"Geng Wu","hanzi":"庚午","stem":{"pinyin":"Geng","hanzi":"庚","element":"Metal","polarity":"Yang"},"branch":{"pinyin":"Wu","hanzi":"午","animal":"Horse","element":"Fire","polarity":"Yang"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/EmailNotConfirmed"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/api/v2/zodiac/month":{"get":{"tags":["Zodiac"],"operationId":"getZodiacMonth","summary":"Month sign and pillar","description":"With `calendar=lunar` the lunar month (1–12, possibly a leap month) containing the date;\nwith `calendar=solar` the solar month opened by the preceding \"jie\" term.\n","parameters":[{"$ref":"#/components/parameters/Date"},{"$ref":"#/components/parameters/Calendar"}],"responses":{"200":{"description":"Chinese month.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZodiacMonth"},"examples":{"lunar":{"value":{"date":"1990-06-15","calendar":"lunar","startsOn":"1990-05-24","endsOn":"1990-06-22","animal":"Horse","month":5,"leap":false,"pillar":{"name":"Ren Wu","hanzi":"壬午","stem":{"pinyin":"Ren","hanzi":"壬","element":"Water","polarity":"Yang"},"branch":{"pinyin":"Wu","hanzi":"午","animal":"Horse","element":"Fire","polarity":"Yang"}}}},"solar":{"value":{"date":"1990-06-15","calendar":"solar","startsOn":"1990-06-06","endsOn":"1990-07-06","animal":"Horse","term":{"pinyin":"Mangzhong","hanzi":"芒种","english":"Grain in Ear","longitude":75,"occursAt":"1990-06-05T21:46:18Z"},"pillar":{"name":"Ren Wu","hanzi":"壬午","stem":{"pinyin":"Ren","hanzi":"壬","element":"Water","polarity":"Yang"},"branch":{"pinyin":"Wu","hanzi":"午","animal":"Horse","element":"Fire","polarity":"Yang"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/EmailNotConfirmed"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/api/v2/zodiac/day":{"get":{"tags":["Zodiac"],"operationId":"getZodiacDay","summary":"Day sign and pillar","description":"Day animal and stem–branch pillar of the sexagenary day cycle.","parameters":[{"$ref":"#/components/parameters/Date"}],"responses":{"200":{"description":"Day pillar.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZodiacDay"},"example":{"date":"2000-01-01","animal":"Horse","element":"Earth","pillar":{"name":"Wu Wu","hanzi":"戊午","stem":{"pinyin":"Wu","hanzi":"戊","element":"Earth","polarity":"Yang"},"branch":{"pinyin":"Wu","hanzi":"午","animal":"Horse","element":"Fire","polarity":"Yang"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/EmailNotConfirmed"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/api/v2/zodiac/hour":{"get":{"tags":["Zodiac"],"operationId":"getZodiacHour","summary":"Hour sign","description":"Each animal rules a two-hour period; the Rat hour spans 23:00–00:59.","parameters":[{"name":"time","in":"query","required":true,"description":"Local time of day, 24-hour clock.","schema":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","example":"14:30"}}],"responses":{"200":{"description":"Hour sign.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZodiacHour"},"example":{"time":"14:30","animal":"Goat","startsAt":"13:00","endsAt":"14:59","branch":{"pinyin":"Wei","hanzi":"未","animal":"Goat","element":"Earth","polarity":"Yin"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/EmailNotConfirmed"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/api/v2/zodiac/allies":{"get":{"tags":["Zodiac"],"operationId":"getZodiacAllies","summary":"Astrological allies","description":"The two other animals of the sign's trine — natural allies. Give either `date` or `animal`.","parameters":[{"$ref":"#/components/parameters/OptionalDate"},{"$ref":"#/components/parameters/Animal"},{"$ref":"#/components/parameters/Calendar"}],"responses":{"200":{"description":"Allies.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AnimalBasis"},{"type":"object","required":["allies"],"properties":{"allies":{"type":"array","items":{"$ref":"#/components/schemas/AnimalName"},"minItems":2,"maxItems":2}}}]},"example":{"animal":"Horse","allies":["Dog","Tiger"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/EmailNotConfirmed"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/api/v2/zodiac/enemy":{"get":{"tags":["Zodiac"],"operationId":"getZodiacEnemy","summary":"Astrological enemy","description":"The directly opposite (clashing) animal. Give either `date` or `animal`.","parameters":[{"$ref":"#/components/parameters/OptionalDate"},{"$ref":"#/components/parameters/Animal"},{"$ref":"#/components/parameters/Calendar"}],"responses":{"200":{"description":"Enemy.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AnimalBasis"},{"type":"object","required":["enemy"],"properties":{"enemy":{"$ref":"#/components/schemas/AnimalName"}}}]},"example":{"animal":"Horse","enemy":"Rat"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/EmailNotConfirmed"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/api/v2/zodiac/secret-friend":{"get":{"tags":["Zodiac"],"operationId":"getZodiacSecretFriend","summary":"Secret friend","description":"The animal forming a \"six harmonies\" pair with the sign. Give either `date` or `animal`.","parameters":[{"$ref":"#/components/parameters/OptionalDate"},{"$ref":"#/components/parameters/Animal"},{"$ref":"#/components/parameters/Calendar"}],"responses":{"200":{"description":"Secret friend.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AnimalBasis"},{"type":"object","required":["secretFriend"],"properties":{"secretFriend":{"$ref":"#/components/schemas/AnimalName"}}}]},"example":{"animal":"Horse","secretFriend":"Goat"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/EmailNotConfirmed"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/api/v2/zodiac/peach-blossom":{"get":{"tags":["Zodiac"],"operationId":"getZodiacPeachBlossom","summary":"Peach Blossom animal","description":"The Peach Blossom (romance luck) animal of the sign's trine and its compass direction. Give either `date` or `animal`.","parameters":[{"$ref":"#/components/parameters/OptionalDate"},{"$ref":"#/components/parameters/Animal"},{"$ref":"#/components/parameters/Calendar"}],"responses":{"200":{"description":"Peach Blossom animal.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AnimalBasis"},{"type":"object","required":["peachBlossom"],"properties":{"peachBlossom":{"type":"object","required":["animal","direction"],"properties":{"animal":{"$ref":"#/components/schemas/AnimalName"},"direction":{"type":"string","enum":["N","E","S","W"]}}}}}]},"example":{"animal":"Horse","peachBlossom":{"animal":"Rabbit","direction":"E"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/EmailNotConfirmed"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/api/v2/compatibility/{type}":{"get":{"tags":["Compatibility"],"operationId":"getCompatibility","summary":"Love or business compatibility","description":"Scores two people (or two animals) from 1 (challenging) to 4 (excellent).\nFor each person give either `date1`/`date2` or `animal1`/`animal2`.\n","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["love","business"]}},{"name":"date1","in":"query","schema":{"$ref":"#/components/schemas/Date"},"description":"First person's birth date."},{"name":"animal1","in":"query","schema":{"$ref":"#/components/schemas/AnimalName"},"description":"First person's animal (instead of date1)."},{"name":"date2","in":"query","schema":{"$ref":"#/components/schemas/Date"},"description":"Second person's birth date."},{"name":"animal2","in":"query","schema":{"$ref":"#/components/schemas/AnimalName"},"description":"Second person's animal (instead of date2)."},{"$ref":"#/components/parameters/Calendar"}],"responses":{"200":{"description":"Compatibility score.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Compatibility"},"example":{"type":"love","calendar":"lunar","first":{"date":"1990-06-15","animal":"Horse"},"second":{"animal":"Tiger"},"score":4,"maxScore":4,"rating":"excellent"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/EmailNotConfirmed"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/api/v2/feng-shui/kua":{"get":{"tags":["Feng Shui"],"operationId":"getKua","summary":"Kua number and personal directions","description":"Personal Kua (Gua) number, East/West group and the four favourable and four unfavourable directions (Eight Mansions).\nA Luo Shu number of 5 becomes Kua 2 for men and 8 for women.\n","parameters":[{"$ref":"#/components/parameters/Date"},{"name":"gender","in":"query","required":true,"schema":{"type":"string","enum":["male","female"]}},{"$ref":"#/components/parameters/Calendar"}],"responses":{"200":{"description":"Kua number.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Kua"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/EmailNotConfirmed"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/api/v2/feng-shui/eight-mansions":{"get":{"tags":["Feng Shui"],"operationId":"getEightMansions","summary":"Eight Mansions house chart","description":"The house trigram (from the sitting direction) and the star of each of the eight sectors.","parameters":[{"name":"facing","in":"query","required":true,"description":"Facing direction of the building — a compass bearing in degrees (0 ≤ facing < 360) or N, NE, E, SE, S, SW, W, NW.","schema":{"oneOf":[{"type":"number","minimum":0,"exclusiveMaximum":360},{"type":"string","enum":["N","NE","E","SE","S","SW","W","NW"]}]},"example":180}],"responses":{"200":{"description":"Eight Mansions chart.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EightMansions"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/EmailNotConfirmed"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/api/v2/feng-shui/flying-star":{"get":{"tags":["Feng Shui"],"operationId":"getFlyingStar","summary":"Flying Star (Xuan Kong) chart","description":"Natal Flying Star chart with base, mountain and water stars for the nine palaces and the classical chart type.\nGive the 20-year `period` (1–9; period 9 = 2024–2043) or the `constructionYear`. Replacement (Ti Gua) charts are not computed;\n`facing.nearMountainBoundary` flags bearings within 3° of a mountain boundary where they may apply.\n","parameters":[{"name":"facing","in":"query","required":true,"description":"Facing direction — a bearing in degrees (0 ≤ facing < 360), a mountain code (N1 … NW3) or a mountain name (Ren, Zi, Gui …).","schema":{"oneOf":[{"type":"number","minimum":0,"exclusiveMaximum":360},{"type":"string","pattern":"^(N|NE|E|SE|S|SW|W|NW)[123]$"},{"type":"string","description":"Mountain name in pinyin."}]},"example":0},{"name":"period","in":"query","description":"Construction period 1–9 (exclusive with constructionYear).","schema":{"type":"integer","minimum":1,"maximum":9}},{"name":"constructionYear","in":"query","description":"Year the building was completed (exclusive with period).","schema":{"type":"integer","minimum":1700,"maximum":2300}}],"responses":{"200":{"description":"Flying Star chart.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlyingStar"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/EmailNotConfirmed"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/api/v2/feng-shui/lucky-dimension":{"get":{"tags":["Feng Shui"],"operationId":"getLuckyDimension","summary":"Lu Ban ruler check","description":"Whether a length is auspicious on the Lu Ban ruler (432 mm cycle of eight 54 mm sections).\nInauspicious lengths come with the nearest auspicious ranges (from inclusive, to exclusive, in mm).\n","parameters":[{"name":"length","in":"query","required":true,"schema":{"type":"number","exclusiveMinimum":0},"example":85},{"name":"unit","in":"query","schema":{"type":"string","enum":["mm","cm","in"],"default":"mm"}}],"responses":{"200":{"description":"Lu Ban measurement.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LuckyDimension"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/EmailNotConfirmed"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/api/v2/accounts":{"post":{"tags":["Account"],"operationId":"createAccount","summary":"Create an account","description":"Registers a free account and returns its API key. The key is shown only once — store it safely.\nWe e-mail a confirmation link; confirm within 7 days to keep the key active. Accounts can also be created,\nmanaged and deleted on the website at /account.\n","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Registration"}}}},"responses":{"201":{"description":"Account created.","headers":{"Location":{"schema":{"type":"string"},"description":"URL of the account resource."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssuedKey"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"409":{"$ref":"#/components/responses/Conflict"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/api/v2/api-keys":{"post":{"tags":["Account"],"operationId":"createApiKey","summary":"Issue a new API key","description":"Replaces the account's API key; the previous key stops working immediately.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credentials"}}}},"responses":{"201":{"description":"New key issued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssuedKey"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/api/v2/me":{"get":{"tags":["Account"],"operationId":"getMe","summary":"Current account","description":"Verifies the API key and returns the account with its current quota.","responses":{"200":{"description":"Account.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"delete":{"tags":["Account"],"operationId":"deleteMe","summary":"Delete the account","description":"Permanently deletes the account and all data stored about it. The API key stops working.","responses":{"204":{"description":"Account deleted."},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/health":{"get":{"tags":["Operations"],"operationId":"getHealth","summary":"Health check","security":[],"responses":{"200":{"description":"The service and its database are available.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"ok"}}}}}},"503":{"description":"The database is unavailable."}}}}},"components":{"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"},"BearerAuth":{"type":"http","scheme":"bearer","description":"The same API key sent as a bearer token."}},"parameters":{"Date":{"name":"date","in":"query","required":true,"description":"Gregorian date between 1700-01-01 and 2300-12-31.","schema":{"$ref":"#/components/schemas/Date"}},"OptionalDate":{"name":"date","in":"query","description":"Birth date (required unless `animal` is given).","schema":{"$ref":"#/components/schemas/Date"}},"Animal":{"name":"animal","in":"query","description":"Zodiac animal, case-insensitive (instead of `date`).","schema":{"$ref":"#/components/schemas/AnimalName"}},"Calendar":{"name":"calendar","in":"query","description":"`lunar` — years start at the lunar new year; `solar` — years start at Li Chun (≈4 Feb).","schema":{"type":"string","enum":["lunar","solar"],"default":"lunar"}}},"headers":{"RateLimitPolicy":{"description":"Quota policy (draft-ietf-httpapi-ratelimit-headers), e.g. `\"hourly\";q=1000;w=3600`.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining requests and seconds until more are available, e.g. `\"hourly\";r=998;t=0`.","schema":{"type":"string"}}},"responses":{"BadRequest":{"description":"Malformed request body.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"Unauthorized":{"description":"Missing or invalid API key (or credentials).","headers":{"WWW-Authenticate":{"schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"EmailNotConfirmed":{"description":"The account's e-mail address was not confirmed within 7 days of registration; the key is paused until it is.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"NotFound":{"description":"No such endpoint.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"Conflict":{"description":"An account with this email already exists.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"UnsupportedMediaType":{"description":"The body is not sent as application/json.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"ValidationError":{"description":"One or more parameters are invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblem"},"example":{"type":"about:blank","title":"Unprocessable Content","status":422,"detail":"One or more parameters are invalid.","errors":[{"parameter":"date","message":"Must be a valid date in YYYY-MM-DD format."}]}}}},"TooManyRequests":{"description":"Quota exhausted.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"schemas":{"Date":{"type":"string","format":"date","example":"1990-06-15"},"AnimalName":{"type":"string","enum":["Rat","Ox","Tiger","Rabbit","Dragon","Snake","Horse","Goat","Monkey","Rooster","Dog","Pig"]},"Element":{"type":"string","enum":["Wood","Fire","Earth","Metal","Water"]},"Polarity":{"type":"string","enum":["Yang","Yin"]},"CalendarName":{"type":"string","enum":["lunar","solar"]},"Direction":{"type":"string","enum":["N","NE","E","SE","S","SW","W","NW"]},"Problem":{"type":"object","description":"RFC 9457 problem details.","required":["type","title","status"],"properties":{"type":{"type":"string","example":"about:blank"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"}}},"ValidationProblem":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["errors"],"properties":{"errors":{"type":"array","items":{"type":"object","required":["parameter","message"],"properties":{"parameter":{"type":"string"},"message":{"type":"string"}}}}}}]},"Stem":{"type":"object","required":["pinyin","hanzi","element","polarity"],"properties":{"pinyin":{"type":"string","example":"Geng"},"hanzi":{"type":"string","example":"庚"},"element":{"$ref":"#/components/schemas/Element"},"polarity":{"$ref":"#/components/schemas/Polarity"}}},"Branch":{"type":"object","required":["pinyin","hanzi","animal","element","polarity"],"properties":{"pinyin":{"type":"string","example":"Wu"},"hanzi":{"type":"string","example":"午"},"animal":{"$ref":"#/components/schemas/AnimalName"},"element":{"$ref":"#/components/schemas/Element"},"polarity":{"$ref":"#/components/schemas/Polarity"}}},"Pillar":{"type":"object","required":["name","hanzi","stem","branch"],"properties":{"name":{"type":"string","example":"Geng Wu"},"hanzi":{"type":"string","example":"庚午"},"stem":{"$ref":"#/components/schemas/Stem"},"branch":{"$ref":"#/components/schemas/Branch"}}},"ZodiacYear":{"type":"object","required":["date","calendar","year","startsOn","endsOn","animal","element","polarity","pillar"],"properties":{"date":{"$ref":"#/components/schemas/Date"},"calendar":{"$ref":"#/components/schemas/CalendarName"},"year":{"type":"integer","description":"Gregorian year in which the Chinese year began."},"startsOn":{"$ref":"#/components/schemas/Date"},"endsOn":{"$ref":"#/components/schemas/Date"},"animal":{"$ref":"#/components/schemas/AnimalName"},"element":{"$ref":"#/components/schemas/Element"},"polarity":{"$ref":"#/components/schemas/Polarity"},"pillar":{"$ref":"#/components/schemas/Pillar"}}},"ZodiacMonth":{"type":"object","required":["date","calendar","startsOn","endsOn","animal","pillar"],"properties":{"date":{"$ref":"#/components/schemas/Date"},"calendar":{"$ref":"#/components/schemas/CalendarName"},"startsOn":{"$ref":"#/components/schemas/Date"},"endsOn":{"$ref":"#/components/schemas/Date"},"animal":{"$ref":"#/components/schemas/AnimalName"},"pillar":{"$ref":"#/components/schemas/Pillar"},"month":{"type":"integer","minimum":1,"maximum":12,"description":"Lunar month number (lunar calendar only)."},"leap":{"type":"boolean","description":"Whether it is a leap (intercalary) month (lunar calendar only)."},"term":{"type":"object","description":"Solar term that opened the month (solar calendar only).","properties":{"pinyin":{"type":"string"},"hanzi":{"type":"string"},"english":{"type":"string"},"longitude":{"type":"integer","description":"Apparent solar longitude in degrees."},"occursAt":{"type":"string","format":"date-time"}}}}},"ZodiacDay":{"type":"object","required":["date","animal","element","pillar"],"properties":{"date":{"$ref":"#/components/schemas/Date"},"animal":{"$ref":"#/components/schemas/AnimalName"},"element":{"$ref":"#/components/schemas/Element"},"pillar":{"$ref":"#/components/schemas/Pillar"}}},"ZodiacHour":{"type":"object","required":["time","animal","branch","startsAt","endsAt"],"properties":{"time":{"type":"string"},"animal":{"$ref":"#/components/schemas/AnimalName"},"branch":{"$ref":"#/components/schemas/Branch"},"startsAt":{"type":"string","example":"13:00"},"endsAt":{"type":"string","example":"14:59"}}},"AnimalBasis":{"type":"object","required":["animal"],"properties":{"date":{"$ref":"#/components/schemas/Date"},"calendar":{"$ref":"#/components/schemas/CalendarName"},"animal":{"$ref":"#/components/schemas/AnimalName"}}},"Compatibility":{"type":"object","required":["type","calendar","first","second","score","maxScore","rating"],"properties":{"type":{"type":"string","enum":["love","business"]},"calendar":{"$ref":"#/components/schemas/CalendarName"},"first":{"$ref":"#/components/schemas/AnimalBasis"},"second":{"$ref":"#/components/schemas/AnimalBasis"},"score":{"type":"integer","minimum":1,"maximum":4},"maxScore":{"type":"integer","const":4},"rating":{"type":"string","enum":["challenging","average","good","excellent"]}}},"Trigram":{"type":"object","required":["name","hanzi","element","group"],"properties":{"name":{"type":"string","enum":["Kan","Kun","Zhen","Xun","Qian","Dui","Gen","Li"]},"hanzi":{"type":"string"},"element":{"$ref":"#/components/schemas/Element"},"group":{"type":"string","enum":["East","West"]}}},"MansionStar":{"type":"object","required":["star","hanzi","meaning"],"properties":{"direction":{"$ref":"#/components/schemas/Direction"},"star":{"type":"string","enum":["Sheng Qi","Tian Yi","Yan Nian","Fu Wei","Huo Hai","Wu Gui","Liu Sha","Jue Ming"]},"hanzi":{"type":"string"},"auspicious":{"type":"boolean"},"meaning":{"type":"string"}}},"Kua":{"type":"object","required":["date","gender","calendar","chineseYear","kua","luoShuNumber","group","trigram","favorableDirections","unfavorableDirections"],"properties":{"date":{"$ref":"#/components/schemas/Date"},"gender":{"type":"string","enum":["male","female"]},"calendar":{"$ref":"#/components/schemas/CalendarName"},"chineseYear":{"type":"integer"},"kua":{"type":"integer","enum":[1,2,3,4,6,7,8,9]},"luoShuNumber":{"type":"integer","minimum":1,"maximum":9},"group":{"type":"string","enum":["East","West"]},"trigram":{"$ref":"#/components/schemas/Trigram"},"favorableDirections":{"type":"array","items":{"$ref":"#/components/schemas/MansionStar"},"minItems":4,"maxItems":4},"unfavorableDirections":{"type":"array","items":{"$ref":"#/components/schemas/MansionStar"},"minItems":4,"maxItems":4}}},"EightMansions":{"type":"object","required":["facing","sitting","house","sectors"],"properties":{"facing":{"type":"object","required":["direction"],"properties":{"direction":{"$ref":"#/components/schemas/Direction"},"degrees":{"type":"number"}}},"sitting":{"$ref":"#/components/schemas/Direction"},"house":{"$ref":"#/components/schemas/Trigram"},"sectors":{"type":"object","description":"Star of each direction, keyed N, NE, E, SE, S, SW, W, NW.","additionalProperties":{"$ref":"#/components/schemas/MansionStar"}}}},"Mountain":{"type":"object","required":["code","pinyin","hanzi","palace","fromDegrees","toDegrees"],"properties":{"code":{"type":"string","example":"N1"},"pinyin":{"type":"string","example":"Ren"},"hanzi":{"type":"string","example":"壬"},"palace":{"$ref":"#/components/schemas/Direction"},"fromDegrees":{"type":"number"},"toDegrees":{"type":"number"},"degrees":{"type":"number","description":"The requested bearing."},"nearMountainBoundary":{"type":"boolean"}}},"PalaceStars":{"type":"object","required":["base","mountain","water"],"properties":{"base":{"type":"integer","minimum":1,"maximum":9},"mountain":{"type":"integer","minimum":1,"maximum":9},"water":{"type":"integer","minimum":1,"maximum":9}}},"FlyingStar":{"type":"object","required":["period","periodYears","facing","sitting","chart","mountainFlight","waterFlight","chartType"],"properties":{"period":{"type":"integer","minimum":1,"maximum":9},"periodYears":{"type":"object","properties":{"from":{"type":"integer"},"to":{"type":"integer"}}},"constructionYear":{"type":"integer"},"facing":{"$ref":"#/components/schemas/Mountain"},"sitting":{"$ref":"#/components/schemas/Mountain"},"chart":{"type":"object","description":"Stars of the nine palaces, keyed NW, N, NE, W, C, E, SW, S, SE.","additionalProperties":{"$ref":"#/components/schemas/PalaceStars"}},"mountainFlight":{"type":"string","enum":["forward","backward"]},"waterFlight":{"type":"string","enum":["forward","backward"]},"chartType":{"type":"object","properties":{"name":{"type":"string","enum":["Wang Shan Wang Xiang","Shuang Xing Dao Xiang","Shuang Xing Dao Zuo","Shang Shan Xia Shui"]},"description":{"type":"string"}}}}},"LengthRange":{"type":"object","properties":{"fromMm":{"type":"integer"},"toMm":{"type":"integer"}}},"LuckyDimension":{"type":"object","required":["length","unit","lengthMm","auspicious","ruler","section","positionInCycleMm"],"properties":{"length":{"type":"number"},"unit":{"type":"string","enum":["mm","cm","in"]},"lengthMm":{"type":"number"},"auspicious":{"type":"boolean"},"ruler":{"type":"object","properties":{"name":{"type":"string"},"cycleMm":{"type":"integer"},"sectionMm":{"type":"integer"}}},"section":{"type":"object","properties":{"index":{"type":"integer","minimum":1,"maximum":8},"pinyin":{"type":"string"},"hanzi":{"type":"string"},"meaning":{"type":"string"},"auspicious":{"type":"boolean"}}},"positionInCycleMm":{"type":"number"},"alternatives":{"type":["object","null"],"description":"Nearest auspicious ranges when the length is inauspicious.","properties":{"shorter":{"$ref":"#/components/schemas/LengthRange"},"longer":{"$ref":"#/components/schemas/LengthRange"}}}}},"Registration":{"type":"object","required":["name","email","password"],"properties":{"name":{"type":"string","maxLength":100},"email":{"type":"string","format":"email","maxLength":180},"password":{"type":"string","minLength":10,"description":"Used only to issue a new API key if you lose it."},"useCase":{"type":"string","maxLength":1000,"description":"What you are building (optional)."}}},"Credentials":{"type":"object","required":["email","password"],"properties":{"email":{"type":"string","format":"email"},"password":{"type":"string"}}},"Account":{"type":"object","required":["name","email","emailVerified","apiKeyPrefix","apiKeyIssuedAt","createdAt"],"properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"},"emailVerified":{"type":"boolean","description":"Whether the e-mail address has been confirmed via the link we sent."},"emailVerificationDeadline":{"type":["string","null"],"format":"date-time","description":"Until when the key works without confirmation (null once confirmed)."},"useCase":{"type":["string","null"]},"apiKeyPrefix":{"type":"string","description":"First characters of the current key."},"apiKeyIssuedAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"}}},"IssuedKey":{"type":"object","required":["apiKey","account"],"properties":{"apiKey":{"type":"string","description":"Shown only once. Format: fsk_ + 48 hex characters."},"account":{"$ref":"#/components/schemas/Account"}}},"Me":{"allOf":[{"$ref":"#/components/schemas/Account"},{"type":"object","properties":{"rateLimit":{"type":"object","properties":{"limit":{"type":"integer"},"remaining":{"type":"integer"},"windowSeconds":{"type":"integer"}}}}}]}}}}