API Reference
Translation
Translate text between languages with the translation endpoint
Translation
Translate text into any target language. The endpoint returns only the translated text — no explanations, labels, or markdown — and preserves the original formatting, newlines, and punctuation.
Endpoint
POST https://api.assisters.dev/v1/translateRequest Body
stringrequiredThe text to translate. Maximum 4096 tokens of output.
stringrequiredThe language to translate into. Accepts language names or codes — e.g. Spanish, fr, zh-CN.
stringThe source language of the input. Auto-detected if omitted.
stringdefault: assisters-translate-v1The translation model to use.
Example: assisters-translate-v1
Request Examples
from openai import OpenAI
import httpx
response = httpx.post(
"https://api.assisters.dev/v1/translate",
headers={"Authorization": "Bearer ask_your_api_key"},
json={
"text": "Hello, how are you today?",
"target_language": "Spanish",
},
)
print(response.json()["translated_text"])const response = await fetch("https://api.assisters.dev/v1/translate", {
method: "POST",
headers: {
"Authorization": "Bearer ask_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
text: "Hello, how are you today?",
target_language: "Spanish",
}),
});
const data = await response.json();
console.log(data.translated_text);curl https://api.assisters.dev/v1/translate \
-H "Authorization: Bearer ask_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"text": "Hello, how are you today?",
"target_language": "Spanish"
}'Response
{
"translated_text": "Hola, ¿cómo estás hoy?",
"target_language": "Spanish",
"model": "assisters-translate-v1"
}source_language is only included in the response when you supply it in the request.Response Fields
translated_textstringThe translated text.
target_languagestringThe language the text was translated into, echoed from the request.
source_languagestringThe source language, echoed from the request. Only present when supplied.
modelstringThe model used for the translation.
Error Responses
Available Models
| Model | Description |
|---|---|
assisters-translate-v1 | High-quality translation across 100+ languages |
Service Status
Check live API uptime and incidents