Skip to main content
POST
/
generate
/
translate
Translate Post
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"
}

Documentation Index

Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt

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

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

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"
}