Understand your videos with groundbreaking AI. Extract more from videos than ever before.
Unlock the wealth of data stored in any video. Twelve Labs can index petabytes of video content and make it semantically searchable with everyday language
Unlock the wealth of data stored in any video. Twelve Labs can index petabytes of video content and make it semantically searchable with everyday language
Explore your content by leveraging our rich embeddings. Generate any open-ended text formats tailored to your needs, from Q&A and creative suggestions to content analysis.
Synthesize content to create concise and efficient descriptions, highlights, and chapters useful for content management, exploration, and understanding.
Create topic categories, video titles, and hashtags helpful for marketing, advertising, and ideation use cases.
Not audio or video. Pegasus naturally understands videos in their totality to understand content like you do.
Use our out of the box templates to kickstart your video understanding or use custom prompts specific to your use case.
Quickly index once, generate text prompts in seconds.
from
import os
client = TwelveLabs(<"YOUR_API_KEY">)
# Create new Index
index = client.index.create(
name="My First Index",
engines=[
{
"name": "marengo2.6",
"options": ["visual", "conversation", "text_in_video"],
},
],
)
# Create new Task on Index (Upload video)
video_path = os.path.join(os.path.dirname(__file__), "<YOUR_FILE_PATH>")
task = client.task.create(index_id=index.id, file=video_path, language="en")
# Wait for indexing to finish
task.wait_for_done()
# Search from your index
query = "An artist climbing up the ladder that he painted."
result = client.search.query(index.id, query, ["visual", "conversation"])
print(result)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from twelvelabs import TwelveLabs
import os
client = TwelveLabs(<"YOUR_API_KEY">)
# Create new Index
index = client.index.create(
name="My First Index",
engines=[
{
"name": "pegasus1",
"options": ["visual", "conversation"],
},
],
)
# Create new Task on Index (Upload video)
video_path = os.path.join(os.path.dirname(__file__), "<YOUR_FILE_PATH>")
task = client.task.create(index_id=index.id, file=video_path, language="en")
# Wait for indexing to finish
task.wait_for_done()
# Generate Open-ended text from your video
prompt = "Give me an analysis of how the advertisement uses facial expressions to convey its message."
res = client.generate.text(task.video_id, prompt)
print(res.data)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
The advertisement effectively uses facial expressions to convey its message. The child brushing their teeth is shown with a big smile, indicating that dental health is enjoyable and can bring joy. The child's dancing and pointing towards the camera further emphasizes the enthusiasm and excitement for brushing.The woman holding the child on the sofa also displays a warm and caring expression, indicating the importance of parental involvement in dental hygiene.
from
import os
client = TwelveLabs(<"YOUR_API_KEY">)
# Create new Index
index = client.index.create(
name="My First Index",
engines=[
{
"name": "marengo2.6",
"options": ["visual", "conversation", "text_in_video"],
},
],
)
# Create new Task on Index (Upload video)
video_path = os.path.join(os.path.dirname(__file__), "<YOUR_FILE_PATH>")
task = client.task.create(index_id=index.id, file=video_path, language="en")
# Wait for indexing to finish
task.wait_for_done()
# Search from your index
query = "An artist climbing up the ladder that he painted."
result = client.search.query(index.id, query, ["visual", "conversation"])
print(result)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import { TwelveLabs } from 'twelvelabs';
import fs from 'fs';
import path from 'path';
const client = new TwelveLabs({ apiKey: '<YOUR_API_KEY>' });
// Create new Index
const index = await client.index.create({
name: 'My First Index',
engines:[
{
name: 'marengo2.6',
options: ['visual', 'conversation', 'text_in_video'],
},
]
});
// Create new Task on Index (Upload the video)
const videoPath = path.join(__dirname, '<YOUR_FILE_PATH>');
const task = await client.task.create({
indexId: index.id,
file: fs.createReadStream(videoPath),
language: 'en',
});
// Wait for indexing to finish
await task.waitForDone();
// Generate Open-ended text from your video
const prompt = "Give me an analysis of how the advertisement uses facial expressions to convey its message."
const result = await client.generate.text(task.videoId, prompt)
prconsole.log(result)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
The advertisement effectively uses facial expressions to convey its message. The child brushing their teeth is shown with a big smile, indicating that dental health is enjoyable and can bring joy. The child's dancing and pointing towards the camera further emphasizes the enthusiasm and excitement for brushing.The woman holding the child on the sofa also displays a warm and caring expression, indicating the importance of parental involvement in dental hygiene.
from
import os
client = TwelveLabs(<"YOUR_API_KEY">)
# Create new Index
index = client.index.create(
name="My First Index",
engines=[
{
"name": "marengo2.6",
"options": ["visual", "conversation", "text_in_video"],
},
],
)
# Create new Task on Index (Upload video)
video_path = os.path.join(os.path.dirname(__file__), "<YOUR_FILE_PATH>")
task = client.task.create(index_id=index.id, file=video_path, language="en")
# Wait for indexing to finish
task.wait_for_done()
# Search from your index
query = "An artist climbing up the ladder that he painted."
result = client.search.query(index.id, query, ["visual", "conversation"])
print(result)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { TwelveLabs } from 'twelvelabs';
import fs from 'fs';
import path from 'path';
const client = new TwelveLabs({ apiKey: '<YOUR_API_KEY>' });
// Create new Index
const index = await client.index.create({
name: 'My First Index',
engines:[
{
name: 'marengo2.6',
options: ['visual', 'conversation', 'text_in_video'],
},
]
});
// Create new Task on Index (Upload the video)
const videoPath = path.join(__dirname, '<YOUR_FILE_PATH>');
const task = await client.task.create({
indexId: index.id,
file: fs.createReadStream(videoPath),
language: 'en',
});
// Wait for indexing to finish
await task.waitForDone();
// Generate Open-ended text from your video
const prompt = "Give me an analysis of how the advertisement uses facial expressions to convey its message."
const result = await client.generate.text(task.videoId, prompt)
prconsole.log(result)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
The advertisement effectively uses facial expressions to convey its message. The child brushing their teeth is shown with a big smile, indicating that dental health is enjoyable and can bring joy. The child's dancing and pointing towards the camera further emphasizes the enthusiasm and excitement for brushing.The woman holding the child on the sofa also displays a warm and caring expression, indicating the importance of parental involvement in dental hygiene.
from
import os
client = TwelveLabs(<"YOUR_API_KEY">)
# Create new Index
index = client.index.create(
name="My First Index",
engines=[
{
"name": "marengo2.6",
"options": ["visual", "conversation", "text_in_video"],
},
],
)
# Create new Task on Index (Upload video)
video_path = os.path.join(os.path.dirname(__file__), "<YOUR_FILE_PATH>")
task = client.task.create(index_id=index.id, file=video_path, language="en")
# Wait for indexing to finish
task.wait_for_done()
# Search from your index
query = "An artist climbing up the ladder that he painted."
result = client.search.query(index.id, query, ["visual", "conversation"])
print(result)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import { TwelveLabs } from 'twelvelabs';
import fs from 'fs';
import path from 'path';
const client = new TwelveLabs({ apiKey: '<YOUR_API_KEY>' });
# Create new Index
const index = await client.index.create({
name: 'My First Index',
engines:[
{
name: 'marengo2.6',
options: ['visual', 'conversation', 'text_in_video'],
},
]
});
# Create new Task on Index (Upload video)
const videoPath = path.join(__dirname, '<YOUR_FILE_PATH>');
const task = await client.task.create({
indexId: index.id,
file: fs.createReadStream(videoPath),
language: 'en',
});
# Wait for indexing to finish
await task.waitForDone();
# Generate Open-ended text from your video
prompt = "Give me an analysis of how the advertisement uses facial expressions to convey its message."
res = await client.generate.text(task.videoId, prompt)
print(res.data)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
The advertisement effectively uses facial expressions to convey its message. The child brushing their teeth is shown with a big smile, indicating that dental health is enjoyable and can bring joy. The child's dancing and pointing towards the camera further emphasizes the enthusiasm and excitement for brushing.The woman holding the child on the sofa also displays a warm and caring expression, indicating the importance of parental involvement in dental hygiene.