FlashFill (Automatically fills language-learning flashcard fields using AI)

AnkiWeb addon 1104436176

Automatically fills language-learning flashcard fields via AI providers, audio, and images, supporting any language pair with preview, cache, and field mapping.
AI-generated summary; may contain mistakes.

card-creationaisync-integrationcard-templatesdictionary

Open on AnkiWeb GitHub Ask about alternatives

AnkiWeb

Rating
0 (πŸ‘ 0 Β· πŸ‘Ž 0)
Updated
2026-08-14
Anki versions
2.1.1~
Description language
en

Maintenance

active

  • Last update or commit was 48 days before the snapshot (2026-08-14).

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.1+2026-08-14
History across monthly snapshots

Loading…

Similar addons

MultiDefine

Automatically fills Anki notes with monolingual definitions, clozed example sentences, pronunciation audio, IPA, and verb forms for English, German, Russian, French, and Azerbaijani, with bulk defining.

card-creationnote-managementclozedictionaryfork-or-reupload

Rating 0 πŸ‘ 0 Β· πŸ‘Ž 0 ⭐ 0 Anki 26.08.1~ Updated 2026-09-12

README

FlashFill β€” Anki Add-on

Automatically fills language-learning flashcard fields using AI.
Supports any source and target language. Works with Gemini, OpenRouter (100+ models), and an offline Mock mode.


Table of Contents

  1. What It Does
  2. Installation
  3. First Run β€” Note Type Setup
  4. Configuration
  5. Getting API Keys
  6. How to Use
  7. Audio Feature (Automatic Pronunciation)
  8. Image Feature (Automatic Images)
  9. Preview Dialog
  10. Session Cache
  11. Field Mapping
  12. Troubleshooting

What It Does

You type a word or phrase in the Front field of a card (e.g., bonjour), click ✨ Auto Fill, and the add-on automatically fills:

Field Example
Translation Ψ³Ω„Ψ§Ω… / درود
English Hello / Good morning
Pronunciation /bΙ”Μƒ.Κ’uʁ/
Part of Speech Interjection
Gender β€”
Example Bonjour, comment Γ§a va ?
Example Translation Hello, how are you?
CEFR A1
Notes Common French greeting used at any time of day
Audio πŸ”Š (spoken pronunciation MP3)
Image πŸ–Ό (contextual photo)

Works for any language pair: Spanish→English, Japanese→Arabic, German→Persian, etc.


Installation

Method 1 β€” Copy the folder (Manual install)

  1. Open Anki
  2. Go to Tools β†’ Add-ons β†’ Open Add-ons Folder
  3. Create a new folder inside addons21/, for example: addons21/language_auto_fill/
  4. Copy all files from this project into that folder
  5. Restart Anki

Method 2 β€” From AnkiWeb (if published)

  1. In Anki, go to Tools β†’ Add-ons β†’ Get Add-ons…
  2. Enter the add-on code
  3. Click OK and restart Anki

First Run β€” Note Type Setup

On the first time you open Anki after installation, the add-on automatically creates a Note Type called "FlashFill" with all 12 fields pre-configured and a styled card template.

You will see a confirmation message. After that:

  1. Go to Add (shortcut: A)
  2. At the top, click the Note Type selector (shows "Basic" by default)
  3. Choose "FlashFill"
  4. You're ready!

No manual field setup required. The Note Type is created automatically on first run.


Configuration

Go to Tools β†’ FlashFill: Settings…

General Tab

Setting Description
Source Language The language you are learning (e.g., Spanish, Japanese)
Target Language The language you translate into (e.g., Persian, English)
Word input field The field where you type the word (default: Front)
Show preview before applying Opens a preview dialog to review data before saving
Session Cache Shows how many words are cached; button to clear cache

Provider Tab

Setting Description
Provider mock (offline test), gemini, or openrouter
API Key Your API key for the selected provider
Model (OpenRouter only) The AI model to use (e.g., google/gemma-3-27b-it:free)

Audio Tab

Setting Description
Enable audio Toggle on/off
TTS Provider mock (silent file) or gtts (Google Translate TTS, free)
Audio field name Must match the field name in your Note Type

Image Tab

Setting Description
Enable image Toggle on/off
Image Provider mock (blue placeholder), unsplash, or pexels
API Key Only needed for Unsplash or Pexels
Image field name Must match the field name in your Note Type

Field Mapping Tab

Map each data type to the correct field name in your Note Type.
Leave a field blank to skip it.


Getting API Keys

Google Gemini (Free)

Google Gemini offers a generous free tier (15 requests/minute, 1 million tokens/day).

  1. Go to https://aistudio.google.com/app/apikey
  2. Sign in with your Google account
  3. Click "Create API Key"
  4. Copy the key (starts with AIza...)
  5. In Anki: Tools β†’ FlashFill: Settings… β†’ Provider tab
    • Set Provider to gemini
    • Paste your key in the API Key field
    • Click Save

Recommended for beginners. No payment info required.


OpenRouter (Free + Paid models)

OpenRouter gives you access to 100+ AI models (GPT-4, Claude, Llama, Gemma, etc.) through a single API key. Many models are free.

Step 1 β€” Create an account:

  1. Go to https://openrouter.ai
  2. Click Sign In β†’ create an account (GitHub or Google login available)

Step 2 β€” Get your API key:

  1. Go to https://openrouter.ai/keys
  2. Click Create Key
  3. Give it a name (e.g., Anki Auto Fill)
  4. Copy the key (starts with sk-or-...)

Step 3 β€” Configure in Anki:

  1. Tools β†’ FlashFill: Settings… β†’ Provider tab
  2. Set Provider to openrouter
  3. Paste your API key
  4. Choose a model (recommendations below)
  5. Click Save

Recommended Free Models:

