> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.twelvelabs.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.twelvelabs.io/_mcp/server.

# Analyze and segment videos

> Analyze videos to generate text and extract structured, timestamped segments.

Use the Analyze API to analyze videos, generate text based on their content, and extract structured, timestamped segments.

# Choose an endpoint

* For videos under 1 hour, use the [`POST`](/v1.3/api-reference/analyze-videos/sync-analysis) method of the `/analyze` endpoint. This endpoint returns results immediately and supports real-time streaming.
* For videos up to 2 hours, a portion of a video up to 4 hours long, or video segmentation, use the [`POST`](/v1.3/api-reference/analyze-videos/create-async-analysis-task) method of the `/analyze/tasks` endpoint. This endpoint processes videos asynchronously.
* For multiple videos, use the [`POST`](/v1.3/api-reference/analyze-videos/batch-analysis/create-batch) method of the `/analyze/batches` endpoint. This endpoint processes multiple analysis requests in one batch.

**Related guide**: [Analyze videos](/v1.3/docs/guides/analyze-videos).

[**Related quickstart notebook**](https://colab.research.google.com/github/twelvelabs-io/twelvelabs-developer-experience/blob/main/quickstarts/TwelveLabs_Quickstart_Analyze.ipynb)