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

# Claude Code

> Generate AI videos directly from your terminal using the RawUGC skill for Claude Code

## What is Claude Code?

[Claude Code](https://code.claude.com) is Anthropic's official CLI tool that lets you work with Claude directly in your terminal. It supports **skills** — packaged instructions that teach Claude how to perform specific tasks like calling APIs, generating code, or managing workflows.

The **official RawUGC skill** lets you generate and manage AI videos from inside Claude Code. Instead of writing fetch calls or curl commands, you describe what you want and Claude handles the API calls, polling, and error handling for you.

<Card title="View on skills.sh" icon="download" href="https://skills.sh/tfcbot/rawugc-skills/rawugc-api">
  Get the official RawUGC skill for Claude Code
</Card>

## Why use the skill?

|                      | Raw API                                      | Claude Code Skill                     |
| -------------------- | -------------------------------------------- | ------------------------------------- |
| **Setup**            | Write auth headers, base URLs, polling logic | One install + API key                 |
| **Video generation** | Build JSON payloads, handle async polling    | "Generate a video of a sunset beach"  |
| **Error handling**   | Parse RFC 7807 errors, implement retries     | Automatic with plain-English feedback |
| **Status checks**    | Write polling loops with backoff             | "Check on my video"                   |

The skill is ideal for developers who want to generate videos while staying in their coding workflow.

## Setup

### 1. Get your RawUGC API key

Go to [Account Settings](https://rawugc.com/account) and create a new API key. Copy the secret — it's only shown once.

### 2. Install the skill

Run this command in your terminal:

```bash theme={null}
npx skills add tfcbot/rawugc-skills
```

This downloads the RawUGC skill into your project's `.claude/skills/` directory, making it available to Claude Code.

### 3. Configure your API key

Add your API key as an environment variable. The simplest way is to export it in your shell profile (`~/.zshrc` or `~/.bashrc`):

```bash theme={null}
export RAWUGC_API_KEY=sk_your_key_here
```

Then restart your terminal or run `source ~/.zshrc`.

Alternatively, you can set it in your Claude Code settings at `~/.claude/settings.json`:

```json theme={null}
{
  "env": {
    "RAWUGC_API_KEY": "sk_your_key_here"
  }
}
```

### 4. Verify the skill is loaded

Start a new Claude Code session and ask:

```
What skills are available?
```

You should see `rawugc-api` in the list. You can also invoke it directly:

```
/rawugc-api
```

## Usage

Once installed, Claude automatically uses the RawUGC skill when you ask about video generation. You can also invoke it explicitly with `/rawugc-api`.

### Generate a video

Just describe what you want:

```
Generate a video of a golden retriever running through a field of sunflowers
```

Claude will:

1. Pick the best model for your request
2. Build the API request with the right parameters
3. Submit the generation task
4. Poll for completion automatically
5. Return the video URL when it's ready

### Specify a model

You can request a specific model:

```
Generate a video using Sora 2: a cinematic aerial shot of a coastal city at sunset
```

**Supported models:**

| Model                      | Type                | Use case                                |
| -------------------------- | ------------------- | --------------------------------------- |
| `sora-2-text-to-video`     | Text to Video       | General purpose video from text prompts |
| `sora-2-image-to-video`    | Image to Video      | Animate a still image                   |
| `veo3`                     | Text/Image to Video | High quality generation                 |
| `veo3_fast`                | Text/Image to Video | Faster generation, same quality tier    |
| `kling-2.6/motion-control` | Motion transfer     | Apply motion from a reference video     |

### Use image-to-video

Provide an image URL to animate it:

```
Animate this image into a video: https://example.com/my-photo.jpg
```

### Check video status

```
Check the status of task_abc123
```

### List your videos

```
Show me my recent video generations
```

### Configure video settings

You can specify additional parameters in your prompt:

```
Generate a portrait video in 1080p of a woman walking through Tokyo at night, 15 frames
```

Available options:

* **Aspect ratio**: `portrait` or `landscape`
* **Resolution**: `720p` or `1080p`
* **Frame count**: `10` or `15` frames
* **Character**: specify a character username (e.g. `rawugc.mia`)

## Example workflows

### Batch content creation

```
I need 3 product videos:
1. A skincare serum bottle rotating on a marble surface
2. A pair of sneakers with dynamic lighting
3. A watch with cinematic close-ups
```

Claude will generate all three and return the video URLs as each completes.

### Image-to-video pipeline

```
I have these product photos. Animate each one into a short video:
- https://example.com/product1.jpg
- https://example.com/product2.jpg
```

### Generate and integrate

```
Generate a hero video for my landing page: abstract flowing gradients
in purple and blue, landscape format, 1080p. Then show me how to embed
it in my Next.js app.
```

## Troubleshooting

### "Authentication failed"

Make sure `RAWUGC_API_KEY` is set in your environment:

```bash theme={null}
echo $RAWUGC_API_KEY
```

If empty, add it to your shell profile and restart your terminal.

### "Insufficient credits"

Purchase more credits at [rawugc.com/billing](https://rawugc.com/billing). Each model lists its credit cost in the [Models](/models) reference.

### "Rate limit exceeded"

The API allows 10 requests per minute. If you're generating many videos at once, space out your requests. The skill handles polling intervals automatically.

### Skill not appearing

Skills are loaded when a Claude Code session starts. If you just installed the skill:

1. Start a new Claude Code session
2. Ask "What skills are available?" to verify
3. If still missing, check the skill was installed correctly:

```bash theme={null}
ls .claude/skills/
```

You should see a `rawugc-api` directory.

### Skill not triggering automatically

If Claude doesn't use the skill when you ask about video generation, invoke it directly:

```
/rawugc-api generate a video of ocean waves
```

## Updating the skill

To get the latest version of the skill:

```bash theme={null}
npx skills add tfcbot/rawugc-skills
```

This will overwrite the existing skill files with the latest version.

## When to use the API directly

The Claude Code skill covers the most common workflows, but you may want the [REST API](/quickstart) directly when:

* **Building a production integration** — embed video generation in your own app
* **Automating at scale** — programmatic batch generation with custom retry logic
* **Webhook consumers** — receiving completion callbacks in your backend
* **Custom pipelines** — chaining video generation with other services

See the [API Reference](/api-reference) and [Code Examples](/sdks) for direct integration guides.
