apiDocs.hero.title

apiDocs.hero.subtitle

apiDocs.quickStart.title

apiDocs.quickStart.description

curl -X POST https://api.simplytranslate.ai/translate \
  -H "Content-Type: application/json" \
  -d '{
    "text": "apiDocs.quickStart.exampleText",
    "from": "en",
    "to": "zh-cn"
  }'

apiDocs.quickStart.response: {"result": "$apiDocs.quickStart.exampleResult", "from": "en", "to": "zh-cn"}

apiDocs.baseUrl.title

https://api.simplytranslate.ai

apiDocs.baseUrl.description

apiDocs.authentication.title

apiDocs.authentication.description

apiDocs.authentication.anonymous.title

  • apiDocs.authentication.anonymous.noKey
  • apiDocs.authentication.anonymous.rateLimit
  • apiDocs.authentication.anonymous.textLimit
  • apiDocs.authentication.anonymous.allLanguages

apiDocs.authentication.withKey.title

  • apiDocs.authentication.withKey.higherLimits
  • apiDocs.authentication.withKey.priority
  • apiDocs.authentication.withKey.analytics
  • apiDocs.authentication.withKey.enterprise
X-API-Key: your-api-key

apiDocs.translateEndpoint.title

POST/translate

apiDocs.translateEndpoint.description

apiDocs.translateEndpoint.requestBody.title

{
  "text": "apiDocs.translateEndpoint.requestBody.text",
  "from": "apiDocs.translateEndpoint.requestBody.from",
  "to": "apiDocs.translateEndpoint.requestBody.to",
  "token": "apiDocs.translateEndpoint.requestBody.token"
}

apiDocs.translateEndpoint.parameters.title

apiDocs.translateEndpoint.parameters.table.parameterapiDocs.translateEndpoint.parameters.table.typeapiDocs.translateEndpoint.parameters.table.requiredapiDocs.translateEndpoint.parameters.table.description
textstringapiDocs.translateEndpoint.parameters.table.yesapiDocs.translateEndpoint.parameters.table.textDesc
fromstringapiDocs.translateEndpoint.parameters.table.yesapiDocs.translateEndpoint.parameters.table.fromDesc
tostringapiDocs.translateEndpoint.parameters.table.yesapiDocs.translateEndpoint.parameters.table.toDesc
tokenstringapiDocs.translateEndpoint.parameters.table.noapiDocs.translateEndpoint.parameters.table.tokenDesc

apiDocs.translateEndpoint.responseFormat.title

// apiDocs.translateEndpoint.responseFormat.success (200 OK)
{
  "result": "apiDocs.translateEndpoint.responseFormat.translatedText",
  "from": "apiDocs.translateEndpoint.responseFormat.sourceLanguage",
  "to": "apiDocs.translateEndpoint.responseFormat.targetLanguage",
  "confidence": 0.98,
  "timestamp": "2024-12-19T10:30:00Z"
}
// apiDocs.translateEndpoint.responseFormat.error (4xx/5xx)
{
  "error": "apiDocs.translateEndpoint.responseFormat.errorDescription",
  "code": "ERROR_CODE",
  "details": "apiDocs.translateEndpoint.responseFormat.additionalInfo"
}

apiDocs.languageCodes.title

apiDocs.languageCodes.description

apiDocs.languageCodes.majorLanguages.title

apiDocs.languageCodes.majorLanguages.englishen
apiDocs.languageCodes.majorLanguages.chineseSimplifiedzh-cn
apiDocs.languageCodes.majorLanguages.chineseTraditionalzh-tw
apiDocs.languageCodes.majorLanguages.japaneseja
apiDocs.languageCodes.majorLanguages.koreanko
apiDocs.languageCodes.majorLanguages.frenchfr
apiDocs.languageCodes.majorLanguages.germande
apiDocs.languageCodes.majorLanguages.spanishes

apiDocs.languageCodes.europeanLanguages.title

apiDocs.languageCodes.europeanLanguages.italianit
apiDocs.languageCodes.europeanLanguages.portuguesept
apiDocs.languageCodes.europeanLanguages.russianru
apiDocs.languageCodes.europeanLanguages.polishpl
apiDocs.languageCodes.europeanLanguages.dutchnl
apiDocs.languageCodes.europeanLanguages.swedishsv
apiDocs.languageCodes.europeanLanguages.norwegianno
apiDocs.languageCodes.europeanLanguages.danishda

apiDocs.languageCodes.otherLanguages.title

