{"components":{"schemas":{"ConvertRequest":{"properties":{"region":{"enum":["cat-es-56-barcelona","cat-es-56-manresa","cat-es-56-sabadell","deu-ch-bs-basel","deu-de-04-hamburg","deu-de-05-bebra","deu-de-07-bergisch-gladbach","deu-de-07-leverkusen","deu-de-13-chemnitz","deu-de-13-dresden","eng-gb-sct","eng-in-05-chandigarh","eng-in-07-delhi","eng-in-09-ahmedabad","eng-in-13","eng-in-16-mumbai","eng-in-16-pune","eng-in-19","eng-in-19-bengaluru","eng-in-21","eng-in-25","eng-in-25-chennai","eng-in-28-kolkata","eng-in-40","eng-ke-05-nairobi","eng-ng-05-lagos","eng-us-ga-atlanta","eng-us-ks-smith-center","eng-us-mo-saint-joseph","eng-us-nc-salisbury","eng-us-pa-bloomsburg","hin-in-05-chandigarh","hin-in-07-delhi","hin-in-10","hin-in-16-mumbai","hin-in-23","hin-in-24","hin-in-24-jaipur","hin-in-34","hin-in-34-patna","hin-in-35","hin-in-35-bhopal","hin-in-36","hin-in-36-lucknow","hin-in-37-raipur","hin-in-38","hin-in-38-ranchi","hin-in-39","hin-in-39-dehradun","hun-hu-01-kiskunfelegyhaza","hun-hu-05-budapest","hun-ro-09-viscri","mar-in-16","mar-in-16-mumbai","mar-in-16-nagpur","mar-in-16-pune","pol-pl-72-wrocaw","pol-pl-77-krakow","pol-pl-78-warsaw","pol-pl-86-poznan","por-br-04","por-br-05","por-br-05-salvador","por-br-15-belo-horizonte","por-br-17","por-br-18","por-br-18-apucarana","por-br-18-arapongas","por-br-18-curitiba","por-br-21-rio-de-janeiro","por-br-22","por-br-23","por-br-26","por-br-26-lages","por-br-27-sao-paulo","por-br-29","ron-ro-03-pitesti","ron-ro-07-botosani","ron-ro-09-brasov","ron-ro-11-buzau","ron-ro-13-cluj-napoca","ron-ro-14-constanta","ron-ro-16-targoviste","ron-ro-18-galati","ron-ro-21-hunedoara","ron-ro-23-iasi","ron-ro-28-piatra-neamt","ron-ro-29-slatina","ron-ro-30-ploiesti","ron-ro-36-timisoara","ron-ro-39-ramnicu-valcea","rus-by-05-stowbtsy","rus-ru-48-moscow","rus-ru-67-saratov","spa-ar-07-buenos-aires","spa-co-34-bogota","spa-es-29-madrid","spa-es-34","spa-es-34-aviles","spa-es-34-gijon","spa-es-34-oviedo","spa-es-51-sevilla","spa-es-57","spa-es-58","spa-es-58-pontevedra","spa-es-58-vigo","spa-es-60-valencia","spa-mx-07-saltillo","spa-mx-15","spa-mx-24-los-zacatones","tam-in-25-chennai","tam-in-25-coimbatore","tam-in-25-cuddalore","tam-in-25-dharmapuri","tam-in-25-erode","tam-in-25-madurai","tam-in-25-nagapattinam","tam-in-25-namakkal","tam-in-25-thiruvarur","tam-in-25-vellore","zho-cn-04-suzhou","zho-cn-10","zho-cn-11","zho-cn-12","zho-cn-23-shanghai","zho-cn-25-weihai"],"type":"string"},"text":{"description":"At most 5,000 words","minLength":1,"type":"string"}},"required":["region","text"],"type":"object"},"ConvertResponse":{"properties":{"applied":{"items":{"$ref":"#/components/schemas/Swap"},"type":"array"},"caveats":{"items":{"type":"string"},"type":"array"},"convert_ms":{"type":"number"},"flagged":{"items":{"$ref":"#/components/schemas/FlaggedSwap"},"type":"array"},"region":{"type":"string"},"text":{"type":"string"}},"required":["region","text","applied","flagged","caveats","convert_ms"],"type":"object"},"Error":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"},"FlaggedSwap":{"properties":{"concept":{"type":"string"},"offset":{"description":"Unicode code-point offset into the input text","type":"integer"},"original":{"type":"string"},"reason":{"type":"string"},"replacement":{"type":"string"}},"required":["concept","offset","original","replacement","reason"],"type":"object"},"Swap":{"properties":{"concept":{"type":"string"},"offset":{"description":"Unicode code-point offset into the input text","type":"integer"},"original":{"type":"string"},"replacement":{"type":"string"}},"required":["concept","offset","original","replacement"],"type":"object"}},"securitySchemes":{"bearer":{"description":"tk_live_<id>_<secret> or tk_test_<id>_<secret>","scheme":"bearer","type":"http"}}},"info":{"description":"Region-level conversion of commercial copy. Human-readable reference at /docs.","title":"Terrior API","version":"1"},"openapi":"3.1.0","paths":{"/health":{"get":{"responses":{"200":{"description":"OK"}},"security":[],"summary":"Liveness and loaded regions"}},"/v1/account":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Account"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad key"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Suspended for non-payment"}},"summary":"Plan, subscription and this period's usage"}},"/v1/billing/portal":{"post":{"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"url":{"format":"uri","type":"string"}},"type":"object"}}},"description":"Portal link"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad key"}},"summary":"One-time link to the billing portal"}},"/v1/convert":{"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvertRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvertResponse"}}},"description":"Converted","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix seconds","schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or empty field, or body not JSON"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing, malformed, unknown or revoked key"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Account suspended for non-payment"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Region not available, over 5,000 words, or account closed"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Body over 1 MiB"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate or concurrency limit; see Retry-After"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Temporarily unavailable; retry with backoff"}},"summary":"Convert text toward a region"}},"/v1/profiles":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"profiles":{"items":{"properties":{"caveats":{"items":{"type":"string"},"type":"array"},"digest":{"type":"string"},"n_rules":{"type":"integer"},"region":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"Profiles"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad key"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Regions this key can use"}}},"security":[{"bearer":[]}],"servers":[{"url":"https://staging.terrior.app"}]}