Machine Translation (MT)
Translate text between English and Twi in real time.
Endpoint
POST /translate
Request Body
| Field | Type | Description |
|---|---|---|
| text | string (required) | Text to translate |
| source_lang_name | string (required) | "English" or "Twi" |
Example
curl -X POST "https://api.ayaspeech.ayadata.ai/translate" \
-H "x-api-token: your_api_token" \
-H "Content-Type: application/json" \
-d '{"text": "Good morning, how are you?", "source_lang_name": "English"}'Response
{
"translated_text": "Maakye, wo ho te sɛn?",
"source_language": "English",
"target_language": "Twi",
"inference_time_ms": 245.3
}Limits
| Tier | Daily Requests | Monthly Characters |
|---|---|---|
| Free | 5 | 25,000 |
| Premium | 1,000 | 2,000,000 |