Analyze videos
This quickstart guide provides a simplified introduction to analyzing videos to generate text using the TwelveLabs Video Understanding Platform. It includes the following:
- A basic working example
- Minimal implementation details
- Core parameters for common use cases
For a comprehensive guide, see the Analyze videos section.
Key concepts
This section explains the key concepts and terminology used in this guide:
- Index: A container that organizes your video content
- Asset: Your uploaded file
- Indexed asset: A video that has been indexed and is ready for downstream tasks
Workflow
Upload and index your videos before you analyze them. The platform indexes videos asynchronously. After indexing completes, you can analyze your videos using custom prompts to generate summaries, extract insights, answer content-related questions, or create structured responses tailored to your specific requirements.
Prerequisites
-
To use the platform, you need an API key:
-
Depending on the programming language you are using, install the TwelveLabs SDK by entering one of the following commands:
-
Your video files must meet the following requirements:
- For this guide: Files up to 4 GB when using publicly accessible URLs or 200 MB for local files
- Model capabilities: See the complete requirements for resolution, aspect ratio, and supported formats.
For other upload methods with different limits, see the Upload methods page.
Starter code
Copy and paste the code below, replacing the placeholders surrounded by <> with your values.
Code explanation
Import the SDK and initialize the client
Create a client instance to interact with the TwelveLabs Video Understanding Platform.
Create an index
Indexes store and organize your video data, allowing you to group related videos. Create one before uploading videos. See the Indexes page for more details.
Monitor the indexing process
Monitor the status of the indexing process. Processing completes when the status changes to “ready”.