Language codes

Every language value in a response is a lowercase BCP-47 tag from GET /v1/languages.

Send these:

  • en-us
  • ja-jp
  • pt-br
  • es-la
  • zh-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/projects returns 422 validation_failed naming the codes.
  • POST /v1/text/translate returns that target as unsupported, not charged; a refused source makes every target of its text unsupported. A code that is not a language code at all, such as Japanese, fails the whole request with 422 and field_errors.

name from the languages list is for display only. Never send it as a code.

Where codes appear

  • source_language_code — required on POST /v1/projects
  • target_language_codes — array of tags on create
  • Responses — same lowercase bcp47 values, or null for a stored language that GET /v1/languages doesn'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.