Translate text

POST https://api.turing.sh/text/translate

Parameters

  • text

    • Type: string
    • Required: true
    • Description: Text to translate
  • from

    • Type: string
    • Required: false
    • Description: Language code to translate from
    • Default: auto
  • to

    • Type: string
    • Required: true
    • Description: Language code to translate to
  • ai

    • Type: string
    • Required: true
    • Options: google, microsoft
    • Default: google

Response

Examples

Translate text example
import axios from "axios";
(async () => {
  let response = await axios({
    method: "post",
    url: 'https://api.turing.sh/text/translate',
    headers: {
      "Content-Type": "application/json",
      Authorization: "Bearer YOUR_API_KEY",
      "x-captcha-token": "Captcha key"
    },
    data: {
"text": "string",
"from": "auto",
"to": "string",
"ai": "google"
},
  })
})();