Freelance website & app developer in Lucknow · 250+ websites since 2019 Free consultation →

Bulk Image Metadata with Gemini AI: A CSV Workflow for 100+ Images

How the 2nd Code Image SEO engine processes images one by one, rotates API keys and keeps filenames exact.

AI Image SEO NewAI titles, keywords and alt text for images, exported as CSV.

Writing metadata for one image is easy. Writing consistent, non-repetitive titles, keywords and alt text for 300 images from a single shoot is where most photographers, stock contributors and e-commerce teams give up. This article explains a reliable bulk image metadata workflow using Google's Gemini vision models — the same approach behind the 2nd Code AI Image SEO engine.

Why AI vision works well for metadata

Modern multimodal models can describe people, products, settings, lighting, mood and composition, and then turn that description into search-friendly language. Given a strong instruction ("think like a stock reviewer and a real buyer"), they produce titles and keywords that cover literal, conceptual and commercial intent — the three layers covered in our stock keyword guide.

The workflow, step by step

  1. Start a project. The server creates an isolated, randomly named folder and a CSV with 27 header columns.
  2. Select your images (JPG, PNG or WEBP). 100+ files in one go is fine.
  3. One image per request. Each file is uploaded and sent to Gemini on its own with the system prompt. This keeps attention on one picture and makes failures easy to retry.
  4. Strict JSON output. The model must return exactly the 27 expected keys. If any column is missing, the row is rejected instead of corrupting the CSV.
  5. Exact filenames. image_name is always overwritten with the real uploaded name, so the CSV matches your files even with spaces, brackets or Unicode characters.
  6. No duplicate titles. The last 20 generated titles are passed back into the prompt so the model avoids repeating itself across a series.
  7. Download the CSV, then delete the project data from the server with one click.

The 27 columns you get

image_name, seo_title, main_category, subcategory, primary_keyword, secondary_keywords, search_keywords, tags, trend_keywords, micro_keywords, content_cluster, content_cluster_level_1, content_cluster_level_2, commercial_use_case, seo_priority, evergreen_score, seasonal_relevance, visual_style, monetization_score, scene_description, meta_description, alt_text, slug, orientation, mood, location_type, audience

Not every platform needs every column. Stock agencies typically use title and keywords; your own website needs alt text, slug and meta description; a content team can use the cluster and priority fields to plan galleries and blog posts.

API key rotation and failover

Free and low-tier API keys have rate limits. The engine supports several keys at once:

  • You can use the built-in free keys, or paste your own Gemini key under Advanced settings.
  • Images are spread across active keys in rotation.
  • If a request fails with quota, rate-limit, "high demand", 429 or 503 errors, the same image is retried immediately with the next key.
  • Built-in keys stay on the server and are never shown in the browser.

Model selection

Gemini model names change over time. Instead of hard-coding one model, the engine asks the API which models the key can use, prefers stable "flash" vision models, and skips text-to-speech, "lite" and preview variants. This keeps the tool working as Google releases and retires models.

Always review before publishing

AI is a fast first draft, not a final answer. Spot-check a sample from every batch, especially for:

  • Guesses about people's identity, religion or ethnicity (the prompt forbids these, but check).
  • Brand names or trademarks that should not appear in stock metadata.
  • Location claims the image cannot prove.

Privacy and cleanup

Uploaded images live in a private, random folder that blocks script execution, and the "Delete project data" button removes every image and the CSV once you have downloaded it. Note that images are sent to Google's Gemini API for analysis, so follow your own client agreements on where images may be processed.

Developer: Nityanand

Quick answers

Why process images one by one instead of all at once?

Single-image requests give the model full attention on each picture, make failures easy to retry, and keep one bad file from breaking the whole batch.

What happens when an API key hits its limit?

The engine detects quota, rate-limit and high-demand errors and instantly retries the same image with the next active key.

Related guides

Stock Image Metadata: How to Write Titles & Keywords That SellThe title formula, keyword order and search-intent thinking that help stock photos get found and licensed.Image SEO Guide: Alt Text, File Names, Slugs & CaptionsAlt text that helps people and search engines, file names that make sense, and the page context Google actually uses.

Enquiry

Want a website or app for your business?

We build every type of website and application — business websites, online stores, booking systems, apps and custom software — at good, customised rates for your requirement. Fill the enquiry form, or call / WhatsApp us.