AyaSpeech Logo

Machine Translation (MT)

Translate text between English and Twi in real time.

Endpoint

POST /translate

Request Body

FieldTypeDescription
textstring (required)Text to translate
source_lang_namestring (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

TierDaily RequestsMonthly Characters
Free525,000
Premium1,0002,000,000