apiDocs.languageCodes.otherLanguages.arabicar
apiDocs.languageCodes.otherLanguages.hindihi
apiDocs.languageCodes.otherLanguages.thaith
apiDocs.languageCodes.otherLanguages.vietnamesevi
apiDocs.languageCodes.otherLanguages.indonesianid
apiDocs.languageCodes.otherLanguages.turkishtr
apiDocs.languageCodes.otherLanguages.hebrewhe
apiDocs.languageCodes.otherLanguages.autoDetectauto

apiDocs.languageCodes.note: apiDocs.languageCodes.completeListapiDocs.languageCodes.languagesPage.

apiDocs.rateLimits.title

apiDocs.rateLimits.freeTier.title

  • apiDocs.rateLimits.freeTier.rateLimit: apiDocs.rateLimits.freeTier.rateLimitValue
  • apiDocs.rateLimits.freeTier.textLimit: apiDocs.rateLimits.freeTier.textLimitValue
  • apiDocs.rateLimits.freeTier.dailyLimit: apiDocs.rateLimits.freeTier.dailyLimitValue
  • apiDocs.rateLimits.freeTier.concurrentRequests: apiDocs.rateLimits.freeTier.concurrentRequestsValue

apiDocs.rateLimits.headers.title

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640995200

apiDocs.rateLimits.headers.description

apiDocs.rateLimits.exceeded.title

apiDocs.rateLimits.exceeded.description

apiDocs.errorCodes.title

apiDocs.errorCodes.table.statusCodeapiDocs.errorCodes.table.errorCodeapiDocs.errorCodes.table.description
400INVALID_REQUESTapiDocs.errorCodes.table.invalidRequest
401UNAUTHORIZEDapiDocs.errorCodes.table.unauthorized
403FORBIDDENapiDocs.errorCodes.table.forbidden
413TEXT_TOO_LONGapiDocs.errorCodes.table.textTooLong
429RATE_LIMIT_EXCEEDEDapiDocs.errorCodes.table.rateLimitExceeded
500INTERNAL_ERRORapiDocs.errorCodes.table.internalError

apiDocs.codeExamples.title

apiDocs.codeExamples.javascript.title

const translateText = async (text, from, to) => {
  const response = await fetch('https://api.simplytranslate.ai/translate', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      text: text,
      from: from,
      to: to
    })
  });
  
  const result = await response.json();
  return result;
};

// apiDocs.codeExamples.javascript.usage
translateText('apiDocs.codeExamples.javascript.exampleText', 'en', 'zh-cn')
  .then(result => console.log(result.result))
  .catch(error => console.error('apiDocs.codeExamples.javascript.error:', error));

apiDocs.codeExamples.python.title

import requests
import json

def translate_text(text, from_lang, to_lang):
    url = "https://api.simplytranslate.ai/translate"
    
    payload = {
        "text": text,
        "from": from_lang,
        "to": to_lang
    }
    
    response = requests.post(
        url,
        headers={"Content-Type": "application/json"},
        data=json.dumps(payload)
    )
    
    return response.json()

# apiDocs.codeExamples.python.usage
result = translate_text("apiDocs.codeExamples.python.exampleText", "en", "zh-cn")
print(result["result"])  # apiDocs.codeExamples.python.output: apiDocs.codeExamples.python.exampleResult

apiDocs.codeExamples.curl.title

# apiDocs.codeExamples.curl.basic
curl -X POST https://api.simplytranslate.ai/translate \
  -H "Content-Type: application/json" \
  -d '{
    "text": "apiDocs.codeExamples.curl.exampleText",
    "from": "en",
    "to": "zh-cn"
  }'

# apiDocs.codeExamples.curl.withApiKey
curl -X POST https://api.simplytranslate.ai/translate \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your-api-key-here" \
  -d '{
    "text": "apiDocs.codeExamples.curl.exampleText",
    "from": "en",
    "to": "ja"
  }'

apiDocs.bestPractices.title

apiDocs.bestPractices.performance.title

  • apiDocs.bestPractices.performance.batchTexts
  • apiDocs.bestPractices.performance.autoDetection
  • apiDocs.bestPractices.performance.exponentialBackoff
  • apiDocs.bestPractices.performance.cacheTranslations
  • apiDocs.bestPractices.performance.useHttps

apiDocs.bestPractices.errorHandling.title

  • apiDocs.bestPractices.errorHandling.checkStatus
  • apiDocs.bestPractices.errorHandling.retryLogic
  • apiDocs.bestPractices.errorHandling.networkTimeouts
  • apiDocs.bestPractices.errorHandling.validateInput
  • apiDocs.bestPractices.errorHandling.logErrors