Skip to main content
POST
/
language
/
translate
Translate
curl --request POST \
  --url https://test.api.cxconnect.ai/language/translate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "document": {
    "value": "<string>",
    "mime_type": "<string>",
    "language": "<string>",
    "meta": {}
  },
  "source": "<string>",
  "targets": [
    "<string>"
  ],
  "meta": {
    "foo": "bar"
  },
  "options": {},
  "substitutions": [
    {
      "source": "<string>",
      "text": "<string>",
      "target": "<string>",
      "substitution": "<string>"
    }
  ]
}
'
{
  "results": {
    "en": {
      "language": "en",
      "value": "Hello"
    }
  },
  "original": {
    "document": {
      "value": "<string>",
      "mime_type": "<string>",
      "language": "<string>",
      "meta": {}
    },
    "source": "<string>",
    "targets": [
      "<string>"
    ],
    "meta": {
      "foo": "bar"
    },
    "options": {},
    "substitutions": [
      {
        "source": "<string>",
        "text": "<string>",
        "target": "<string>",
        "substitution": "<string>"
      }
    ]
  },
  "extra": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.cxconnect.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json
document
object
source
string
targets
string[]
meta
object

Request metadata

Example:
{ "foo": "bar" }
options
object
substitutions
object[]

Response

Successful translation result

results
object

The results object contains the translated documents keyed by language

Example:
{
"en": { "language": "en", "value": "Hello" }
}
original
object

Result metadata

extra
object

Items associated with additional request options