> This page is for version v1.3 (default).
> For other versions, use one of these documentation indexes:
> - v1.3 (default): https://docs.twelvelabs.io/v1.3/llms.txt

> 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.

# Claude Code Plugin

> Search, analyze, and create embeddings directly in Claude Code.

Use the TwelveLabs Claude Code plugin to search videos, analyze their content, and create embeddings without leaving Claude Code.

> **Note**
>
> The Claude Code plugin and the [MCP server](/v1.3/docs/advanced/model-context-protocol) both connect Claude to the TwelveLabs Video Understanding Platform. Use the plugin if you work exclusively in Claude Code. Use the MCP server if you work across multiple AI clients.

**Key features**:

* **Video search**: Find specific moments in your videos using natural language, images, or combined text and image queries.
* **Video analysis**: Generate summaries, extract insights, create action items, and ask questions about your video content.
* **Embeddings**: Create multimodal embeddings for similarity search, clustering, recommendation systems, or other downstream AI tasks.
* **Natural language or slash commands**: Describe tasks in plain English or run commands directly using the `/twelvelabs:` namespace.
* **Google Drive support**: Index videos directly from Google Drive file or folder links.

# Prerequisites

* To use the platform, you need an API key:

  If you don't have an account, [sign up](https://playground.twelvelabs.io/) for a free account.

  Go to the [API Keys](https://playground.twelvelabs.io/dashboard/api-keys) page.

  If you need to create a new key, select the **Create API Key** button. Enter a name and set the expiration period. The default is 12 months.

  Select the **Copy** icon next to your key to copy it to your clipboard.

* [Claude Code](https://claude.ai/code) installed on your machine.

# Set up the plugin

Set your TwelveLabs API key as an environment variable.

```bash
export TWELVELABS_API_KEY=<YOUR_API_KEY>
```

In Claude Code, add the TwelveLabs plugin marketplace.

```
/plugin marketplace add twelvelabs-io/twelve-labs-claude-code-plugin
```

Install the plugin.

```
/plugin install twelvelabs@twelvelabs-plugins
```

Restart Claude Code.

# Use the plugin

The plugin adds slash commands to Claude Code under the `/twelvelabs:` namespace. You can also describe tasks in plain English, and Claude will invoke the appropriate commands. See the [Natural language usage](https://github.com/twelvelabs-io/twelve-labs-claude-code-plugin?tab=readme-ov-file#natural-language) section in the GitHub repository for examples.

Before searching or analyzing, index your videos using `/twelvelabs:index-video`.

For the full list of commands and usage examples, see the [TwelveLabs Claude Code plugin](https://github.com/twelvelabs-io/twelve-labs-claude-code-plugin) repository on GitHub.

**Examples**:

* `/twelvelabs:search`: Find specific moments using a natural language query.
* `/twelvelabs:analyze`: Analyze a video to generate text based on its content.
* `/twelvelabs:embed`: Create embeddings for downstream AI tasks.

# Troubleshooting

If you encounter issues after installation, see the [Troubleshooting](https://github.com/twelvelabs-io/twelve-labs-claude-code-plugin?tab=readme-ov-file#troubleshooting) section in the GitHub repository.

# Next steps

* Read the [TwelveLabs Claude Code plugin](https://www.twelvelabs.io/blog/claude-code-plugin) blog post for an overview of the plugin and its use cases.
* See the [full command reference](https://github.com/twelvelabs-io/twelve-labs-claude-code-plugin?tab=readme-ov-file#commands) on GitHub.