API Reference
User Message Translation
/cs/v1/smart_translations/userTranslates the latest user (subscriber) message into the target language, using the prior conversation as context.
Open interactive API explorer ↗ · Download OpenAPI
Authentication
bearerAuth
Bearer authentication header of the form Bearer <token>, where <token> is an access key.
Example: Authorization: Bearer sk-proj-XXXXXXXXX
Type: bearer
Request body (required)
#application/json
A conversation to translate, with its source and target languages.
Type:objectsource_language stringrequiredSource language. See supported languages guides for full language names.
Type:stringAllowed values: "EN", "EN_GB", "FR", "FR_BE", "RO", "NL", "ES", "DE", "DE_CH", "DE_AT", "IT", "ES_LATAM", "BG", "HE", "JA", "NL_BE", "EN_AU", "PT_PT", "PT_BR", "SV_SE", "DA_DK", "FI_FI", "PL_PL", "LT_LT", "NB_NO", "NN_NO", "SL_SI", "HU", "HU_HU", "CS_CZ", "EL_GR", "EL_GR_LATIN", "EL_GR_GREEK", "HR_HR", "TR_TR", "EN_IE", "AF_ZA", "ZU_ZA", "LV_LV", "SK_SK", "GA_IE", "SR_RS", "ET_EE", "EN_CA", "FR_CA", "RU_RU", "UA_UA"
target_language stringrequiredTarget language. See supported languages guides for full language names.
Type:stringAllowed values: "EN", "EN_GB", "FR", "FR_BE", "RO", "NL", "ES", "DE", "DE_CH", "DE_AT", "IT", "ES_LATAM", "BG", "HE", "JA", "NL_BE", "EN_AU", "PT_PT", "PT_BR", "SV_SE", "DA_DK", "FI_FI", "PL_PL", "LT_LT", "NB_NO", "NN_NO", "SL_SI", "HU", "HU_HU", "CS_CZ", "EL_GR", "EL_GR_LATIN", "EL_GR_GREEK", "HR_HR", "TR_TR", "EN_IE", "AF_ZA", "ZU_ZA", "LV_LV", "SK_SK", "GA_IE", "SR_RS", "ET_EE", "EN_CA", "FR_CA", "RU_RU", "UA_UA"
#messages arrayrequired
The conversation messages, oldest first. The last message must be authored by the side matching the route ('user' for /user, 'persona' for /persona).
Type:arrayuser_gender stringrequiredGender of the user (subscriber). Used to apply the correct grammatical gender, agreement, and forms of address in the target language.
Type:stringAllowed values: "WOMAN", "MAN"
persona_gender stringrequiredGender of the persona (animator). Used to apply the correct grammatical gender, agreement, and forms of address in the target language.
Type:stringAllowed values: "WOMAN", "MAN"
Illustrative example
{
"source_language": "EN",
"target_language": "FR",
"messages": [
{
"sender": "user",
"text": "hello"
}
],
"tags": {},
"user_gender": "MAN",
"persona_gender": "WOMAN"
}