# Token Cost Formula for Claude Video Frames: How Image Tokens Are Calculated

> Understand the token cost formula for Claude Video frames: (width × height) / 750. Learn how image tokens are calculated and optimize your video processing costs with this essential formula.

- Repository: [bradautomates/claude-video](https://github.com/bradautomates/claude-video)
- Tags: how-to-guide
- Published: 2026-07-13

---

**The token cost formula for Claude Video frames is `(width × height) / 750`, where the default 512px width produces approximately 197 tokens per frame.**

The `bradautomates/claude-video` repository extracts frames from video files to analyze them with Anthropic's Claude models. Understanding the token cost formula for these frames is essential for managing API costs, as every extracted frame is converted into image tokens using a specific calculation derived from Anthropic's pricing rules.

## The Claude Video Token Cost Formula

According to the repository's [README.md](https://github.com/bradautomates/claude-video/blob/main/README.md#L91), the token cost formula for Claude Video frames follows Anthropic's image token pricing rule. The calculation is straightforward:

```

image tokens = (frame width × frame height) ÷ 750

```

This formula is applied to every frame extracted from the source video. The implementation uses integer division as shown in the source code logic.

### Default Resolution Token Calculation

By default, Claude Video resizes frames to a width of **512 pixels**, automatically scaling the height to preserve the aspect ratio. For a standard 720p video source, this results in dimensions of 512 × 288 pixels.

Applying the token cost formula:

```python
def image_token_count(width: int, height: int) -> int:
    """Compute the number of image tokens for a frame."""
    return (width * height) // 750

# Default frame size: 512 × 288

tokens = image_token_count(512, 288)  # Returns 196

```

The calculation `(512 * 288) / 750` yields approximately **197 tokens per frame** when using floating-point arithmetic, or 196 tokens with integer division.

### High-Resolution Token Impact

Changing the resolution parameter significantly multiplies the token cost. For example, using `--resolution 1024` doubles both dimensions (maintaining aspect ratio), resulting in four times the token count:

```python

# Higher resolution: 1024 × 576 (same 720p aspect ratio)

high_res_tokens = image_token_count(1024, 576)  # Returns 786

```

At 1024px width, a single frame consumes approximately **787 tokens**—a 4× increase over the default setting.

## Calculating Total Video Token Costs

The total token cost for a video is the product of the number of frames extracted and the per-frame token count. This calculation is critical when using "token-burner" mode or processing long videos.

```python

# Estimating total image token cost for a video

frames_extracted = 120          # e.g., token-burner mode on a long video

tokens_per_frame = image_token_count(512, 288)  # ≈197

total_image_tokens = frames_extracted * tokens_per_frame
print(total_image_tokens)       # → 23640

```

This means a 120-frame video at default resolution consumes approximately **23,640 image tokens** before any text prompt tokens are added.

## Frame Budget Management in Claude Video

The repository implements specific logic to control token costs through frame extraction limits. According to comments in [`skills/watch/scripts/frames.py`](https://github.com/bradautomates/claude-video/blob/main/skills/watch/scripts/frames.py), the `auto_fps` logic caps the number of frames to maintain a reasonable total image-token budget, particularly for longer videos.

The comment in [`skills/watch/scripts/frames.py`](https://github.com/bradautomates/claude-video/blob/main/skills/watch/scripts/frames.py) (lines 4-5) explains: *"Auto-fps targets a frame budget, not a fixed rate. Token cost scales with frame count..."*

In [`skills/watch/scripts/watch.py`](https://github.com/bradautomates/claude-video/blob/main/skills/watch/scripts/watch.py) (lines 71-78), the script applies frame-budget logic through command-line options like `--detail` and `--max-frames`. These parameters directly impact the total token usage by limiting how many frames get extracted and sent to the API.

When the frame extraction generates too many images for the configured budget, the system can trigger warnings in "token-burner" mode, alerting users to potential high costs before API requests are made.

## Summary

- **The token cost formula** for Claude Video frames is `(width × height) / 750`, as documented in the repository's README.md.
- **Default settings** use a 512px width (auto-scaled height), producing approximately 197 tokens per frame.
- **Resolution scaling** is proportional; doubling the resolution quadruples the token count (e.g., 1024px width ≈ 787 tokens).
- **Total video cost** equals frames extracted multiplied by per-frame tokens, calculated in the script's budget logic.
- **Source files** implementing this include [`skills/watch/scripts/frames.py`](https://github.com/bradautomates/claude-video/blob/main/skills/watch/scripts/frames.py) (line comments) and [`skills/watch/scripts/watch.py`](https://github.com/bradautomates/claude-video/blob/main/skills/watch/scripts/watch.py) (budget controls).

## Frequently Asked Questions

### How does Claude Video calculate tokens for individual frames?

Claude Video calculates tokens for each frame using Anthropic's image token formula: `(width × height) / 750`. This is implemented in the repository's processing logic where every extracted frame is treated as an image token sequence. At the default 512px width, a typical 16:9 frame consumes approximately 197 tokens.

### What is the default token cost per frame in Claude Video?

At the default resolution of 512px width (with auto-scaled height, typically 288px for 720p content), each frame costs approximately 197 tokens. This is calculated as `(512 × 288) / 750 ≈ 197` according to the formula documented in the repository's README.md.

### How does changing the resolution affect Claude Video token costs?

Changing the resolution affects token costs quadratically because both width and height scale together. For example, using `--resolution 1024` produces frames of approximately 1024 × 576 pixels, resulting in roughly 787 tokens per frame—four times the default 197 tokens. This scaling factor is critical when estimating costs for high-detail video analysis.

### Why does Claude Video use auto_fps and frame budgets?

The `auto_fps` logic and frame budgets in [`skills/watch/scripts/frames.py`](https://github.com/bradautomates/claude-video/blob/main/skills/watch/scripts/frames.py) and [`skills/watch/scripts/watch.py`](https://github.com/bradautomates/claude-video/blob/main/skills/watch/scripts/watch.py) exist to prevent excessive token consumption. Since token cost scales linearly with frame count, the script caps the number of frames extracted from longer videos to keep the total image-token budget reasonable, warning users in "token-burner" mode when many frames might be generated.