> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pictory.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Install & Configure

> Set up the Pictory Text-to-Video skill in Claude Code: install, add your API key, and verify in about five minutes

This page walks you through installing the Pictory Text-to-Video skill and connecting it
to your Pictory account. You only do this once.

## Prerequisites

* [Claude Code](https://claude.com/claude-code) installed:
  ```bash theme={null}
  npm install -g @anthropic-ai/claude-code
  ```
* A Pictory API key. Sign in at [app.pictory.ai](https://app.pictory.ai), click your
  profile picture (top-right), choose **API Subscription**, purchase a plan, and copy
  the key shown on that page. Keys start with `pictai_`.

## Step 1: Get the Skill

The skill lives in Pictory's public GitHub repository:
[github.com/pictoryai/pictory-claude-skills](https://github.com/pictoryai/pictory-claude-skills)

Clone it and copy the skill folder into Claude Code's skills directory:

> [tab] For all your projects (recommended)
>
> ```bash theme={null}
> git clone https://github.com/pictoryai/pictory-claude-skills.git
> mkdir -p ~/.claude/skills
> cp -r pictory-claude-skills/pictory-text-to-video ~/.claude/skills/
> ```
>
> The skill is now available in every Claude Code session on your machine.

> [tab] For one project only
>
> ```bash theme={null}
> git clone https://github.com/pictoryai/pictory-claude-skills.git
> mkdir -p /path/to/your/project/.claude/skills
> cp -r pictory-claude-skills/pictory-text-to-video /path/to/your/project/.claude/skills/
> ```
>
> The skill is available only when Claude Code runs inside that project folder,
> which is useful for teams that share skills through their project repository.

> [!TIP]
>
> Prefer automatic updates? Use a symlink instead of copying, then `git pull` in the
> cloned repository whenever you want the latest version:
>
> ```bash theme={null}
> ln -s "$(pwd)/pictory-claude-skills/pictory-text-to-video" ~/.claude/skills/pictory-text-to-video
> ```

## Step 2: Add Your Pictory API Key

The skill reads two environment variables:

| Variable | Value |
| - | - |
| `PICTORY_API_KEY` | Your API key (`pictai_…`), required |
| `PICTORY_API_BASE_URL` | `https://api.pictory.ai/pictoryapis`, the Pictory production API |

Add both to your shell profile so they're set in every terminal:

```bash theme={null}
echo 'export PICTORY_API_KEY="pictai_your_key_here"' >> ~/.zshrc
echo 'export PICTORY_API_BASE_URL="https://api.pictory.ai/pictoryapis"' >> ~/.zshrc
source ~/.zshrc
```

(Use `~/.bashrc` instead of `~/.zshrc` if your terminal runs bash.)

> [!WARNING]
>
> **Treat your API key like a password.** Anyone who has it can create videos on your
> account. Never commit it to a repository or paste it into shared documents. If it is
> ever exposed, regenerate it from the [API Subscription](https://app.pictory.ai/api-access) page.

> [accordion] Alternative: Set the Key for One Project Only
>
> Put the variables in the project's `.claude/settings.local.json` (this file is
> git-ignored by default, so the key stays off your repository):
>
> ```json theme={null}
> {
>   "env": {
>     "PICTORY_API_KEY": "pictai_your_key_here",
>     "PICTORY_API_BASE_URL": "https://api.pictory.ai/pictoryapis"
>   }
> }
> ```

If the key is missing when you ask for a video, the skill stops and asks you for it
before making any API call. It never guesses.

## Step 3: Verify

1. Open a **new** terminal (so the environment variables load) and start Claude Code:
   ```bash theme={null}
   claude
   ```
2. Type `/pictory-text-to-video`. The skill should appear and load.
3. Ask for a quick test:
   > Make a 15-second test video about coffee. You decide everything.

If Claude Code was already running when you installed the skill, restart it. Skills are
discovered when a session starts.

## Updating the Skill

```bash theme={null}
cd pictory-claude-skills
git pull
cp -r pictory-text-to-video ~/.claude/skills/   # skip if you used a symlink
```

> [card] [Next: create your first real video](https://docs.pictory.ai/claude-skills/text-to-video-usage.md)
>
> Example prompts, tips for great results, and troubleshooting


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.