This API translates text from English to Indonesian using a pre-trained machine learning model. The service is hosted on Google Cloud Run for efficient, real-time translation.
- Translation Model (MT.h5):
Download Here
- English Source Dataset:
Download OpenSubtitles.en-id.en - Indonesian Target Dataset:
Download OpenSubtitles.en-id.id
- Input Tokenizer:
Download input_tokenizer.pkl - Output Tokenizer:
Download output_tokenizer.pkl
https://translate-api-65059410484.asia-southeast2.run.app
Method: GET
URL: /translate
Query Parameters:
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
text |
string | Yes | The text to translate (UTF-8) | good morning |
Status Code: 200 OK
Content-Type: application/json
Response Body:
{
"input_text": "good morning",
"translated_text": "selamat pagi."
}
curl "https://translate-api-65059410484.asia-southeast2.run.app/translate?text=good%20morning"
Response:
{
"input_text": "good morning",
"translated_text": "selamat pagi."
}