> ## 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:

<Tabs>
  <Tab title="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>

  <Tab title="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.
  </Tab>
</Tabs>

<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
  ```
</Tip>

## 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.
</Warning>

<Accordion title="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"
    }
  }
  ```
</Accordion>

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 title="Next: create your first real video" icon="clapperboard" href="/claude-skills/text-to-video-usage">
  Example prompts, tips for great results, and troubleshooting
</Card>
