How to check grammar and spelling of your text content with JavaScript?
Tags: ai, api, javascript, spellcheck
Published: 2023-06-02 16:04:35

*In this tutorial, you will learn how to use Grammar & Spelling Check API in 5 minutes using JavaScript. Eden AI provides an easy and developer-friendly API that allows you to check grammar and spelling in your text content.*

‍

## **What is [AI Grammar & Spell Checker?](http://www.edenai.co/feature/grammar-spell-check?referral=spellcheck-javascript)**

AI Spell Check API typically uses natural language processing (NLP) techniques, machine learning algorithms, and large language models to analyze text input and detect errors in grammar, spelling, punctuation, and sentence structure. It can identify and suggest corrections for various types of mistakes, such as misspelled words, incorrect verb conjugations, faulty syntax, or improper word usage.




![AI Grammar & Spell Check API result on Eden AI](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/er4j725zup71wb98k9ja.png)




By automatically identifying and correcting errors, this technology can be used to enhance the quality of written content, improve user experience, and ensure better communication. It can be particularly useful in applications like word processors, email clients, chatbots, content management systems, language learning platforms, and any other system where accurate writing remains important.

‍

## **Get Started with Grammar & Spell Check 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.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vqnyoxakdj47m6baumb2.png)


‍

## **How to use Grammar & Spell Check API with JavaScript**

You are now ready to process text into Eden AI Grammar & Spelling Check API. You can access the list of languages supported in our documentation [here](https://docs.edenai.co/reference/text_spell_check_create?referral=spellcheck-javascript).

‍

### **1. Get your Spell Check API Key on Eden AI**

To perform Grammar & Spell Check, you'll need to create an account on [Eden AI](https://app.edenai.run/user/register?referral=spellcheck-javascript) for free. Then, you'll be able to get your **API key** directly from the homepage with free credits offered by Eden AI.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gxbd0d61bxgxnuobnc9p.png)


[**Get your API key for FREE**](https://app.edenai.run/user/register?referral=spellcheck-javascript)

### **2. Let’s check grammar and spelling in your text content**

Now that you have imported packages on JavaScript and got your API key, you will be able to check grammar and spelling in your text content. With Eden AI, you can choose from a wide range of engines you want for AI Spell Checker. You can access the list of Grammar & Spelling Check providers available on Eden AI directly on our [documentation](https://docs.edenai.co/reference/text_spell_check_create?referral=spellcheck-javascript).

‍

For example, we called two different Grammar & Spelling Check engines. Here is the JS code to configure the request:

![https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/64648c518cdbe7051385cc8f_carbon(113).png](https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/64648c518cdbe7051385cc8f_carbon(113).png)

‍

Then, you'll need to launch the request and print the result:

![https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/646489835d0d2c49f4bb4ccc_carbon(108).png](https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/646489835d0d2c49f4bb4ccc_carbon(108).png)

‍

Here is an example of a Grammar & Spell Check API response:

![https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/646395d728fbe7caae74c5f5_carbon(103).png](https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/646395d728fbe7caae74c5f5_carbon(103).png)

‍

## **Benefits of using Grammar & Spell Checker with Eden AI**

Using Grammar & Spell Check with Eden AI API is quick and easy.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/18r5oixu6d2l8412dbnz.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 Grammar & Spell Check request with specific parameters, check out our [documentation.](https://docs.edenai.co/reference/text_spell_check_create?referral=spellcheck-javascript)

‍

**[Create your Account on Eden AI](https://app.edenai.run/user/register?referral=spellcheck-javascript)**