{"openapi":"3.1.0","info":{"title":"YakuCheck API（訳チェック）","version":"1.0.0","description":"Japanese UI copy checks and AI translation for next-intl / i18next JSON. 認証は Authorization: Bearer ykc_live_...。check は数えず、translate・review はキーの数を数える。文字列は保存しない。","contact":{"name":"合同会社SBGG","email":"info@sbgg.jp","url":"https://sbgg.jp"}},"servers":[{"url":"https://yakucheck.com"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"ykc_live_..."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}},"Config":{"type":"object","properties":{"format":{"type":"string","enum":["auto","next-intl","i18next"]},"keySeparator":{"type":"string"},"ignoreKeys":{"type":"array","items":{"type":"string"}},"keepTerms":{"type":"array","items":{"type":"string"}},"glossary":{"type":"object","additionalProperties":{"type":"string"}},"rules":{"type":"object","additionalProperties":{"type":"string","enum":["error","warning","info","off"]}},"style":{"type":"string","enum":["auto","desu-masu","plain"]}}},"CheckRequest":{"type":"object","required":["source","target"],"properties":{"source":{"description":"source-language JSON (string or object)","oneOf":[{"type":"string"},{"type":"object"}]},"target":{"description":"Japanese JSON (string or object)","oneOf":[{"type":"string"},{"type":"object"}]},"config":{"$ref":"#/components/schemas/Config"},"roles":{"type":"object","additionalProperties":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/Role"}}}}}},"Role":{"type":"string","enum":["button","toast","error","heading","placeholder","label","link","text"]},"Issue":{"type":"object","properties":{"rule":{"type":"string","example":"JA101"},"severity":{"type":"string","enum":["error","warning","info"]},"key":{"type":"string"},"line":{"type":"integer"},"file":{"type":"string","enum":["source","target"]},"message":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}}},"suggestion":{"type":"string"}}},"Report":{"type":"object","properties":{"format":{"type":"string"},"stats":{"type":"object"},"issues":{"type":"array","items":{"$ref":"#/components/schemas/Issue"}},"roles":{"type":"object"}}},"Item":{"type":"object","required":["key","source"],"properties":{"key":{"type":"string"},"source":{"type":"string","maxLength":2000},"target":{"type":"string","maxLength":2000},"role":{"$ref":"#/components/schemas/Role"},"note":{"type":"string"}}},"AiRequest":{"type":"object","required":["items"],"properties":{"items":{"type":"array","minItems":1,"maxItems":500,"items":{"$ref":"#/components/schemas/Item"}},"format":{"type":"string","enum":["auto","next-intl","i18next"]},"glossary":{"type":"object","additionalProperties":{"type":"string"}},"keepTerms":{"type":"array","items":{"type":"string"}},"style":{"type":"string","enum":["desu-masu","plain"]},"product":{"type":"string","description":"one-line product description used as context"}}}}},"paths":{"/api/v1/ping":{"get":{"summary":"鍵の確かめ / verify key","responses":{"200":{"description":"ok"},"401":{"description":"鍵がない・正しくない / missing or invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の形が正しくない / invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"今月の上限（quota_exceeded）か、1分の回数（rate_limited）","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/usage":{"get":{"summary":"今月の回数 / usage this month","responses":{"200":{"description":"usage"},"401":{"description":"鍵がない・正しくない / missing or invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の形が正しくない / invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"今月の上限（quota_exceeded）か、1分の回数（rate_limited）","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/check":{"post":{"summary":"Key parity + Japanese UI rules (not counted, nothing stored)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckRequest"}}}},"responses":{"200":{"description":"report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Report"}}}},"401":{"description":"鍵がない・正しくない / missing or invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の形が正しくない / invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"今月の上限（quota_exceeded）か、1分の回数（rate_limited）","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/translate":{"post":{"summary":"AI translation into natural Japanese UI copy (counts keys)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiRequest"}}}},"responses":{"200":{"description":"items: [{key, ja, status: ok|needs_review|failed, issues}]","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array"},"usage":{"type":"object"}}}}}},"401":{"description":"鍵がない・正しくない / missing or invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の形が正しくない / invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"今月の上限（quota_exceeded）か、1分の回数（rate_limited）","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/review":{"post":{"summary":"AI review of existing Japanese translations in context (counts keys)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiRequest"}}}},"responses":{"200":{"description":"items: [{key, ok, suggestion, reason:{ja,en}, issues}]","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array"},"usage":{"type":"object"}}}}}},"401":{"description":"鍵がない・正しくない / missing or invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の形が正しくない / invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"今月の上限（quota_exceeded）か、1分の回数（rate_limited）","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}