API Documentation
Complete reference for the Babelfish Translation API
Quick Start
Authentication
All API requests require authentication using your API key
Authorization: Bearer YOUR_API_KEYReplace YOUR_API_KEY with your actual API key
API Endpoints
POST
/translate/textTranslate text from one language to multiple target languages
Request
{
"text": "Hello, world!",
"source_lang": "en",
"target_langs": [
"es",
"fr",
"de"
]
}Response
{
"translations": {
"es": "¡Hola, mundo!",
"fr": "Bonjour le monde!",
"de": "Hallo Welt!"
}
}Code Examples
curl -X POST https://api.babelfish.fun/translate/text \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Hello, world!",
"source_lang": "en",
"target_langs": ["es", "fr"]
}'Error Codes
400Bad Request401Unauthorized429Too Many Requests500Internal Server Error