Extract insights from video
curl --request POST \
--url https://app.dumplingai.com/api/v1/extract-video \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inputMethod": "url",
"video": "https://example.com/demo.mp4",
"prompt": "Summarize the main takeaways and capture speaker quotes.",
"jsonMode": true
}
'import requests
url = "https://app.dumplingai.com/api/v1/extract-video"
payload = {
"inputMethod": "url",
"video": "https://example.com/demo.mp4",
"prompt": "Summarize the main takeaways and capture speaker quotes.",
"jsonMode": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
inputMethod: 'url',
video: 'https://example.com/demo.mp4',
prompt: 'Summarize the main takeaways and capture speaker quotes.',
jsonMode: true
})
};
fetch('https://app.dumplingai.com/api/v1/extract-video', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.dumplingai.com/api/v1/extract-video",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'inputMethod' => 'url',
'video' => 'https://example.com/demo.mp4',
'prompt' => 'Summarize the main takeaways and capture speaker quotes.',
'jsonMode' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.dumplingai.com/api/v1/extract-video"
payload := strings.NewReader("{\n \"inputMethod\": \"url\",\n \"video\": \"https://example.com/demo.mp4\",\n \"prompt\": \"Summarize the main takeaways and capture speaker quotes.\",\n \"jsonMode\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.dumplingai.com/api/v1/extract-video")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"inputMethod\": \"url\",\n \"video\": \"https://example.com/demo.mp4\",\n \"prompt\": \"Summarize the main takeaways and capture speaker quotes.\",\n \"jsonMode\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dumplingai.com/api/v1/extract-video")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inputMethod\": \"url\",\n \"video\": \"https://example.com/demo.mp4\",\n \"prompt\": \"Summarize the main takeaways and capture speaker quotes.\",\n \"jsonMode\": true\n}"
response = http.request(request)
puts response.read_body{
"results": "<string>",
"prompt": "<string>",
"videoDuration": 123,
"creditUsage": 123
}{
"error": "<string>"
}{
"error": "<string>"
}Document Processing
Extract Video
Extract transcripts, frames, and metadata from video files or URLs.
POST
/
api
/
v1
/
extract-video
Extract insights from video
curl --request POST \
--url https://app.dumplingai.com/api/v1/extract-video \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inputMethod": "url",
"video": "https://example.com/demo.mp4",
"prompt": "Summarize the main takeaways and capture speaker quotes.",
"jsonMode": true
}
'import requests
url = "https://app.dumplingai.com/api/v1/extract-video"
payload = {
"inputMethod": "url",
"video": "https://example.com/demo.mp4",
"prompt": "Summarize the main takeaways and capture speaker quotes.",
"jsonMode": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
inputMethod: 'url',
video: 'https://example.com/demo.mp4',
prompt: 'Summarize the main takeaways and capture speaker quotes.',
jsonMode: true
})
};
fetch('https://app.dumplingai.com/api/v1/extract-video', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.dumplingai.com/api/v1/extract-video",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'inputMethod' => 'url',
'video' => 'https://example.com/demo.mp4',
'prompt' => 'Summarize the main takeaways and capture speaker quotes.',
'jsonMode' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.dumplingai.com/api/v1/extract-video"
payload := strings.NewReader("{\n \"inputMethod\": \"url\",\n \"video\": \"https://example.com/demo.mp4\",\n \"prompt\": \"Summarize the main takeaways and capture speaker quotes.\",\n \"jsonMode\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.dumplingai.com/api/v1/extract-video")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"inputMethod\": \"url\",\n \"video\": \"https://example.com/demo.mp4\",\n \"prompt\": \"Summarize the main takeaways and capture speaker quotes.\",\n \"jsonMode\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dumplingai.com/api/v1/extract-video")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inputMethod\": \"url\",\n \"video\": \"https://example.com/demo.mp4\",\n \"prompt\": \"Summarize the main takeaways and capture speaker quotes.\",\n \"jsonMode\": true\n}"
response = http.request(request)
puts response.read_body{
"results": "<string>",
"prompt": "<string>",
"videoDuration": 123,
"creditUsage": 123
}{
"error": "<string>"
}{
"error": "<string>"
}Extract Video API Documentation
Description
This endpoint extracts structured data from video files based on a user-defined prompt. It supports input via URL or base64-encoded video content and uses vision-capable Large Language Models (LLMs) to interpret and extract relevant information from the videos. Please note that this endpoint is charged per second of video duration!Endpoint
POST https://app.dumplingai.com/api/v1/extract-video
Headers
- Content-Type:
application/json - Authorization: Bearer
<API_KEY>(required)
Request Body
{
"inputMethod": "string", // Required. Either "url" or "base64".
"video": "string", // Required. URL or base64-encoded video content.
"prompt": "string", // Required. The prompt describing the data to extract.
"jsonMode": boolean // Optional. Whether to return the result in JSON format. Default: false.
}
Responses
Success (200)
Returns the extracted data based on the provided prompt, along with additional information.{
"results": "string", // Extracted data based on the prompt
"prompt": "string", // The original prompt used for extraction
"videoDuration": number, // Duration of the video in seconds
"creditUsage": number // Total credits used for this request
}
- Content-Type: application/json
- X-RateLimit-Limit: The rate limit for the user.
- X-RateLimit-Remaining: The remaining number of requests for the user.
Bad Request (400)
Returned if the request is invalid or the video file exceeds size or duration limits.{
"error": "Error message describing the issue"
}
Unauthorized (401)
Returned if the API key is invalid or missing.{
"error": "Invalid or missing Authorization header"
}
Internal Server Error (500)
Returned if there’s an error during the video extraction process.{
"error": "Failed to extract video data: [error details]"
}
Example Request
curl -X POST https://app.dumplingai.com/api/v1/extract-video \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"inputMethod": "url",
"video": "https://example.com/sample-video.mp4",
"prompt": "Describe the main events in this video.",
"jsonMode": false
}'
Notes
- The maximum file size for a video is 2GB.
- The maximum video duration is 1 hour (3600 seconds).
- Supported video formats: mp4, mpeg, mov, avi, flv, mpg, webm, wmv, 3gpp
- Credit usage:
- Base cost: 100 credits
- Additional 10 credits per second of video duration
- The total credit usage is returned in the response as
creditUsage. - If using the URL method, ensure the video is publicly accessible.
- The
jsonModeparameter determines whether the output is formatted as JSON (true) or plain text (false). - The endpoint uses the Gemini 1.5 Pro model for video analysis and data extraction.
- Temporary files are created during processing and are deleted after use.
- You can get a list of supported video formats by calling:
GET /api/v1/extract-video
Rate Limiting
Rate limit headers (X-RateLimit-Limit and X-RateLimit-Remaining) are included in the response to indicate the user’s current rate limit status.
Error Handling
- If the required parameters (
videoorprompt) are missing, a 400 Bad Request error is returned. - If the video file size exceeds 2GB, a 400 Bad Request error is returned.
- If the video duration exceeds 1 hour, a 400 Bad Request error is returned.
- If there’s an error during extraction, a 500 Internal Server Error is returned with details about the failure.
Security and Privacy
- Uploaded videos are temporarily stored and then deleted after processing.
- Video metadata (including duration) is checked using a separate Python service before processing.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Indicates whether binary content is supplied via URL or base64-encoded string.
Available options:
url, base64 Video URL or base64-encoded video content to analyze.
Instructions describing the insights to extract from the video.
When true, requests the model to respond with JSON-formatted output.
Optional identifier describing where the API request originated.
Available options:
API, WEB, MAKE_DOT_COM, ZAPIER, N8N, PLAYGROUND, DEFAULT_AUTOMATION, AGENT_PREVIEW, AGENT_LIVE, AUTOPILOT, STUDIO