curl --request POST \
--url https://eu.phrase.com/smt/api/v2/textTranslations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sourceLang": {
"code": "en"
},
"sourceTexts": [
{
"key": "key1",
"source": "Hello, world!"
}
],
"targetLang": {
"code": "cs"
},
"mtSettings": {
"profile": {
"uid": "CFUki8ptanoz1WAIYoXSH4"
}
},
"consumerId": "consumer1"
}
'{
"sourceLang": {
"code": "en"
},
"translatedTexts": [
{
"key": "key1",
"target": "Ahoj, světe!"
}
],
"targetLang": {
"code": "cs"
},
"consumerId": "consumer1"
}Text translations v2
Translates the text content utilizing Phrase Language AI capabilities. Can identify the source language, if not provided, and translate the text to the target language. It is recommended to use language detection with at least 50 characters.
curl --request POST \
--url https://eu.phrase.com/smt/api/v2/textTranslations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sourceLang": {
"code": "en"
},
"sourceTexts": [
{
"key": "key1",
"source": "Hello, world!"
}
],
"targetLang": {
"code": "cs"
},
"mtSettings": {
"profile": {
"uid": "CFUki8ptanoz1WAIYoXSH4"
}
},
"consumerId": "consumer1"
}
'{
"sourceLang": {
"code": "en"
},
"translatedTexts": [
{
"key": "key1",
"target": "Ahoj, světe!"
}
],
"targetLang": {
"code": "cs"
},
"consumerId": "consumer1"
}Authorizations
Body
1 - 6 elementsShow child attributes
Show child attributes
Show child attributes
Show child attributes
Use short descriptive ID that represents the calling integration. E.g. JIRA_INTEGRATION, GDRIVE_SYNC, SHOPIFY_EXT:v1.2 etc.
1 - 50Show child attributes
Show child attributes
Show child attributes
Show child attributes
Term base configurations to enforce during translation. Only supported for Quokka (AI Translation Agent) profiles, set via mtSettings.profile; combining term bases with any other profile fails the request.
10Show child attributes
Show child attributes
Translation memory references applied in RAG (context-only) mode - relevant matches are supplied to the AI model as translation context rather than automatically substituted into the output; PRETRANSLATE mode is not supported on this endpoint. Only supported for Quokka (AI Translation Agent) profiles, set via mtSettings.profile; combining translation memories with any other profile fails the request.
10Show child attributes
Show child attributes
Content Group whose Content Profile is resolved for the caller's organization and target language, and applied to the translation when found. If no Content Profile exists for the target language, or it cannot be resolved, the translation proceeds without one rather than failing the request.
Show child attributes
Show child attributes
Response
Response with translations
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Use short descriptive ID that represents the calling integration. E.g. JIRA_INTEGRATION, GDRIVE_SYNC, SHOPIFY_EXT:v1.2 etc.
1 - 50Show child attributes
Show child attributes
Was this page helpful?