POST
/
generate
/
translate
curl --request POST \
  --url https://api.ayrshare.com/api/generate/translate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "text": "<string>",
  "lang": "<string>"
}'
{
    "status": "success",
    "translatedText": "Nos vamos a las carreras",
    "originalText": "Off we go to the races",
    "language": "es"
}
Available on Premium, Business, Enterprise plans.Max Pack required

Translate text for a post to over 100 different languages using AI. The current language is automatically detected and translated to the specified language.

Header Parameters

Authorization
string
required
API Key of the Primary Profile.

Format: Authorization: Bearer API_KEY

Body Parameters

text
string
required

Text to be translated.

lang
string
required

Language code to translate the text.

{
    "status": "success",
    "translatedText": "Nos vamos a las carreras",
    "originalText": "Off we go to the races",
    "language": "es"
}