How to use Landmark Detection API with JavaScript in 5 minutes?
Tags: api, ai, javascript, contentdetection
Published: 2023-01-16 13:18:56

*In this tutorial, you will learn how to use Landmark Detection API in 5 minutes using JavaScript. Eden AI provides an easy and developer-friendly API that allows you to detect landmarks in images.*

## **What is [Landmark Detection?](https://www.edenai.co/feature/landmark-detection?referral=how-to-face-detection-javascript)**

Landmark detection is a technique used in computer vision to identify and locate specific, known structures or features in an image or video. This can include buildings, monuments, natural features, and other distinctive objects.

![Landmark Detection API result on Eden AI](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t6jy7oat1qrdz8xc5byl.png)

The output of a landmark detection system may include the location and shape of the detected landmarks, as well as a confidence score indicating how likely the detection is to be correct. Landmark detection is used in a variety of applications, including robotics, augmented reality, and self-driving cars.

## **Getting Started with Landmark Detection API using JavaScript**

The first step to use Landmark Detection is to set Axios, a promise-based HTTP client for the browser and Node.js, that will allow you to call Eden AI API.

![https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/638f08881993bd518d9ca0cc_carbon(3).png](https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/638f08881993bd518d9ca0cc_carbon(3).png)

Next, you'll need to initialize the File System module in order to access local files on your computer.

![https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/638f088e8cc139623cbbce22_carbon(2).png](https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/638f088e8cc139623cbbce22_carbon(2).png)

Finally, you'll need to create your multipart/formdata parameters form:

![https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/638f09b0a3de914651c26a15_formdata.png](https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/638f09b0a3de914651c26a15_formdata.png)

## **How to use Landmark Detection API with JavaScript**
### **1. Get a Landmark Detection API Key on Eden AI**

To perform Landmark Detection, you will need to create an account on [Eden AI](https://app.edenai.run/user/register?referral=how-to-landmark-detection-javascript) for free. Then, you will be able to get your **API key** directly from the homepage with free credits offered by Eden AI.

![Eden AI platform - Get your API key](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h2rtsmp33mxao0ndkzt1.PNG)

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

### **2. Let’s Detect Landmarks in your images**

Now that you have initialized the required JavaScript modules and got your API key, you will be able to detect landmarks in images. With Eden AI, you can choose from a wide range of different engines you want for Landmark Detection. You can access Landmark Detection providers available on Eden AI on our documentation [here](https://docs.edenai.co/reference/image_landmark_detection_create?referral=how-to-landmark-detection-javascript).

‍

Here is the JavaScript code to add the formdata parameters values for your request:

![https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/638f20ed823d9a6fc774ec61_carbon(8).png](https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/638f20ed823d9a6fc774ec61_carbon(8).png)

‍
For example, we called two different Landmark Detection engines. Once the parameters values are passed, you can configure your request:

![https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/638f20f9c1c3ba28f0dd9e9e_carbon(9).png](https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/638f20f9c1c3ba28f0dd9e9e_carbon(9).png)

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

![https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/638f1f33176ade43eda2b921_print-js.png](https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/638f1f33176ade43eda2b921_print-js.png)

Here is an example of a Landmark Detection API response:

![https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/63481ab792c5a8eb9d5da233_landmark-response.png](https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/63481ab792c5a8eb9d5da233_landmark-response.png)

## **Benefits of using Landmark Detection API with Eden AI**

Using Landmark Detection with Eden AI API is quick and easy.


![Multiple AI engines in one API](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oe0ycxelkvwm6mpwt73y.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 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 Landmark Detection request with specific parameters, check out our [documentation](https://docs.edenai.co/reference/image_landmark_detection_create?referral=how-to-landmark-detection-javascript)[.](https://docs.edenai.co/reference/image_face_detection_create?referral=how-to-face-detection-javascript)

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