Text Translation
Translate text content between multiple languages while maintaining context and meaning.
Try it out
Test the Translation API directly in your browser with our interactive playground.
Overview
The Translation API provides high-quality translations powered by advanced language models. It supports multiple language pairs and maintains context-awareness for accurate translations.
API Reference
Endpoint
POST /vincitranslate
Headers
Name | Type | Description |
---|---|---|
X-User-ID | string | Required. Your user ID |
Request Parameters
Parameter | Type | Description |
---|---|---|
text | string | The text to translate |
target_language | string | Target language code (e.g., 'es' for Spanish) |
Response
string // Translated text
Code Examples
- Python
- JavaScript
import requests
url = "https://api.tryvinci.com/vincitranslate"
headers = {"X-User-ID": "your-user-id"}
data = {
"text": "Hello, how are you?",
"target_language": "es"
}
response = requests.post(url, headers=headers, data=data)
print(response.text) # "¡Hola, ¿cómo estás?"
const response = await fetch('https://api.tryvinci.com/vincitranslate', {
method: 'POST',
headers: {
'X-User-ID': 'your-user-id',
'Content-Type': 'application/json',
},
body: JSON.stringify({
text: 'Hello, how are you?',
target_language: 'es',
}),
});
const translatedText = await response.text();
console.log(translatedText); // "¡Hola, ¿cómo estás?"
Supported Languages
European Languages
English (en), Spanish (es), French (fr), German (de), Italian (it), Portuguese (pt)
Asian Languages
Chinese (zh), Japanese (ja), Korean (ko), Vietnamese (vi), Thai (th)
Other Languages
Arabic (ar), Russian (ru), Hindi (hi), Turkish (tr)
Best Practices
Context Matters
Provide sufficient context around the text for better translations.
Language Codes
Use standard ISO 639-1 language codes for target_language.
For large volumes of text, consider batching requests to improve throughput.