Translate text
Translate one to 100 text strings synchronously, with optional source language and translation context.
POST /v2/translate/text translates one to 100 strings into one target language and returns the result synchronously.
export LINGOPAL_API_KEY="your-api-key"
curl https://api.lingopal.ai/v2/translate/text \
-H "X-API-Key: $LINGOPAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"texts": ["Hello", "Welcome to Lingopal"],
"source_language": "en",
"target_language": "es"
}'Authorization
APIKeyHeader In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v2/translate/text" \ -H "Content-Type: application/json" \ -d '{ "texts": [ "Hello world", "Welcome to Lingopal" ], "target_language": "es" }'{ "status": "completed", "translations": [ { "source_text": "Hello world", "target_language": "es", "translated_text": "Hola mundo" } ], "workflow": "translate_text"}source_language is optional and may be detected. Confirm the target with Supported languages.
Use the API Reference entry for translateText for the complete request schema and response details.
Add context
Use the dedicated context field for domain, audience, tone, or terminology. Do not prepend instructions to the source text.
{
"texts": ["The fund returned 12% last quarter."],
"target_language": "fr",
"context": "Financial performance report for institutional investors. Keep Lingopal untranslated."
}Use job-based workflows for media and documents; registerJobs registers file URLs, not text payloads.