Summarize this article with:
- Text Detection API in video refers to the process of identifying and extracting text from videos.
- 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.
- Developers can Extract Text from a Video (OCR) with JavaScript using a REST API that accepts standard inputs and returns structured JSON responses.
- The integration works with Python, JavaScript, PHP, and any HTTP-capable language with minimal setup.
- A multi-provider API removes the need to manage separate accounts and authentication per vendor.
In this tutorial, you will learn how to use Video Text Detection API in 5 minutes using JavaScript. Eden AI provides an easy and developer-friendly API that allows you to extract text in videos.
What is Video Text Detection API?
Text Detection API in video refers to the process of identifying and extracting text from videos. It involves using computer vision and optical character recognition (OCR) techniques to analyze the frames of a video and detect any text present within them.

Get Started with Video Text Detection 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)
Next, you'll need to initialize the File System module in order to access local files on your computer.
.png)
Finally, you'll need to create your multipart/formdata parameters form:

How to use Video Text Detection API with JavaScript
You are now ready to process your video file into Eden AI Video Text Detection API.
1. Get a Text Detection API Key on Eden AI
To perform Video Text Detection, you just need to create an account on Eden AI for free. On the homepage, you will be able to get your API key with free credits offered by Eden AI.
.webp)
2. Let’s Extract Text in your Video File
Now that you have initialized the required JavaScript modules and get your API key, you will be able to extract text in videos. On Eden AI, text detection in videos now goes through a multimodal LLM that accepts video as input: you upload your video file, then ask the model to extract the text it sees. You can choose any model with video in its input_modalities, as explained in our documentation.
Here is the JavaScript code to add the form data parameters values for your request:
form.append("file", fs.createReadStream("path/to/your/video.mp4"));
form.append("expires_in_days", "1");
const apiKey = "<your_api_key>";
Once the parameters values are passed, you can configure your upload request:
const options = {
method: "POST",
url: "https://api.edenai.run/v3/upload",
headers: {
authorization: `Bearer ${apiKey}`,
"Content-Type": `multipart/form-data; boundary=${form.getBoundary()}`,
},
data: form,
};
Then, you need to create launchJob() function that will execute POST request:
.png)
Finally, you have to create the detectText() function that sends the file_id returned by your POST request to the model, then chain the two calls:
const detectText = async (fileId) => {
axios.post("https://api.edenai.run/v3/chat/completions", {
model: "google/gemini-2.5-flash", // any model with video in its input_modalities
messages: [{
role: "user",
content: [
{ type: "text", text: "Extract all the text that appears in this video, with start and end times in seconds." },
{ type: "file", file: { file_id: fileId } }
]
}],
response_format: {
type: "json_schema",
json_schema: {
name: "texts",
schema: {
type: "object",
properties: {
texts: {
type: "array",
items: {
type: "object",
properties: {
text: { type: "string" },
start_time: { type: "number" },
end_time: { type: "number" }
},
required: ["text", "start_time", "end_time"]
}
}
},
required: ["texts"]
}
}
}
}, {
headers: { authorization: `Bearer ${apiKey}` }
})
.then((response) => {
console.log(response.data.choices[0].message.content);
})
.catch((error) => {
console.log(error);
});
};
launchJob(options).then((response) => {
console.log(response.data);
detectText(response.data.file_id);
});
You will first get this response, with the file_id of your uploaded video:
{
"file_id": "3043fe8b-6cba-408c-8ebb-3e76f95644ab",
"file_name": "video.mp4",
"file_size": 1047614,
"file_mimetype": "video/mp4",
"purpose": "general",
"metadata": {"duration": 10},
"created_at": "2026-10-12T15:56:13.860144Z",
"expires_at": "2026-10-13T15:56:13.860144Z"
}
Then the model returns the result of the Text Detection task as JSON. The times are estimated by the model: check them on a few of your own videos before relying on them.
{
"texts": [
{"text": "SUMMER SALE", "start_time": 0.0, "end_time": 3.0},
{"text": "FREE SHIPPING ON ALL SHOES", "start_time": 3.0, "end_time": 6.0}
]
}
Benefits of using Video Text Detection API with Eden AI
Using Video Text Detection 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 Video Text Detection request with specific parameters, check out our documentation.

.jpg)
