Summarize this article with:
In this tutorial, you will learn how to use Automatic Translation API in 5 minutes using Python and Eden AI Automatic Translation API. Eden AI provides a unique and developer-friendly API that allows you to automatically translate text into more than 30 languages.
What is Machine Translation?
Machine translation or automatic translation is the application of software to automatically translate text from one natural language (the source) to another (the target). At its most basic, machine translation performs simple substitution of words in one language for words in another, but that alone cannot produce an accurate translation. More sophisticated systems attempt to capture the meaning of the original text and represent that in the target language.
Getting Started with Translation API
The first step to using Translation API with Python is to install Python's requests package, that will allow you to call Eden AI API.

Next, you'll need to install Python's JSON package in order to read and print the result of the API request.

How to use Translation API with Python
You are now ready to process your text into Eden AI Translation API.
1. Get a Translation API Key on Eden AI
To perform Automatic Translation, make sure to create an account on Eden AI for free. Then, you will be able to get your API key direclty from the homepage with free credits offered by Eden AI.

2. Start translating your text
Now that you have imported packages on Python and gotten your API key, you will be able to translate texts. With Eden AI, you can choose from a range of different engines you want for Automatic Translation. To help you choose the best provider according to your needs and type of project, you can access our list of Translation providers.
Here is the Python script you need to write on your notebook:

As shown above, we have called two different Translation engines in the script. Subsequently, Eden AI API will return in its JSON response results of those providers.
Once the request is done, you will be able to get the result with this print :

Here is an example of a Translation API response:

Benefits of using Translation API with Eden AI
Using Translation with Eden AI API is quick and easy.

Save time and cost
We offer a unified API for all providers: simple and standard to use, with a quick switch between providers and an access to the specificic features of each provider
Easy to integrate
The JSON output format is the same for all suppliers thanks to Eden AI's standardisation work. The response elements are also standardised thanks to Eden AI's powerful matching algorithms.
Customization
With Eden AI you have the possibility to integrate a third party platform: we can quickly develop connectors. To go further and customize your Automatic Translation request with specific parameters, check out our documentation.
.avif)
.jpg)

.avif)
.avif)