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

# Claude Code Setup

> Configure Claude Code for video generation with varg

Set up Claude Code to create AI videos with varg. The varg skill gives Claude Code full context on components, models, prompting, and rendering.

## Prerequisites

* [Claude Code](https://docs.anthropic.com/en/docs/claude-code) installed
* A `VARG_API_KEY` — get one at [app.varg.ai](https://app.varg.ai) (or log in during setup)

## Setup

<Steps>
  <Step title="Install the varg skill">
    In your project directory:

    ```bash theme={null}
    npx -y skills add vargHQ/skills --all --copy -y
    ```

    This installs:

    * `SKILL.md` — complete instructions for Claude Code
    * `references/` — 10 reference docs (models, components, recipes, prompting, templates, etc.)
    * `scripts/` — environment check scripts
  </Step>

  <Step title="Set your API key">
    If you already have a key, add it to `.env`:

    ```bash theme={null}
    echo "VARG_API_KEY=varg_xxx" >> .env
    ```

    If you don't have one, Claude Code will walk you through authentication when you ask it to create a video. It will:

    1. Ask for your email
    2. Send a verification code
    3. Save your API key to `~/.varg/credentials`
  </Step>

  <Step title="Start creating">
    ```bash theme={null}
    claude
    ```

    Try these prompts:

    * *"Create a 10-second TikTok video about cats"*
    * *"Make a talking character video with this script: ..."*
    * *"Generate a slideshow from these prompts: ..."*
  </Step>
</Steps>

## How it works

The skill teaches Claude Code:

* All available components (`Render`, `Clip`, `Image`, `Video`, `Speech`, `Music`, `Captions`, etc.)
* All AI models with pricing (kling-v3, nano-banana-pro, flux, eleven\_v3, etc.)
* Two rendering modes: **cloud render** (curl, zero dependencies) and **local render** (bun + ffmpeg)
* Prompting best practices for cinematic video
* Common patterns: talking head, character consistency, slideshows, lipsync
* Caching strategy to minimize costs

## Example prompts

### Simple video

```
Create a 5-second vertical video of a cute robot waving hello.
Use 9:16 format for TikTok.
```

### Talking character

```
Create a talking character video with this script:
"Hey everyone! Today I'm going to share my top productivity tips."

Use a friendly female character with casual style.
Add TikTok-style captions and upbeat background music.
```

### Product video

```
Create a product showcase video for wireless headphones.
Show the product with text overlays highlighting features:
- Premium Sound
- 40hr Battery
- Active Noise Cancellation

End with a "Shop Now" call-to-action. Vertical 9:16 format.
```

### Slideshow

```
Create a slideshow of 5 nature scenes with smooth transitions,
background music, and a title card. 16:9 landscape format.
```

## Tips for best results

### Be specific about format

```
# Good
"Create a vertical 9:16 video, 15 seconds, for TikTok"

# Less specific
"Make a social media video"
```

### Include style details

```
# Good
"Pixar-style animated character, bright colors, friendly expression"

# Less specific
"Cute character"
```

### Specify audio

```
# Good
"Add upbeat electronic background music at low volume,
with word-by-word TikTok-style captions"

# Less specific
"Add music and captions"
```

## Troubleshooting

### "VARG\_API\_KEY not found"

The skill will prompt you to authenticate. You can also set it manually:

```bash theme={null}
echo "VARG_API_KEY=varg_xxx" >> .env
```

Or log in:

```bash theme={null}
bunx vargai login
```

### "Video rendering failed"

* Check prompt doesn't violate content policy
* Try simpler motion descriptions
* Reduce video duration (kling-v3 supports 3-15s)

### "Slow generation"

First run generates AI assets (1-2 min per clip). Subsequent runs with same prompts are instant (cached at \$0).

## Updating the skill

The skill checks for updates automatically. You can also update manually:

```bash theme={null}
npx -y skills update
```

## Next steps

* Browse [Templates](/templates) for copy-paste examples
* Check [Components](/sdk/components) for all available JSX components
* See [AI Models](/sdk/models) for the full model catalog with pricing
