Cover

Developer Hub

Explore our guides and examples to integrate TwelveLabs

Easily build features like semantic search, anomaly detection, content recommenders and capabilities tailored to you. Our API unlocks your video’s full potential.

Try our API.

Analyze
Embed
検索

Get your API keys from the dashboard page and ensure the TwelveLabs SDK is installed on your computer:

PYTHON
NODE

$

pip install twelvelabs

You can copy and paste the code below to analyze videos and generate text based on their content. Replace the placeholders surrounded by <> with your values.

PYTHON
NODE

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

from twelvelabs import TwelveLabs

from twelvelabs.indexes import IndexesCreateRequestModelsItem

from twelvelabs.tasks import TasksRetrieveResponse

 

client = TwelveLabs(api_key="<YOUR_API_KEY>")

 

index = client.indexes.create(

index_name="<YOUR_INDEX_NAME>",

models=[

IndexesCreateRequestModelsItem(

model_name="pegasus1.2", model_options=["visual", "audio"]

)

]

)

print(f"Created index: id={index.id}")

 

task = client.tasks.create(

index_id=index.id, video_url="<YOUR_VIDEO_URL>")

print(f"Created task: id={task.id}")

 

def on_task_update(task: TasksRetrieveResponse):

print(f" Status={task.status}")

 

task = client.tasks.wait_for_done(task_id=task.id, callback=on_task_update)

if task.status != "ready":

raise RuntimeError(f"Indexing failed with status {task.status}")

print(

f"Upload complete. The unique identifier of your video is {task.video_id}.")

 

text_stream = client.analyze_stream(video_id=task.video_id, prompt="<YOUR_PROMPT>")

for text in text_stream:

if text.event_type == "text_generation":

print(text.text)

Jump right in with a
Sample App...

Discover what TwelveLabs can do by experimenting with our fully functional sample applications.

Discover what TwelveLabs can do by experimenting with our fully functional sample applications.

Python

Who talked about us

Use semantic search capabilities of the platform to identify the most suitable influencers to reach out to.

Node

Generate social media posts for your videos

Simplify the cross-platform video promotion workflow by generating unique posts for each social media platform.

Python

Shade finder

This application uses the image-to-video search feature to find color shades in videos.

Jump right in with a
Sample App...

Discover what TwelveLabs can do by experimenting with our fully functional sample applications.

Python

Who talked about us

Use semantic search capabilities of the platform to identify the most suitable influencers to reach out to.

Node

Generate social media posts for your videos

Simplify the cross-platform video promotion workflow by generating unique posts for each social media platform.

Python

Shade finder

This application uses the image-to-video search feature to find color shades in videos.

当社のモデルラインアップ。

Learn more about TwelveLabs’ world-leading video foundation models.

私たちTwelveLabsは、人間と同レベルの推論力で課題を解決する「動画特化型AIシステム」を開発しています。AI がこの世界について学習するのをサポートし、人々が映像のストーリーをより的確に検索・抽出して、魅力的に発信できるよう支援します。

Cover image
Logo animated

Marengo

TwelveLabsの革新的な動画基盤モデルは、映像フレームとその時間的関係性に加え、音声やサウンドまで統合的に解析します。検索およびあらゆるモダリティ間検索タスクにおいて飛躍的な進化を実現しています。

Cover
Logo animated

Pegasus

TwelveLabsの強力な動画ファーストの言語モデルは、映像・音声・発話情報を統合します。高度な動画理解を活用し、テキスト生成において新たな到達点を実現します。

Support and guidance

Contact

Have a question? Get in touch with a member of the TwelveLabs team for help.

Community

Connect with the TwelveLabs community for ideas, tips, and knowledge sharing.

Support and guidance

Contact

Have a question? Get in touch with a member of the TwelveLabs team for help.

Community

Connect with the TwelveLabs community for ideas, tips, and knowledge sharing.