Assisters API
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/translate

Request Body

stringrequired

The text to translate. Maximum 4096 tokens of output.

stringrequired

The language to translate into. Accepts language names or codes — e.g. Spanish, fr, zh-CN.

string

The source language of the input. Auto-detected if omitted.

stringdefault: assisters-translate-v1

The 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_textstring

The translated text.

target_languagestring

The language the text was translated into, echoed from the request.

source_languagestring

The source language, echoed from the request. Only present when supplied.

modelstring

The model used for the translation.

Error Responses

Available Models

ModelDescription
assisters-translate-v1High-quality translation across 100+ languages

Service Status

Check live API uptime and incidents