{"openapi":"3.1.0","info":{"title":"MG Legal Check API","version":"1.0.0","description":"Баримт бичигт дурдагдсан Монгол Улсын хууль, зүйл, заалтыг илрүүлж legalinfo.mn-тэй холбох, эх бичвэртэй тулгах, AI эрх зүйн шинжилгээ хийх API. AI шинжилгээ: 20,000 тэмдэгт тутамд 1 AI нэгж. Баримтын текстийг хадгалахгүй. AI-ийн дүгнэлт нь хуульчийн мэргэжлийн зөвлөгөө биш.","contact":{"name":"МКГТО Софт Трейдинг ХХК","email":"info@mg-quant.tech","url":"https://legalcheck.mg-quant.tech/developers"}},"servers":[{"url":"https://legalcheck.mg-quant.tech"}],"security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"paths":{"/api/v1/check":{"post":{"operationId":"checkCitations","summary":"Хуулийн ишлэлийн шалгалт (AI-гүй)","description":"Хууль, зүйл, заалтыг илрүүлж legalinfo.mn-тэй холбоно, эх бичвэр хадгалагдсан хуулиудын заалтыг тулгана. 1 шалгалт хасна.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextRequest"},"example":{"text":"Ажилтныг Хөдөлмөрийн тухай хуулийн 80.1-д заасны дагуу 3 сарын туршилтын хугацаатай ажилд авна. Гэрээг цуцлахад Иргэний хуулийн 243.1 дэх заалтыг баримтална."}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/FileRequest"}}}},"responses":{"200":{"description":"Амжилттай","headers":{"X-Request-Id":{"schema":{"type":"string"}},"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Минутад зөвшөөрөх хүсэлт"},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Дараагийн минутын цонх хүртэлх секунд"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckResponse"},"example":{"requestId":"req_Q2xh3mF0aZk1","object":"check","chars":157,"extraction":{"laws":[{"law":{"lawId":"299","title":"ИРГЭНИЙ ХУУЛЬ","url":"https://legalinfo.mn/mn/detail?lawId=299","enacted":"2002-01-10","enforced":"2002-02-05","kind":"law","role":"main"},"alternates":[],"mentions":[{"start":112,"end":127,"text":"Иргэний хуулийн","lawId":"299","articles":["243.1"],"confidence":"high"}],"articles":["243.1"],"officialText":{"updatedAt":"2026-10-16"},"citations":[{"article":"243.1","key":"243.1","status":"ok","articleTitle":"Худалдах-худалдан авах гэрээ","text":"Худалдах-худалдан авах гэрээгээр худалдагч нь биет байдлын доголдолгүй, эрхийн зөрчилгүй хөрөнгө… (товчилсон)"}]},{"law":{"lawId":"16230709635751","title":"ХӨДӨЛМӨРИЙН ТУХАЙ /Шинэчилсэн найруулга/","url":"https://legalinfo.mn/mn/detail?lawId=16230709635751","enacted":"2021-07-02","enforced":"2022-01-01","kind":"law","role":"main"},"alternates":[],"mentions":[{"start":9,"end":34,"text":"Хөдөлмөрийн тухай хуулийн","lawId":"16230709635751","articles":["80.1"],"confidence":"high"}],"articles":["80.1"],"officialText":{"updatedAt":"2026-10-16"},"citations":[{"article":"80.1","key":"80.1","status":"ok","articleTitle":"Хөдөлмөр эрхлэлтийн харилцааг ажил олгогчийн санаачилгаар цуцлах","text":"Хөдөлмөр эрхлэлтийн харилцааг дараах үндэслэлээр ажил олгогчийн санаачилгаар цуцалж болно:"}]}],"otherActs":[],"selfRefs":[],"stats":{"chars":157,"words":19,"mentions":2}},"usage":{"checks":1,"checksLeft":2999,"unitsLeft":150}}}}},"400":{"description":"Бие буруу, текст хоосон, файл уншигдсангүй","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Түлхүүр байхгүй / буруу","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Багц идэвхгүй эсвэл үлдэгдэл хүрэлцэхгүй","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"requestId":"req_3nW8cHt5rY0a","error":{"code":"insufficient_units","message":"AI нэгж хүрэлцэхгүй байна: шаардлагатай 3, үлдсэн 1. Нэмэлт нэгж авна уу."}}}}},"413":{"description":"Текст эсвэл файл хэт том","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Дэмжигдээгүй файл / Content-Type","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Минутын хязгаар хэтэрсэн (rate_limited) эсвэл зэрэг хүсэлт олон (busy)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"AI алдаа — нэгж хасагдаагүй, дахин оролдоно","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Үйлчилгээ түр ажиллахгүй","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/analyze":{"post":{"operationId":"analyzeDocument","summary":"Ишлэлийн шалгалт + AI эрх зүйн шинжилгээ","description":"AI-д 100 000 тэмдэгт хүртэл илгээнэ; хасагдах нэгж = ceil(aiChars / 20 000). Хариу 30–120 секунд үргэлжилж болно — клиентийн timeout-ийг ≥310 секунд тавина. AI алдаа гарвал нэгжийг буцаана.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextRequest"},"example":{"text":"Ажилтныг Хөдөлмөрийн тухай хуулийн 80.1-д заасны дагуу 3 сарын туршилтын хугацаатай ажилд авна. Гэрээг цуцлахад Иргэний хуулийн 243.1 дэх заалтыг баримтална."}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/FileRequest"}}}},"responses":{"200":{"description":"Амжилттай","headers":{"X-Request-Id":{"schema":{"type":"string"}},"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Минутад зөвшөөрөх хүсэлт"},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Дараагийн минутын цонх хүртэлх секунд"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisResponse"},"example":{"requestId":"req_7bKp0sYwLm2e","object":"analysis","chars":157,"aiChars":157,"extraction":{"laws":[{"law":{"lawId":"299","title":"ИРГЭНИЙ ХУУЛЬ","url":"https://legalinfo.mn/mn/detail?lawId=299","enacted":"2002-01-10","enforced":"2002-02-05","kind":"law","role":"main"},"alternates":[],"mentions":[{"start":112,"end":127,"text":"Иргэний хуулийн","lawId":"299","articles":["243.1"],"confidence":"high"}],"articles":["243.1"],"officialText":{"updatedAt":"2026-10-16"},"citations":[{"article":"243.1","key":"243.1","status":"ok","articleTitle":"Худалдах-худалдан авах гэрээ","text":"Худалдах-худалдан авах гэрээгээр худалдагч нь биет байдлын доголдолгүй, эрхийн зөрчилгүй хөрөнгө… (товчилсон)"}]},{"law":{"lawId":"16230709635751","title":"ХӨДӨЛМӨРИЙН ТУХАЙ /Шинэчилсэн найруулга/","url":"https://legalinfo.mn/mn/detail?lawId=16230709635751","enacted":"2021-07-02","enforced":"2022-01-01","kind":"law","role":"main"},"alternates":[],"mentions":[{"start":9,"end":34,"text":"Хөдөлмөрийн тухай хуулийн","lawId":"16230709635751","articles":["80.1"],"confidence":"high"}],"articles":["80.1"],"officialText":{"updatedAt":"2026-10-16"},"citations":[{"article":"80.1","key":"80.1","status":"ok","articleTitle":"Хөдөлмөр эрхлэлтийн харилцааг ажил олгогчийн санаачилгаар цуцлах","text":"Хөдөлмөр эрхлэлтийн харилцааг дараах үндэслэлээр ажил олгогчийн санаачилгаар цуцалж болно:"}]}],"otherActs":[],"selfRefs":[],"stats":{"chars":157,"words":19,"mentions":2}},"ai":{"model":"mg-legal-ai-1","documentType":"Хөдөлмөрийн гэрээ","summary":"Ажилтныг туршилтын хугацаатай ажилд авах болон гэрээг цуцлах нөхцлийг тусгасан хөдөлмөрийн гэрээний хэсэг.","legalAreas":["Хөдөлмөрийн эрх зүй"],"issues":[{"title":"Хөдөлмөрийн гэрээ цуцлахад Иргэний хуулийг иш татсан","description":"Иргэний хуулийн 243.1 нь худалдах-худалдан авах гэрээг тодорхойлдог. Хөдөлмөрийн гэрээг цуцлах үндэслэл, журмыг Хөдөлмөрийн тухай хууль зохицуулна.","severity":"high","relatedLaws":[{"title":"ХӨДӨЛМӨРИЙН ТУХАЙ /Шинэчилсэн найруулга/","law":{"lawId":"16230709635751","title":"ХӨДӨЛМӨРИЙН ТУХАЙ /Шинэчилсэн найруулга/","url":"https://legalinfo.mn/mn/detail?lawId=16230709635751","enacted":"2021-07-02","enforced":"2022-01-01","kind":"law","role":"main"}},{"title":"ИРГЭНИЙ ХУУЛЬ","law":{"lawId":"299","title":"ИРГЭНИЙ ХУУЛЬ","url":"https://legalinfo.mn/mn/detail?lawId=299","enacted":"2002-01-10","enforced":"2002-02-05","kind":"law","role":"main"}}],"articles":["243.1"],"quote":"Гэрээг цуцлахад Иргэний хуулийн 243.1 дэх заалтыг баримтална","recommendation":"Цуцлах нөхцлийг Хөдөлмөрийн тухай хуулийн холбогдох зүйл, заалтаар тусгана уу."},{"title":"Туршилтын хугацааг цуцлах заалтаар иш татсан","description":"Хөдөлмөрийн тухай хуулийн 80.1 нь ажил олгогчийн санаачилгаар цуцлах үндэслэлийг зохицуулдаг, туршилтын хугацааны тухай биш.","severity":"medium","relatedLaws":[{"title":"ХӨДӨЛМӨРИЙН ТУХАЙ /Шинэчилсэн найруулга/","law":{"lawId":"16230709635751","title":"ХӨДӨЛМӨРИЙН ТУХАЙ /Шинэчилсэн найруулга/","url":"https://legalinfo.mn/mn/detail?lawId=16230709635751","enacted":"2021-07-02","enforced":"2022-01-01","kind":"law","role":"main"}}],"articles":["80.1"],"quote":"Хөдөлмөрийн тухай хуулийн 80.1-д заасны дагуу 3 сарын туршилтын хугацаатай","recommendation":"Туршилтын хугацааг зохицуулсан зүйл, заалтыг иш татна уу."}],"impliedLaws":[{"title":"НИЙГМИЙН ДААТГАЛЫН ЕРӨНХИЙ ХУУЛЬ","reason":"Ажилтныг ажилд авсанаар ажил олгогч нийгмийн даатгалд хамруулах үүрэг хүлээнэ.","articles":[],"law":{"lawId":"16760148379551","title":"НИЙГМИЙН ДААТГАЛЫН ЕРӨНХИЙ ХУУЛЬ /Шинэчилсэн найруулга/","url":"https://legalinfo.mn/mn/detail?lawId=16760148379551","enacted":"2023-07-07","enforced":"2024-01-01","kind":"law","role":"main"}}],"truncated":false,"disclaimer":"Энэхүү шинжилгээг хиймэл оюун (AI) автоматаар үүсгэсэн бөгөөд хуульчийн мэргэжлийн зөвлөгөө биш. Эцсийн шийдвэр гаргахдаа legalinfo.mn дээрх албан ёсны эх бичвэр болон хуульчтай зөвлөлдөнө үү."},"usage":{"units":1,"unitsLeft":149,"checksLeft":3000}}}}},"400":{"description":"Бие буруу, текст хоосон, файл уншигдсангүй","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Түлхүүр байхгүй / буруу","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Багц идэвхгүй эсвэл үлдэгдэл хүрэлцэхгүй","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"requestId":"req_3nW8cHt5rY0a","error":{"code":"insufficient_units","message":"AI нэгж хүрэлцэхгүй байна: шаардлагатай 3, үлдсэн 1. Нэмэлт нэгж авна уу."}}}}},"413":{"description":"Текст эсвэл файл хэт том","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Дэмжигдээгүй файл / Content-Type","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Минутын хязгаар хэтэрсэн (rate_limited) эсвэл зэрэг хүсэлт олон (busy)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"AI алдаа — нэгж хасагдаагүй, дахин оролдоно","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Үйлчилгээ түр ажиллахгүй","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/usage":{"get":{"operationId":"getUsage","summary":"Багц, үлдэгдэл, хязгаар (квот хасахгүй)","responses":{"200":{"description":"Амжилттай","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageResponse"},"example":{"requestId":"req_Vd1oPq8nX4tc","object":"usage","plan":{"active":true,"id":"api_business","name":"API Business","expiresAt":"2026-11-20T10:00:00.000Z","daysLeft":30},"units":{"left":488,"total":500,"used":12},"checks":{"left":19840,"total":20000,"used":160},"limits":{"requestsPerMinute":60,"maxChars":300000,"aiMaxChars":100000,"unitChars":20000,"maxFileMb":15},"key":{"name":"HR систем — production","preview":"mlc_live_7Hq2…x9Lm"}}}}},"401":{"description":"Түлхүүр байхгүй / буруу","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key","description":"mlc_live_… түлхүүр (/developers-ээс үүсгэнэ)"},"BearerKey":{"type":"http","scheme":"bearer","description":"Authorization: Bearer mlc_live_…"}},"schemas":{"LawRef":{"type":"object","properties":{"lawId":{"type":"string","description":"legalinfo.mn lawId"},"title":{"type":"string","description":"Албан ёсны нэр"},"url":{"type":"string","format":"uri"},"enacted":{"type":"string","description":"Батлагдсан огноо YYYY-MM-DD"},"enforced":{"type":"string","description":"Дагаж мөрдөх огноо YYYY-MM-DD"},"kind":{"type":"string","enum":["law","constitution"]},"role":{"type":"string","enum":["main","amendment","transition","repeal","other"]}},"required":["lawId","title","url","enacted","enforced","kind","role"]},"Mention":{"type":"object","properties":{"start":{"type":"integer","description":"Текст дэх эхлэх байрлал (тэмдэгт)"},"end":{"type":"integer","description":"Дуусах байрлал (орохгүй)"},"text":{"type":"string"},"lawId":{"type":"string"},"articles":{"type":"array","items":{"type":"string"}},"confidence":{"type":"string","enum":["high","medium"]}},"required":["start","end","text","lawId","articles","confidence"]},"CitationCheck":{"type":"object","properties":{"article":{"type":"string","description":"Баримт дахь бичлэг"},"key":{"type":"string","description":"Эх бичвэрийн түлхүүр"},"status":{"type":"string","enum":["ok","not_found","repealed","repeal_scheduled","amend_pending","not_yet_effective","expired"]},"articleTitle":{"type":"string"},"text":{"type":"string","description":"Заалтын албан ёсны эх бичвэр (богиносгосон)"},"date":{"type":"string","description":"YYYY-MM-DD"},"note":{"type":"string"}},"required":["article","key","status"]},"FoundLaw":{"type":"object","properties":{"law":{"$ref":"#/components/schemas/LawRef"},"alternates":{"type":"array","items":{"$ref":"#/components/schemas/LawRef"}},"mentions":{"type":"array","items":{"$ref":"#/components/schemas/Mention"}},"articles":{"type":"array","items":{"type":"string"}},"officialText":{"type":"object","properties":{"updatedAt":{"type":"string"}},"required":["updatedAt"]},"citations":{"type":"array","items":{"$ref":"#/components/schemas/CitationCheck"}}},"required":["law","alternates","mentions","articles"]},"OtherAct":{"type":"object","properties":{"type":{"type":"string","enum":["resolution-parliament","resolution-government","decree-president","order-minister","decision-court","unknown-law"]},"label":{"type":"string"},"text":{"type":"string"},"start":{"type":"integer"},"end":{"type":"integer"},"searchUrl":{"type":"string","format":"uri"},"articles":{"type":"array","items":{"type":"string"}},"suggestion":{"$ref":"#/components/schemas/LawRef"}},"required":["type","label","text","start","end","searchUrl"]},"SelfRef":{"type":"object","properties":{"text":{"type":"string"},"start":{"type":"integer"},"end":{"type":"integer"},"articles":{"type":"array","items":{"type":"string"}}},"required":["text","start","end","articles"]},"Extraction":{"type":"object","properties":{"laws":{"type":"array","items":{"$ref":"#/components/schemas/FoundLaw"}},"otherActs":{"type":"array","items":{"$ref":"#/components/schemas/OtherAct"}},"selfRefs":{"type":"array","items":{"$ref":"#/components/schemas/SelfRef"}},"stats":{"type":"object","properties":{"chars":{"type":"integer"},"words":{"type":"integer"},"mentions":{"type":"integer"}},"required":["chars","words","mentions"]}},"required":["laws","otherActs","selfRefs","stats"]},"AiIssue":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"severity":{"type":"string","enum":["high","medium","low"]},"relatedLaws":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"law":{"oneOf":[{"$ref":"#/components/schemas/LawRef"},{"type":"null"}]}},"required":["title","law"]}},"articles":{"type":"array","items":{"type":"string"}},"quote":{"type":"string","description":"Баримтаас ишлэл (≤120 тэмдэгт)"},"recommendation":{"type":"string"}},"required":["title","description","severity","relatedLaws","articles"]},"AiImpliedLaw":{"type":"object","properties":{"title":{"type":"string"},"reason":{"type":"string"},"articles":{"type":"array","items":{"type":"string"}},"law":{"oneOf":[{"$ref":"#/components/schemas/LawRef"},{"type":"null"}]}},"required":["title","reason","articles","law"]},"AiAnalysis":{"type":"object","properties":{"model":{"type":"string","description":"AI шинжилгээний хувилбар"},"documentType":{"type":"string"},"summary":{"type":"string"},"legalAreas":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"$ref":"#/components/schemas/AiIssue"}},"impliedLaws":{"type":"array","items":{"$ref":"#/components/schemas/AiImpliedLaw"}},"truncated":{"type":"boolean"},"disclaimer":{"type":"string"}},"required":["model","documentType","summary","legalAreas","issues","impliedLaws","truncated","disclaimer"]},"FileInfo":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string","enum":["pdf","docx","text"]},"pages":{"oneOf":[{"type":"integer"},{"type":"null"}]}},"required":["pages"]},"TextRequest":{"type":"object","properties":{"text":{"type":"string","maxLength":300000,"description":"Шалгах текст"}},"required":["text"]},"FileRequest":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"PDF, DOCX, TXT (≤15 MB). Скан PDF-ийг OCR хийж илгээнэ."},"text":{"type":"string","description":"file-гүй үед текст"}},"required":[]},"CheckResponse":{"type":"object","properties":{"requestId":{"type":"string"},"object":{"type":"string","enum":["check"]},"chars":{"type":"integer"},"file":{"$ref":"#/components/schemas/FileInfo"},"text":{"type":"string","description":"Файлаар илгээсэн үед гаргасан текст"},"extraction":{"$ref":"#/components/schemas/Extraction"},"usage":{"type":"object","properties":{"checks":{"type":"integer"},"checksLeft":{"type":"integer"},"unitsLeft":{"type":"integer"}},"required":["checks","checksLeft","unitsLeft"]}},"required":["requestId","object","chars","extraction","usage"]},"AnalysisResponse":{"type":"object","properties":{"requestId":{"type":"string"},"object":{"type":"string","enum":["analysis"]},"chars":{"type":"integer"},"aiChars":{"type":"integer","description":"AI-д илгээсэн тэмдэгт — нэгж = ceil(aiChars / 20000)"},"file":{"$ref":"#/components/schemas/FileInfo"},"text":{"type":"string"},"extraction":{"$ref":"#/components/schemas/Extraction"},"ai":{"$ref":"#/components/schemas/AiAnalysis"},"usage":{"type":"object","properties":{"units":{"type":"integer","description":"Хасагдсан AI нэгж"},"unitsLeft":{"type":"integer"},"checksLeft":{"type":"integer"}},"required":["units","unitsLeft","checksLeft"]}},"required":["requestId","object","chars","aiChars","extraction","ai","usage"]},"UsageResponse":{"type":"object","properties":{"requestId":{"type":"string"},"object":{"type":"string","enum":["usage"]},"plan":{"type":"object","properties":{"active":{"type":"boolean"},"id":{"oneOf":[{"type":"string"},{"type":"null"}]},"name":{"oneOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"daysLeft":{"type":"integer"}},"required":["active","id","name","expiresAt","daysLeft"]},"units":{"type":"object","properties":{"left":{"type":"integer"},"total":{"type":"integer"},"used":{"type":"integer"}},"required":["left","total","used"]},"checks":{"type":"object","properties":{"left":{"type":"integer"},"total":{"type":"integer"},"used":{"type":"integer"}},"required":["left","total","used"]},"limits":{"type":"object","properties":{"requestsPerMinute":{"type":"integer"},"maxChars":{"type":"integer"},"aiMaxChars":{"type":"integer"},"unitChars":{"type":"integer"},"maxFileMb":{"type":"integer"}},"required":["requestsPerMinute","maxChars","aiMaxChars","unitChars","maxFileMb"]},"key":{"type":"object","properties":{"name":{"type":"string"},"preview":{"type":"string"}},"required":["name","preview"]}},"required":["requestId","object","plan","units","checks","limits","key"]},"Error":{"type":"object","properties":{"requestId":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["requestId","error"]}}}}