---
title: "Translates text from one language to another using the specified translator."
method: POST
path: "/translation"
tags: ["Translation"]
---

# Translates text from one language to another using the specified translator.

`POST /translation`

## Request body

- TranslateEndpointInput
  - `translator` 'Google' | 'Deepl' | 'OpenAi' | 'OpenAi4O' | 'OpenAi4OMini' | 'LibreTranslate' | 'Gemini' | 'Tllm', required
  - `text` string, required — The text to translate.
  - `targetLanguage` string, required — The language to translate the text into.
  - `sourceLanguage` string — The original language of the text.

## Response `200`

OK

- TranslateEndpointOutput
  - `translation` string, required — The translated text.
  - `sourceLanguage` string, nullable, required — The detected or provided source language of the text.
  - `targetLanguage` string, required — The language the text was translated into.

## Other responses

- `400` — Bad Request
- `401` — Unauthenticated
- `403` — Forbidden

---

[API](https://skmtc.net/rapidata/apis/rapidata-api.md) · [All operations](https://skmtc.net/rapidata/apis/rapidata-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/rapidata/rapidata-api/revisions/d779de93a5ee/schema)
