# Token Cost Estimation for Video Resolution Settings in Claude Video

> Estimate Claude Video token costs per frame. Learn how resolution impacts costs with Anthropic's formula and see calculations for 512px vs 1024px.

- Repository: [bradautomates/claude-video](https://github.com/bradautomates/claude-video)
- Tags: performance
- Published: 2026-07-12

---

**The token cost per frame scales quadratically with resolution using Anthropic's formula `(width × height) ÷ 750`, where the default 512px width consumes approximately 197 tokens per frame while 1024px consumes roughly 788 tokens.**

The `bradautomates/claude-video` repository implements a `/watch` skill that extracts frames from video content and sends them to Claude as images. Understanding the **token cost estimation** for different resolution settings is critical for managing API costs, as higher resolutions significantly increase token consumption per frame according to Anthropic's image token calculation formula.

## How Image Token Costs Are Calculated

Anthropic calculates image tokens using the formula:

```

image_tokens = (width × height) ÷ 750

```

The frame extraction script in `claude-video` defaults to a maximum width of **512 px**, scaling the height proportionally to maintain the original aspect ratio. For a standard 16:9 source video, this produces frames of **512 × 288 pixels**, resulting in approximately **197 tokens per frame** (as documented in the README at lines 90-92).

## Resolution Settings and Token Costs

When you increase the width using the `--resolution` flag, the token count grows with the square of the width because the height scales proportionally. The following table shows token costs for common resolution settings:

| Resolution (`--resolution`) | Width (px) | Height (px) | Tokens per Frame |
|----------------------------|-----------|------------|------------------|
| 256 | 256 | 144 | ≈ 49 |
| 512 (default) | 512 | 288 | ≈ 197 |
| 768 | 768 | 432 | ≈ 444 |
| 1024 | 1024 | 576 | ≈ 788 |

Doubling the width from 512 px to 1024 px quadruples the token cost from approximately 197 to 788 tokens per frame, reflecting the increased pixel count.

## Implementation in the Source Code

In [`skills/watch/scripts/watch.py`](https://github.com/bradautomates/claude-video/blob/main/skills/watch/scripts/watch.py), the `--resolution` flag is parsed and passed to the frame extractor. The actual scaling logic resides in [`skills/watch/scripts/frames.py`](https://github.com/bradautomates/claude-video/blob/main/skills/watch/scripts/frames.py), where the `_scale_filter()` function scales frames to the chosen width while preserving aspect ratio.

## Calculating Costs for Custom Resolutions

You can estimate the token cost for any width `W` using the aspect ratio of your source video:

```python
def image_token_estimate(width: int, aspect_ratio: float = 16/9) -> int:
    """Return the number of image tokens for a given width."""
    height = int(width / aspect_ratio)
    return (width * height) // 750

```

For quick estimation without writing a full script:

```python
def token_estimate(width):
    # Assume 16:9 source video

    height = int(width * 9 / 16)
    return (width * height) // 750

print(token_estimate(512))   # Output: 197

print(token_estimate(1024))  # Output: 788

```

## Usage Examples

To process video at the default resolution:

```bash
watch https://youtu.be/example --detail balanced

```

To capture finer details like small text or UI elements at higher token cost:

```bash
watch https://youtu.be/example --detail balanced --resolution 1024

```

## Summary

- **Token formula**: Anthropic uses `(width × height) ÷ 750` to calculate image tokens
- **Default cost**: The 512 px width default generates approximately 197 tokens per frame
- **Quadratic scaling**: Doubling resolution quadruples token cost (512 px = ~197 tokens, 1024 px = ~788 tokens)
- **Implementation**: Resolution control is handled in [`skills/watch/scripts/watch.py`](https://github.com/bradautomates/claude-video/blob/main/skills/watch/scripts/watch.py) and [`skills/watch/scripts/frames.py`](https://github.com/bradautomates/claude-video/blob/main/skills/watch/scripts/frames.py) via the `_scale_filter()` function
- **Cost optimization**: Select the minimum resolution that captures necessary detail to manage token budgets effectively

## Frequently Asked Questions

### How does the `--resolution` flag affect token costs in Claude Video?

The `--resolution` flag sets the maximum width for extracted frames in pixels. Because the height scales proportionally to maintain aspect ratio, token costs increase with the square of the width. According to the source code in [`skills/watch/scripts/frames.py`](https://github.com/bradautomates/claude-video/blob/main/skills/watch/scripts/frames.py), the `_scale_filter()` function maintains the aspect ratio while scaling, which means a 2× increase in width results in approximately 4× the token consumption per frame.

### What is the default token cost per frame when using the `/watch` skill?

By default, the `/watch` skill limits frame width to 512 pixels. For a standard 16:9 video, this produces 512 × 288 pixel frames that consume approximately **197 tokens per frame** using Anthropic's `(width × height) ÷ 750` calculation formula.

### Can I calculate token costs for custom resolutions not shown in the documentation?

Yes. You can estimate costs for any width using the formula `(width × height) // 750`, where height is calculated as `width / aspect_ratio`. For 16:9 video, use `height = width × 9 / 16`. This calculation is implemented in the repository's README documentation and derived from Anthropic's image token counting method.

### Why does token cost increase quadratically instead of linearly with resolution?

Token cost increases quadratically because image tokens are calculated based on total pixel count (width × height). When you double the width while maintaining aspect ratio, the height also doubles, resulting in four times as many pixels. This quadratic relationship is inherent in the `(width × height) ÷ 750` formula used by Anthropic and documented in the `claude-video` repository.