Language codes
Every language value in a response is a lowercase BCP-47 tag from GET /v1/languages.
Send these:
en-usja-jppt-bres-lazh-cn
A code you send is resolved to exactly one language from that list. These spellings resolve too:
| You send | Resolves to | Why |
|---|---|---|
ja-JP or ja_jp |
ja-jp |
Case and _ don't matter |
ja, fr |
ja-jp, fr-fr |
A bare language code names that language's default variety |
es-419 |
es-la |
A few common alternative tags are accepted |
Japanese |
Rejected | Language name, not a code |
A code is never swapped for a different language or region. If the list has no row for it, or a bare code fits several varieties and none is the default, the code is refused:
POST /v1/projectsreturns422validation_failednaming the codes.POST /v1/text/translatereturns that target asunsupported, not charged; a refused source makes every target of its textunsupported. A code that is not a language code at all, such asJapanese, fails the whole request with422andfield_errors.
name from the languages list is for display only. Never send it as a code.
Where codes appear
source_language_code— required onPOST /v1/projectstarget_language_codes— array of tags on create- Responses — same lowercase
bcp47values, ornullfor a stored language thatGET /v1/languagesdoesn't list
List supported languages
Any valid key works. No extra scope.
curl -s https://api.arbitr.ai/v1/languages \
-H "X-API-Key: abr_live_…"
200:
{
"languages": [
{ "bcp47": "en-us", "name": "English (United States)" },
{ "bcp47": "fr-fr", "name": "French (France)" }
],
"page": {
"number": 1,
"has_more": false,
"limit": 2
}
}
Pass languages[].bcp47 into create-project. If a tag is not in this list, do not invent one — add the language in arbitr first, or pick another tag from the list.