Model ID to paste Notes
Google Gemma 3 27B google/gemma-3-27b-it:free βœ… Default, excellent quality
Meta Llama 3.3 70B meta-llama/llama-3.3-70b-instruct:free Very capable, free
DeepSeek R1 deepseek/deepseek-r1-0528:free Strong reasoning
Mistral 7B mistralai/mistral-7b-instruct:free Fast and lightweight

To browse all models, visit https://openrouter.ai/models?order=top-weekly and filter by Free.


How to Use

  1. Open the Add window in Anki (A key)
  2. Select "FlashFill" as your Note Type
  3. Type a word or phrase in the Front field
    (e.g., auf Wiedersehen, γŠγ―γ‚ˆγ†, merci beaucoup)
  4. Click the ✨ Auto Fill button in the toolbar
    (or press Ctrl+Shift+A)
  5. A progress indicator appears while data is fetched
  6. The Preview Dialog opens β€” review all fields
  7. Click βœ“ Apply to Note to save, or βœ• Cancel to discard

Existing fields are never overwritten. Auto Fill only fills empty fields.


Audio Feature (Automatic Pronunciation)

The add-on uses Google Translate TTS (free, no API key) to download MP3 pronunciation audio.

  1. In Settings β†’ Audio tab:
    • Check "Enable automatic audio pronunciation"
    • Set TTS Provider to gtts
    • Set Audio field name to Audio
  2. When you click Auto Fill, the pronunciation is downloaded and saved to Anki Media
  3. The Audio field is filled with [sound:autofill_es_bonjour.mp3]
  4. In card review, the audio plays automatically

Supported languages: 28+ languages including Spanish, French, German, Japanese, Arabic, Persian, Turkish, Chinese, Korean, Russian, and more.


Image Feature (Automatic Images)

Unsplash API Key (50 req/hour β€” Free)

  1. Go to https://unsplash.com/developers
  2. Click "Register as a developer" and create a free account
  3. Click "New Application"
  4. Accept the terms, fill in the app name and description
  5. Scroll down to "Keys" β€” copy your Access Key
  6. In Anki: Settings β†’ Image tab
    • Set Image Provider to unsplash
    • Paste the Access Key

Pexels API Key (200 req/hour β€” Free)

  1. Go to https://www.pexels.com/api/
  2. Click "Get Started" and create a free account
  3. Go to https://www.pexels.com/api/new/
  4. Fill in the form and submit
  5. Your API key appears on the page β€” copy it
  6. In Anki: Settings β†’ Image tab
    • Set Image Provider to pexels
    • Paste the API Key

Image query generation is smart: Nouns β†’ direct search ("dog"), Verbs β†’ gerund form ("person eating"), Phrases β†’ full translation query.


Preview Dialog

After fetching data, the Preview Dialog shows everything before saving:

  • All language fields with their values
  • The downloaded image (live preview)
  • The audio file tag

Actions:

  • βœ“ Apply to Note β€” write data to the card and close
  • βœ• Cancel β€” discard everything, note unchanged
  • πŸ”„ Regenerate Image β€” fetch a new image without closing the dialog

Session Cache

The add-on caches results for the duration of your Anki session. If you run Auto Fill on the same word again, the cached result is returned instantly (no API call).

  • Cache is cleared automatically when Anki restarts
  • You can manually clear it: Settings β†’ General β†’ πŸ—‘ Clear Cache

Field Mapping

If you use a custom Note Type (not "FlashFill"), you can configure which data goes into which field:

  1. Settings β†’ Field Mapping tab
  2. For each data type, enter the exact field name from your Note Type
  3. Leave blank to skip that data type

Troubleshooting

Problem Solution
Auto Fill button not visible Restart Anki completely
"Trigger field not found" error Check the "Word input field" setting β€” it must match your Note Type's field name exactly
No data returned (mock mode) Switch to gemini or openrouter with a valid API key
API key rejected (401 error) Double-check the key is correct and has no leading/trailing spaces
Image not showing in card Make sure the Image field is included in your card template
Audio not playing Ensure the Audio field is in your template and the media folder has the file
Rate limit error (429) You've exceeded the free tier. Wait a minute or upgrade your plan
OpenRouter "no credits" error Add a small credit ($1–5) at openrouter.ai/credits for paid models, or use a free model

File Structure

addons21/language_auto_fill/
β”œβ”€β”€ __init__.py              # Entry point β€” creates Note Type on first run
β”œβ”€β”€ config.json              # Default settings
β”œβ”€β”€ README.md                # This guide (English)
β”œβ”€β”€ GUIDE_FA.md              # Installation guide (Persian / فارسی)
β”œβ”€β”€ core/
β”‚   β”œβ”€β”€ autofill.py          # Main Auto Fill logic
β”‚   β”œβ”€β”€ audio_fill.py        # TTS audio download
β”‚   β”œβ”€β”€ image_fill.py        # Image search and download
β”‚   β”œβ”€β”€ cache.py             # Session cache
β”‚   └── models.py            # LanguageData dataclass
β”œβ”€β”€ providers/
β”‚   β”œβ”€β”€ mock.py              # Offline test provider
β”‚   β”œβ”€β”€ gemini_provider.py   # Google Gemini AI
β”‚   β”œβ”€β”€ openrouter_provider.py  # OpenRouter (100+ models)
β”‚   └── audio/               # Audio providers (gtts, mock)
β”‚   └── image/               # Image providers (unsplash, pexels, mock)
β”œβ”€β”€ ui/
β”‚   β”œβ”€β”€ editor_btn.py        # Toolbar button
β”‚   β”œβ”€β”€ settings_dialog.py   # Settings window
β”‚   └── preview_dialog.py    # Preview before applying
└── utils/
    └── logger.py            # Logging utility

Made with ❀️ for language learners.