Terrior API
Terrior rewrites a text toward how a specific region writes its language, and reports the words that could not safely be changed.
Base URL: https://terrior.app. Requests and responses are JSON (UTF-8). Version: v1.
Getting started
Terrior is in private preview. Tell us your requirements on the site; we send each account its API key when its regions are ready. We store only a hash of the key. Then:
curl https://terrior.app/v1/convert \
-H 'Authorization: Bearer tk_live_…' \
-H 'Content-Type: application/json' \
-d '{"region":"eng-ca-08-toronto","text":"The forthcoming update comprises fixes for everyone impacted by last week'\''s outage, and our colleagues will subsequently bolster support for anyone attempting to move their account."}'
If your account covers a number of regions, choose them first (see Choosing regions). Regions available now: ara-ae-01-abu-dhabi, ara-ae-06-sharjah, ara-il-04-haifa, ben-bd-81-dhaka, ben-no-12-oslo, bul-bg-41-tryavna, bul-bg-42-sofia, bul-bg-62-veliko-turnovo, cat-es-56-barcelona, cat-es-56-lleida, cat-es-56-manresa, cat-es-56-sabadell, deu-ch-be-bern, deu-ch-bs-basel, deu-ch-ow-sarnen, deu-ch-sg-sankt-gallen, deu-ch-zh-winterthur, deu-de-01-mannheim, deu-de-04-hamburg, deu-de-05-bebra, deu-de-05-darmstadt, deu-de-05-frankfurt-am-main, deu-de-07-bergisch-gladbach, deu-de-07-dusseldorf, deu-de-07-leverkusen, deu-de-13-chemnitz, deu-de-13-dresden, deu-de-13-leipzig, deu-de-16-berlin, eng-ca-08-toronto, eng-ca-10-montreal, eng-es-29-madrid, eng-gb-eng-barnard-castle, eng-gb-eng-cinderford, eng-gb-eng-london, eng-gb-eng-manchester, eng-gb-sct, eng-gb-sct-edinburgh, eng-gb-wls-newport, eng-gh-01-accra, eng-gy-12-georgetown, eng-in-05-chandigarh, eng-in-07-delhi, eng-in-09-ahmedabad, eng-in-12-srinagar, eng-in-13, eng-in-16-mumbai, eng-in-16-pune, eng-in-19, eng-in-19-bengaluru, eng-in-20-dimapur, eng-in-21, eng-in-21-bhubaneswar, eng-in-25, eng-in-25-chennai, eng-in-28-kolkata, eng-in-40, eng-ke-05-nairobi, eng-ng-05-imota, eng-ng-05-lagos, eng-sz-01-mbabane, eng-ua-01-kamyanka, eng-ua-12-kyiv, eng-us-al-montgomery, eng-us-az-phoenix, eng-us-ca-oxnard, eng-us-co-denver, eng-us-dc-washington, eng-us-fl-fort-lauderdale, eng-us-ga-atlanta, eng-us-hi-pukalani, eng-us-ia-indianola, eng-us-il-chicago, eng-us-il-waukegan, eng-us-ks-smith-center, eng-us-ma-boston, eng-us-mi-marquette, eng-us-mn-detroit-lakes, eng-us-mn-minneapolis, eng-us-mo-branson, eng-us-mo-saint-joseph, eng-us-nc-asheville, eng-us-nc-boone, eng-us-nc-burlington, eng-us-nc-charlotte, eng-us-nc-hendersonville, eng-us-nc-raleigh, eng-us-nc-salisbury, eng-us-ny-ilion, eng-us-ny-jamaica, eng-us-ny-new-york-city, eng-us-oh-massillon, eng-us-pa-bloomsburg, eng-us-pa-philadelphia, eng-us-pa-pittsburgh, eng-us-tn-nashville, eng-us-tx-austin, eng-us-tx-dallas, eng-us-tx-menard, eng-us-va-charlottesville, eng-us-wa-bellingham, eng-us-wa-seattle, eng-vc-04-kingstown, fin-fi-01-espoo, fin-fi-01-helsinki, fra-bj-14-cotonou, fra-ca-10-mont-tremblant, fra-ca-10-montreal, fra-fr-76-montpellier, fra-ht-11-port-au-prince, fra-sn-01-dakar, guj-in-09, guj-in-09-bhavnagar, hin-in-05-chandigarh, hin-in-07-delhi, hin-in-10, hin-in-10-gurugram, hin-in-16-mumbai, hin-in-23, hin-in-24, hin-in-24-jaipur, hin-in-28-kolkata, hin-in-34, hin-in-34-patna, hin-in-35, hin-in-35-bhopal, hin-in-35-indore, hin-in-35-seoni, 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-hu-08-dunaujvaros, hun-ro-09-viscri, hun-ua-25-berehove, ita-ch-ow-sarnen, ita-it-01-pescara, ita-it-04-caserta, ita-it-06-udine, ita-it-07-rome, ita-it-09-brescia, ita-it-09-busto-arsizio, ita-it-09-milan, ita-it-10-macerata, ita-it-14-cagliari, ita-it-14-olbia, ita-it-14-sassari, ita-it-15-palermo, ita-it-18-terni, jpn-br-27-sao-paulo, jpn-jp-02-odate, jpn-jp-13-kobe, jpn-jp-14-mito, jpn-jp-19-yokohama, jpn-jp-22-kyoto, jpn-jp-32-osaka, jpn-jp-34-saitama, jpn-jp-36-matsue, jpn-jp-39-tokushima, jpn-jp-40-tokyo, jpn-jp-45-yamaguchi, jpn-jp-47-ishigaki, mar-in-16, mar-in-16-mumbai, mar-in-16-nagpur, mar-in-16-pune, nld-be-bru-brussels, nld-nl-07-haarlem, nld-nl-07-hoorn, nld-nl-15-hengelo, nor-no-12-oslo, nor-no-42-birkeland, pol-pl-72-wrocaw, pol-pl-75-zamosc, pol-pl-77-krakow, pol-pl-78-warsaw, pol-pl-86-poznan, por-br-04, por-br-05, por-br-05-salvador, por-br-07-brasilia, por-br-08-vila-velha, 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-22-natal, por-br-23, por-br-23-passo-fundo, por-br-26, por-br-26-lages, por-br-27-sao-paulo, por-br-28-aracaju, por-br-29, por-pt-10-funchal, por-pt-21-vila-real, ron-ro-10-bucharest, ron-ua-03-chernivtsi, rus-by-01-stolin, rus-by-03-hrodna, rus-by-03-novogrudok, rus-by-05-stowbtsy, rus-ca-08-toronto, rus-cz-52-prague, rus-lv-25-riga, rus-lv-c7-sigulda, rus-ru-47-khimki, rus-ru-47-klin, rus-ru-47-ruza, rus-ru-48-marino, rus-ru-48-moscow, rus-ru-48-vykhino-zhulebino, rus-ru-67-saratov, rus-ru-71-yekaterinburg, rus-ru-73-kazan, spa-ar-01-zarate, spa-ar-07-buenos-aires, spa-ar-24-san-miguel-de-tucuman, spa-cl-12-santiago, 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-56-barcelona, spa-es-57, spa-es-58, spa-es-58-a-coruna, spa-es-58-pontevedra, spa-es-58-vigo, spa-es-60-valencia, spa-mx-07-saltillo, spa-mx-15, spa-mx-24-los-zacatones, spa-pe-lma-lima, spa-uy-10-montevideo, swe-se-09-oskarshamn, swe-se-10-rattvik, swe-se-26-stockholm, swe-se-28-kungalv, zho-cn-04-nanjing, zho-cn-09-zhengzhou, zho-cn-12-wuhan, zho-cn-22-beijing, zho-cn-25-jinan, zho-cn-26-xian, zho-cn-30-guangzhou, zho-cn-30-shenzhen, zho-hk-hong-kong, zho-tw-04-taipei.
Authentication
Send your key as a bearer token on every /v1/ request: Authorization: Bearer tk_live_<id>_<secret>.
Keys beginning tk_test_ belong to the staging service and are refused by the live one, and the reverse.
Any problem with the key itself (missing, malformed, unknown, revoked) is the same 401, deliberately.
A key that is valid on an account suspended for non-payment gets 402; a closed account, or one waiting to be enabled after signup, gets 403.
Replace a key yourself with POST /v1/account/keys/rotate, or revoke one with DELETE /v1/account/keys/{key_id}.
Limits
Every account has a per-minute rate and a number of concurrent requests, which GET /v1/account reports. Past the rate a request answers 429 with Retry-After. Every account also has: at most 5,000 words per request (past that it is a batch job, and the request is refused with 403); a request body of at most 1 MiB (413).
Concurrent requests are the requests in flight at once on one key, counted on each server instance: a request counts from the moment it is accepted until its response has been sent in full. A request over the limit answers 429 with Retry-After.
Rate-limit headers
Every admitted /v1/convert and /v1/profiles response on a plan with a per-minute rate carries:
| Header | Meaning |
|---|---|
X-RateLimit-Limit | Requests allowed per minute on your plan. |
X-RateLimit-Remaining | Requests left in the current sliding minute. |
X-RateLimit-Reset | Unix time (seconds) at which the window is full again. |
A 429 carries Retry-After in seconds. Back off for at least that long; the window slides, so retrying immediately is refused again.
Errors
Every error is {"error": "<a sentence saying what to do>"} with one of these statuses:
| Status | When | Retry? |
|---|---|---|
| 400 | The body is not JSON, or text / region is missing or empty. | No: fix the request. |
| 401 | No key, or a key that is malformed, unknown or revoked. | No. |
| 402 | The account is suspended for non-payment. POST /v1/billing/portal still works, so you can pay. | After paying. |
| 403 | A region your plan does not hold (the message lists those you do); no profile for that region yet (the message lists those available); over 5,000 words in one request; or the account is closed or waiting to be enabled. | No. |
| 404 | No such path. | No. |
| 405 | The method is not the one the path takes. The Allow header names the right one. | No. |
| 413 | Request body over 1 MiB. | No. |
| 429 | Over your per-minute rate, or more requests in flight at once than your plan allows. | Yes, after Retry-After. |
| 503 | The service could not reach its own storage or payment provider. The detail is logged on our side, never returned. | Yes, with backoff. |
Choosing regions
Starter and Growth cover a number of regions that you choose. A new account holds none, and /v1/convert answers 403 for a region you have not chosen, naming the ones you hold. Choose with POST /v1/account/regions:
curl https://terrior.app/v1/account/regions \
-H 'Authorization: Bearer tk_live_...' \
-H 'Content-Type: application/json' \
-d '{"add": ["ara-ae-01-abu-dhabi"]}'
A region you choose is held for 30 days before it can be released, so a swap is one call with both remove and add once the hold has passed. Moving to a smaller plan keeps the regions you have held longest. Scale includes every region, including the ones added after you subscribe, and has nothing to choose.
Endpoints
POST /v1/convert
Rewrite text toward how region writes it. Only swaps that are safe are applied; the rest are returned as flagged for a person to decide. Syntax and structure are never changed.
| Request field | Type | |
|---|---|---|
region | string | Required. One of the regions in /v1/profiles. |
text | string | Required, non-empty, at most 5,000 words. |
{
"applied": [
{
"concept": "includes~comprises",
"offset": 23,
"original": "comprises",
"replacement": "includes"
},
{
"concept": "trying~attempting",
"offset": 148,
"original": "attempting",
"replacement": "trying"
}
],
"convert_ms": 0.0813,
"flagged": [
{
"concept": "year’s~week's",
"offset": 69,
"original": "week's",
"reason": "'year’s' and 'week's' may differ in meaning here, not only in which one the region writes; check before using",
"replacement": "year’s"
},
{
"concept": "members~colleagues",
"offset": 92,
"original": "colleagues",
"reason": "'members' and 'colleagues' may differ in meaning here, not only in which one the region writes; check before using; the two words are not written beside the same neighbouring words, so the swap could leave a nearby word that no longer fits; check before using",
"replacement": "members"
},
{
"concept": "later~subsequently",
"offset": 108,
"original": "subsequently",
"reason": "the two words are not written beside the same neighbouring words, so the swap could leave a nearby word that no longer fits; check before using",
"replacement": "later"
},
{
"concept": "improve~bolster",
"offset": 121,
"original": "bolster",
"reason": "'improve' and 'bolster' may differ in meaning here, not only in which one the region writes; check before using",
"replacement": "improve"
}
],
"region": "eng-ca-08-toronto",
"text": "The forthcoming update includes fixes for everyone impacted by last week's outage, and our colleagues will subsequently bolster support for anyone trying to move their account."
}
| Response field | |
|---|---|
text | The input with every applied swap made. |
applied[] | Swaps made. offset is a Unicode code-point offset into your input, not into the returned text. |
flagged[] | Swaps the profile suggests but did not make, each with a reason. Review these before publishing. |
caveats[] | What this region's profile does not yet know. Show them to whoever approves the copy. |
convert_ms | Server-side conversion time in milliseconds, excluding network and queueing. |
GET /v1/profiles
The regions your key can use, each with the number of rules, a content digest (changes when the profile is rebuilt), and its caveats.
{ "profiles": [ { "region": "lko", "n_rules": 83, "digest": "c8626095…", "caveats": ["…"] } ] }
GET /v1/account
Your plan, the regions you hold and when each can be released, subscription status and this billing period's usage. When you cancel in the billing portal, the account stays active until the end of the period you paid for: cancel_at_period_end is true and cancels_at is the time (unix seconds) the account closes.
{ "tenant": "t_…", "key_id": "…", "tier": "basic",
"plan": "growth", "region_allowance": 15,
"regions_held": [{ "region": "ara-ae-01-abu-dhabi", "since": 1791590400, "releasable_at": 1794182400 }],
"requests_per_minute": 600, "max_concurrency": 16,
"subscription": { "status": "active", "period_start": 1791590400, "period_end": 1794268800,
"cancel_at_period_end": false, "cancels_at": null },
"usage_this_period": { "requests": 1250, "words": 52310 } }
POST /v1/account/regions
Choose or release regions on a plan that covers a number of them. Both lists are optional; removals apply first. Answers with the same body as GET /v1/account, or 400 saying what would succeed: over the plan's count, a region still inside its 30-day hold, a region with no profile, or a plan that includes every region.
{ "add": ["ara-ae-01-abu-dhabi"], "remove": [] }
GET /v1/account/keys
The keys on your account, revoked ones included, never their secrets. current marks the key making the call.
{ "keys": [ { "key_id": "9f2c41aa", "created_at": "2026-10-14T09:30:00Z", "revoked_at": null,
"last_four": "x7Qa", "regions": null, "current": true } ] }
POST /v1/account/keys/rotate
Replaces the key making the call. The new key is created and the old one revoked in one step, so the new key is the only one left from that moment. It keeps the old key's region scope, and the account's plan and limits apply to it as they did to the old one. The new key is shown once; the response is never cached.
{ "key_id": "b81d07e3", "api_key": "tk_live_b81d07e3_…", "regions": null, "revoked_key_id": "9f2c41aa" }
DELETE /v1/account/keys/{key_id}
Revokes one key on your account by its id; the id is the middle part of the key, and GET /v1/account/keys lists them. Revoking a key already revoked changes nothing. The account's only active key is refused with 400, because nothing could then authenticate: rotate it instead. A key id that is not on your account answers the same 400 as one that does not exist.
{ "key_id": "9f2c41aa", "created_at": "2026-10-14T09:30:00Z", "revoked_at": "2026-10-14T10:02:11Z", "last_four": "x7Qa", "regions": null, "current": false }
GET /health no key
Lists every region loaded, as the names /v1/profiles and /v1/convert take. Shortened here:
{ "status": "ok", "regions": ["ara-ae-01-abu-dhabi", "ara-ae-06-sharjah", "ara-il-04-haifa", "ben-bd-81-dhaka", "…"] }
POST /v1/score
Says which region text reads as, and which words carry that reading. The text is placed between the regions’ profiles by how many of the concepts it expresses in the borrowed form rather than the native one, and the words that run against a clear preference in region come back as findings with the alternative. It describes the text; it does not correct it. The request is the one /v1/convert takes, with the same limits, errors and rate headers, and counts the same way: nothing is billed per call.
curl https://terrior.app/v1/score \
-H 'Authorization: Bearer tk_live_…' \
-H 'Content-Type: application/json' \
-d '{"region":"eng-ca-08-toronto","text":"The forthcoming update comprises fixes for everyone impacted by last week'\''s outage, and our colleagues will subsequently bolster support for anyone attempting to move their account."}'
Shortened here: three of the profile shares and two findings.
{
"candra_o_per_10k": 0.0,
"concepts_found": 38,
"confident": true,
"english_share": 0.4473684210526316,
"findings": [
{
"alternative": "year’s",
"concept": "year’s~week's",
"direction": "more native than this region",
"domain": "mined",
"found": "week's",
"found_is_loan": false,
"other_share": null,
"target_share": 1.0
},
{
"alternative": "includes",
"concept": "includes~comprises",
"direction": "more native than this region",
"domain": "mined",
"found": "comprises",
"found_is_loan": false,
"other_share": null,
"target_share": 0.9939759036144579
}
],
"interval": [
0.3014616531155089,
0.6029397082091058
],
"profile_shares": {
"eng-ca-08-toronto": 0.7305562871210772,
"eng-ca-10-montreal": 0.7384758247200969,
"eng-es-29-madrid": 0.7156885460355902
},
"reads_as": "eng-in-21",
"target_region": "eng-ca-08-toronto",
"tokens": 26,
"verdict": "Reads as eng-in-21, not eng-ca-08-toronto. This copy expresses 45% of its concepts in English; eng-ca-08-toronto copy runs at 73%."
}
| Response field | |
|---|---|
verdict | One sentence: which region the text reads as, or that there is not enough to judge. |
confident | true once the text has at least 10 measurable concepts. Below that reads_as is null, because fewer concepts do not support a verdict. |
reads_as | The region whose profile the text sits closest to. |
concepts_found | How many concept words, in either form, the text contains. The verdict rests on this count. |
english_share, interval | The share of those concepts written in the borrowed form, and its 95% Wilson interval as [low, high]. |
profile_shares | The same share for each region’s profile, the points the text is placed between. |
findings[] | Words in the text that region clearly writes the other way: found, alternative, domain, target_share and a direction. Most decisive first. |
tokens, candra_o_per_10k | Words measured, and candra-o characters per 10,000 of them. |
A region served for conversion whose profile carries no scoring data answers 422 and says so.