Summarize this article with:
- Text Anonymization is the process of removing or replacing Personally Identifiable Information (PII) from a text to protect individual privacy.
- It can be used to protect sensitive information in various fields such as healthcare, finance and legal, where compliance regulations require the protection of sensitive information.
- The first step is to set Axios, a promise-based HTTP client for the browser and Node.js, that will allow you to call Eden AI API.
- We offer a unified API for all providers: simple and standard to use, with a quick switch between providers and an access to the specific features of each provider.
- With Eden AI you have the possibility to integrate a third-party platform: we can quickly develop connectors.
In this tutorial, you will learn how to use Text Anonymization API in 5 minutes using JavaScript. Eden AI provides an easy and developer-friendly API that allows you to anonymize your texts.
What is Text Anonymization?
Text Anonymization is the process of removing or replacing Personally Identifiable Information (PII) from a text to protect individual privacy. This process can involve a variety of methods, including masking names and addresses, removing sensitive details, and even generating synthetic data to anonymize text data.

It can be used to protect sensitive information in various fields such as healthcare, finance and legal, where compliance regulations require the protection of sensitive information.
Get Started with Text Anonymization API using JavaScript
The first step is to set Axios, a promise-based HTTP client for the browser and Node.js, that will allow you to call Eden AI API.
.png)
How to use Text Anonymization API with JavaScript
You are now ready to process text into Eden AI Text Anonymization API. You can access the list of languages supported in our documentation here.
1. Get a Text Anonymization API Key on Eden AI
To perform Text Anonymization, you'll need to create an account on Eden AI for free. Then, you will be able to get your API key directly from the homepage with free credits offered by Eden AI.

2. Let’s Anonymize Text
Now that you have imported packages on JavaScript and got your API key, you will be able to anonymize your text. With Eden AI, you can choose from a wide range of engines you want for Text Anonymization. You can access the list of keyword extraction providers available on Eden AI directly on our documentation.
Here is the JS code to configure the request:
.png)
Then, you'll need to launch the request and print the result:
.png)
Here is an example of a Text Anonymization response:
.png)
Benefits of using Text Anonymization API with Eden AI
As you can see, using Text Anonymization with Eden AI API is quick and easy.
.gif)
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 specific 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 Text Anonymization request with specific parameters, check out our documentation.
Frequently Asked Questions (FAQ)
What do I need to Anonymize Text (Personal Data) with JavaScript?
You need an API key from your chosen AI provider, or a single Eden AI key to access multiple providers. Most integrations also require basic knowledge of REST APIs and your programming language of choice.
Which programming languages can I use?
Any language that supports HTTP requests works — Python, JavaScript, PHP, Ruby, Go, and more. Eden AI provides ready-to-use code snippets for the most common languages to speed up integration.
How long does the integration take?
Most developers complete a basic integration in under an hour using standardized API endpoints and ready-to-use code examples. Complex production setups with fallback logic may take a few hours more.
How do I handle errors and rate limits?
Implement exponential backoff for rate limit errors and use try-catch blocks for network failures. Eden AI's built-in fallback routing automatically redirects requests if a provider is unavailable.
Is the data I send secure and GDPR-compliant?
Check each provider's data processing agreement. Eden AI supports GDPR-compliant provider filtering and does not store or reuse your data, ensuring compliance with European privacy regulations.
.png)
.jpg)

.jpeg)
.jpeg)