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

# AI renaming

> Automatically rename compressed files using AI-powered image recognition, in the cloud or fully on-device

## Overview

AI renaming uses a vision model to analyze your compressed images and generate descriptive file names automatically. You can use OpenAI in the cloud, or run a local model with [Ollama](https://ollama.com) so nothing leaves your Mac. Instead of keeping generic names like `IMG_0042.jpg`, Compresto can rename files based on their visual content — e.g., `sunset-over-mountain-lake.jpg`.

> [!NOTE]
>
> AI renaming is currently available for **images only**. Video, GIF, and PDF files are not supported yet.

## Choose a Provider

| Provider | Runs on | Needs |
| - | - | - |
| **OpenAI** | OpenAI's servers | An OpenAI API key; billed per image |
| **Ollama (Local)** | Your Mac | Ollama installed with a vision model; free and offline |

## Setup with OpenAI

**Step 1**

Open **Settings** > **AI Renaming** and turn on **Enable AI Renaming**

**Step 2**

Set **Provider** to **OpenAI**

**Step 3**

Enter your **API Key** and press **Verify**

You can get an API key from [platform.openai.com](https://platform.openai.com/api-keys). The key is stored securely in your Keychain.

**Step 4**

Choose a **Model**

Click **Compare model pricing** below the picker to see every model's price side by side. Clicking a row in the table selects that model.

**Step 5**

Select a **naming style** and compress your images — files will be renamed automatically

## Setup with Ollama (offline)

**Step 1**

Install [Ollama](https://ollama.com) and pull a vision model, for example:

```bash theme={null}
ollama pull llava
```

**Step 2**

Open **Settings** > **AI Renaming** and turn on **Enable AI Renaming**

**Step 3**

Set **Provider** to **Ollama (Local)**

**Step 4**

Check the server URL (default `http://localhost:11434`) and press **Test**

**Step 5**

Choose a **Model**. Compresto lists the vision models installed in Ollama; press the refresh button after pulling a new one.

> [!NOTE]
>
> If the model list shows **No models found**, make sure Ollama is running and that you've pulled a vision-capable model. If no model is selected, files are compressed but not renamed.

## OpenAI Models

All models accept images. Prices are OpenAI's standard rates in USD; the last column is Compresto's estimate for renaming 1,000 images.

| Model | Input / 1M tokens | Output / 1M tokens | ≈ 1,000 images |
| - | -: | -: | -: |
| **GPT-6 Luna** | \$0.10 | \$0.50 | \$0.051 |
| **GPT-6.1 Sol** | \$2.00 | \$10.00 | \$2.316 |
| **GPT-6 Astra** | \$10.00 | \$50.00 | \$11.58 |
| **GPT-5 Nano** (default) | \$0.05 | \$0.40 | \$0.044 |
| **GPT-5 Mini** | \$0.25 | \$2.00 | \$0.202 |
| **GPT-5** | \$1.25 | \$10.00 | \$0.712 |
| **GPT-5.1** | \$1.25 | \$10.00 | \$0.412 |
| **GPT-5.2** | \$1.75 | \$14.00 | \$0.994 |

The estimates assume each image is sent at 512 px with the naming prompt and a short reply, so your actual cost can vary. Check [OpenAI's pricing page](https://developers.openai.com/api/docs/pricing) for current rates.

> [!NOTE]
>
> For most users, **GPT-6 Luna** or **GPT-5 Nano** is plenty for naming files and costs only a few cents per 1,000 images. Larger models like **GPT-6.1 Sol** and **GPT-6 Astra** cost far more per image.

To keep costs down, Compresto downscales each image to at most 512 px before sending it and asks every model to use as little reasoning as it supports.

## Naming Style

| Preset | Example Output | Description |
| - | - | - |
| **Descriptive** | `golden-retriever-playing-in-park` | Detailed description of the image content |
| **SEO Friendly** | `cute-dog-park-outdoor-photography` | Optimized for search engines with relevant keywords |
| **Short** | `dog-park` | Brief, concise file names |
| **Technical** | `canine-outdoor-natural-lighting-wide-angle` | Technical photography terminology |
| **Custom** | *(your prompt)* | Define your own naming rules |

### Custom Prompt

When using the **Custom** preset, you can write your own prompt to control how files are named. For example:

* `"Name the file based on the dominant color and subject"`
* `"Use product category followed by a brief description"`
* `"Generate a name suitable for an e-commerce product listing"`

## Max Filename Length

Use the **Max filename length** slider (20–200 characters) to keep generated file names manageable. This prevents overly long names that can cause issues with some file systems or workflows.

## Rename in the Notch

After compressing a single file, you can rename the output yourself right from the notch: click the pencil icon next to the file name, type a new name, and press **Return**. Press **Esc** to cancel. The file extension can't be changed, and the notch stays open while you type.

The notch also shows AI renaming progress after compression finishes.

## Tips

* **Batch processing**: AI renaming works with batch compression — all images in a batch are renamed individually
* **API costs**: With OpenAI, each image requires one API call. Use **Compare model pricing** to estimate a batch before you run it, or switch to Ollama for free on-device renaming
* **Privacy**: Images are downscaled to at most 512 px before analysis. With Ollama, nothing is sent to a server
* **Custom prompts**: Be specific in custom prompts for more consistent results
* **File extension**: The original file extension is always preserved regardless of the generated name


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.