Frequently Asked Questions
Common questions about AI Image Renamer CLI and their answers.
General Questions
What is AI Image Renamer CLI?
AI Image Renamer CLI is a command-line tool that uses artificial intelligence to rename your image files based on their visual content. Instead of keeping generic names like IMG_1234.jpg, you get descriptive names like sunset-beach-palm-trees.jpg.
Is it free to use?
Yes! The tool itself is free and open-source (MIT license). The AI service it uses — Groq — offers a generous free tier that's sufficient for personal use.
What AI does it use?
The tool uses Meta's Llama 4 Scout model running on Groq's infrastructure. This combination provides:
- Fast inference (milliseconds per image)
- High-quality image understanding
- Free tier availability
What image formats are supported?
| Format | Extensions | Support |
|---|---|---|
| JPEG | .jpg, .jpeg | ✅ Full |
| PNG | .png | ✅ Full |
| WebP | .webp | ✅ Full |
| GIF | .gif | ✅ Full (including animated) |
Other formats may work but aren't officially tested.
Does it work offline?
No. The tool requires an internet connection to communicate with the Groq API for AI analysis. There's no offline mode.
Installation & Setup
How do I install it?
pip install ai-image-renamerSee the Installation Guide for detailed instructions.
Do I need Python?
Yes. You need Python 3.8 or higher. The tool won't work with Python 2.x.
Where do I get an API key?
- Go to console.groq.com
- Sign up (free, no credit card required)
- Create an API key
- Set it as an environment variable
How do I set the API key?
Option 1: Shell configuration (recommended)
echo 'export GROQ_API_KEY="gsk_your-key-here"' >> ~/.zshrc
source ~/.zshrcOption 2: .env file
echo 'GROQ_API_KEY="gsk_your-key-here"' > .envSee Environment Variables for all options.
Usage
How do I rename a single image?
rename-images photo.jpgHow do I rename multiple images?
rename-images photo1.jpg photo2.png photo3.webpOr use wildcards:
rename-images *.jpgCan I control the filename length?
Yes! Use the --words option:
# Short names (3 words)
rename-images -w 3 photo.jpg
# Detailed names (12 words)
rename-images -w 12 photo.jpgDefault is 6 words. See Command Options.
Can I preview without renaming?
Not directly, but you can use the Python API:
from ai_image_renamer import get_words, sanitize_image_path
description = get_words("photo.jpg", 6)
new_name = sanitize_image_path("photo.jpg", description)
print(f"Would rename to: {new_name}")Does it work on Windows?
Yes. The tool works on Windows via:
Technical Questions
How accurate is the AI?
The Llama 4 Scout model is highly capable at:
- Identifying objects and scenes
- Recognizing animals, people, and landmarks
- Describing colors and settings
It may occasionally:
- Misidentify specific breeds or species
- Miss small details in complex images
- Produce generic descriptions for abstract content
Why use magic bytes instead of file extensions?
File extensions can be wrong or misleading. A file named image.jpg might actually be a PNG or even a malicious executable.
Magic bytes (file headers) identify the actual file type by inspecting the first few bytes of the file. This is more secure and accurate.
What happens if the API fails?
The tool handles failures gracefully:
- Invalid files are skipped with a warning
- API errors cause the file to be skipped
- Processing continues with remaining files
Is there a rate limit?
Groq's free tier has rate limits:
- 30 requests per minute
- 7,000 tokens per minute
The tool processes images sequentially to stay within these limits.
Can I use this in my own project?
Yes! The tool is a Python library with a documented API. You can import and use it programmatically:
from ai_image_renamer import ImageRenamer
import argparse
args = argparse.Namespace(image_paths=["photo.jpg"], words=6)
renamer = ImageRenamer(args)Privacy & Security
Are my images sent to a server?
Yes. Images are sent to Groq's API for AI analysis. The images are:
- Encrypted in transit (HTTPS)
- Processed by Groq's infrastructure
- Not stored permanently by the tool itself
Is my API key safe?
Your API key is only sent to Groq for authentication. To keep it safe:
- ✅ Store in environment variables or
.envfiles - ✅ Add
.envto.gitignore - ❌ Never commit keys to version control
- ❌ Never share keys publicly
Can I use this with sensitive images?
The tool sends images to a third-party API (Groq). Consider:
- Personal photos: Generally fine for most users
- Confidential documents: Not recommended
- Medical/health images: Avoid
- Government/classified: Absolutely not
Does the tool store my data?
No. The tool doesn't:
- Store images after processing
- Log your API key
- Track usage or analytics
- Send data to any server other than Groq
Troubleshooting
"command not found: rename-images"
The installation directory isn't in your PATH. See Troubleshooting.
"GROQ_API_KEY not set"
Your API key environment variable isn't configured. See Environment Variables.
"Skipping invalid image file"
The file either doesn't exist or isn't a supported image format. Check:
- File path is correct
- File is actually an image (not renamed from another type)
- File isn't corrupted
My filenames are too long
Use fewer words:
rename-images -w 3 photo.jpgFilenames are too short
Use more words:
rename-images -w 10 photo.jpgStill having issues?
See the Troubleshooting Guide or open an issue on GitLab.