Heexy Translate API
Heexy Translate API is an advanced translation solution that offers unlimited and free translation services for over 130 languages. Our API is designed to be simple and user-friendly, with powerful machine learning algorithms that provide highly accurate and contextually appropriate translations. With unrestricted access to our translation services and the absence of rate limits, our API is the perfect choice for your translation projects. Our API can be easily integrated into existing applications with minimal coding efforts.
Basic Info
Base URL for v1 is https://api.heexy.org/translate/v1/
.
All endpoints have CORS enabled.
All endpoints return status code 400
on an invalid request, 500
on a server error, and 200
on success.
Available Endpoints
GET /listLanguages
Returns a JSON array containing all available languages.
Example Request:
GET /translate/v1/listLanguages
URL Parameters:
type
- set totts
to show TTS languages
Example Response:
[
...
{
"name": "English",
"code": "en"
},
...
]
GET /translate
Returns JSON containing the translated text.
Example Request:
GET /translate/v1/translate?text=hello&from=en&to=fr
URL Parameters:
text
- text to translatefrom
- source language (leave blank to auto-detect)to
- target language
Example Response:
{
"result": "Bonjour"
}
GET /tts
Returns an MPEG audio file. This is limited to 200 characters due to file size. We recommend splitting larger text into multiple requests and then joining them into a single file.
Example Request:
GET /translate/v1/tts?lang=en&text=hello
URL Parameters:
text
- textlang
- text language
Example Response:
GET /translate/v1/tts?lang=en&text=hello
Code Examples
const axios = require('axios');
const baseURL = 'https://api.heexy.org/translate/v1/';
// Function to get the list of available languages
async function getListOfLanguages() {
try {
const response = await axios.get(baseURL + 'listLanguages');
console.log(response.data);
} catch (error) {
console.error(error);
}
}
// Function to translate text
async function translateText(text, fromLanguage, toLanguage) {
try {
const response = await axios.get(baseURL + 'translate', {
params: {
text: text,
from: fromLanguage,
to: toLanguage,
},
});
console.log(response.data.result);
} catch (error) {
console.error(error);
}
}
// Example usage:
getListOfLanguages(); // To get the list of available languages
translateText('hello', 'en', 'cs'); // To translate "hello" from English to Czech
License
You may or may not indicate that you use Heexy translate and provide a link to it, if you do so you will support us, if you are interested in working with Heexy please do not hesitate to contact us, here is a link to ways to contact us.
Was this page helpful?