
Start Your AI Journey Today
- Access 100+ AI APIs in a single platform.
- Compare and deploy AI models effortlessly.
- Pay-as-you-go with no upfront fees.
This article shows how to use Eden AI’s label detection API with JavaScript to analyze videos. It covers the two-step process of launching and retrieving job results, as well as managing tasks like listing and deleting jobs.
Label detection, or Object Detection plays a crucial role in video and image analysis by identifying and classifying elements within each frame like objects, people, animals, or landmarks.
This process enhances content tagging, indexing, and searchability. In this tutorial, we’ll guide you through implementing label detection using JavaScript and the Eden AI API.
With just a few lines of code, you’ll be able to analyze visual content and extract valuable insights effortlessly.
Label detection automatically identifies and categorizes objects, people, and scenes in videos or images. It assigns labels like animals, buildings, or landmarks to visual elements, making content easier to search, organize, and analyze.
1. Sign up: Visit Eden AI and create an account for free to get started. Once registered, go to the API section to find your personal API key which gives you access to AI services, including Label Detection.
2. Navigate to Video Technologies – Log in and head to the Video Technologies section.
3. Select Label Detection– From there, select the Label Detection option.
Eden AI lets you experiment with various AI models before integration, making it easy to compare and choose the provider that best fits your needs.
To get started, you'll need to install Axios. Axios is a promise-based HTTP client for the browser and Node.js, which makes it easy to send asynchronous HTTP requests.
The label detection API in Eden AI is asynchronous, meaning it works in two stages:
This two-phase system is essential for processing larger media files, which can take time to analyze. Instead of waiting for the process to finish in a single request, the async model allows you to start the job and check back later.
This POST part of the code sends a request to Eden AI to start the label detection job.
Once your job is submitted and processed, retrieve the results using the public_id.
Here’s an example of what the response might look like:
For better management of your label detection tasks, Eden AI provides additional optional steps:
GET Request:
https://api.edenai.run/v2/video/label_detection_async/
This lets you list all jobs submitted for label detection. You can use the public_id of each job to monitor its status or fetch results. You can check the full documentation here.
DELETE Request:
https://api.edenai.run/v2/video/label_detection_async/
Use this to delete jobs you no longer need, helping you clean up and organize your task history.. You can check the full documentation here.
Eden AI offers a robust Label Detection solution with several advantages.
Eden AI allows you to compare and use multiple providers like Google and Amazon at once.
Eden AI simplifies the integration of label detection into your applications with clear and straightforward JavaScript code examples.
The Eden AI platform prioritizes data security and privacy, ensuring that your image data is handled securely.
Using Eden AI with JavaScript gives you fast, flexible access to powerful label detection tools. With an easy-to-use async API and support for top AI providers, you can quickly integrate object recognition into your applications.
By combining real-time video intelligence with job management features like listing and deleting jobs, Eden AI is a reliable and scalable choice for developers and businesses alike.
You can directly start building now. If you have any questions, feel free to chat with us!
Get startedContact sales