Ankify - AI assisted Flashcard Maker for Anki
If you are tired of wasting time on thinking about how to reshape an information you are trying learn into a good question, or cleaning up an awkward copy-pasted text, then this add-on is for you.
Ankify turns study material on your clipboard into Anki flashcards using an
AI model of your choice, generated directly inside Anki's native Add window - no separate app, no context switch, and more importantly: you are still in control of what passes as a card.
Features
- Instant generation - copy any text, press
Ctrl+M in the Add window,
get flashcards.
- Multi-provider - Gemini, OpenAI, Groq, Cerebras, OpenRouter, or any
custom OpenAI-compatible endpoint (including a local Ollama server).
- Smart formatting - the AI picks Basic Q&A or Cloze per fact, or you
can force a specific type.
- Deep Anki integration - maps generated content to your existing
custom Note Types, and auto-switches the editor's active Note Type as you
move through generated cards.
- Context-aware prompts - built-in specializations for Medical
(Radiology, or General), Language Learning, Programming, or your own custom field of
study.
- Queue window - review, switch format, regenerate, or discard any
generated card without leaving the Add window.
- Card-quality principles baked into the prompt - minimum information
principle, self-contained context, unambiguous single answers, and
interference avoidance between similar facts, not just "make some cards."
Installation
Via AnkiWeb (recommended):
- Tools β Add-ons β Get Add-ons...
- Enter the add-on code:
162628593
- Restart Anki.
From source:
- Clone this repo.
- Copy (or symlink) the repo folder into your Anki
addons21 folder, or
zip its contents (not the folder itself) into a .ankiaddon file and
install via Add-ons β Install from file.
- Restart Anki.
Setting up Ankify
- Tools β Ankify Settings (or
Ctrl+Shift+S).
- Pick a provider, paste your API key, click Fetch to choose a model.
- If you use custom Note Types, set up Field Mappings so generated
content lands in the right fields.
- Optional: set a Field of Study, custom prompt rules, or allowed tags.
Getting an API key
| Provider |
Get a key |
| Gemini |
aistudio.google.com/app/apikey |
| OpenAI |
platform.openai.com/api-keys |
| Groq |
console.groq.com/keys |
| Cerebras |
cloud.cerebras.ai |
| OpenRouter |
openrouter.ai/keys |
| Custom (e.g. Ollama) |
point Base URL at your own OpenAI-compatible server |
Shortcuts
| Key |
Action |
Ctrl+M |
Generate flashcards from clipboard |
Ctrl+Q |
Open the Queue Window |
Ctrl+H / Ctrl+G |
Next / previous card in queue |
Ctrl+S |
Switch current card's type (Basic β Cloze) |
Ctrl+J |
Regenerate current card |
Ctrl+O |
Discard current card |
Ctrl+Shift+D |
Discard all queued cards |
Ctrl+Shift+N |
Clean up newlines (strip extra line breaks and spaces from all fields) |
Ctrl+Shift+A/B/C/2 |
Generation mode: Auto / Basic Only / Cloze Only / Both |
Ctrl+Shift+S |
Open Ankify Settings |
Project structure
| File |
Purpose |
native_hook.py |
Editor toolbar integration, queue window, all click/shortcut handlers |
generator.py |
Prompt construction and card-quality rules |
api_client.py |
Provider-agnostic API calls (Gemini + OpenAI-compatible) |
validator.py |
Post-generation validation and in-batch dedup |
anki_adapter.py |
Maps generated cards onto actual Anki note fields |
ui.py |
Settings dialog |
schemas.py |
Flashcard/response data model |
config.py, config.json |
Settings storage and defaults |
Contributing
Issues and PRs welcome. If you're proposing a prompt change, it helps to
include a couple of before/after example cards so the effect on card
quality is easy to see.
License
This project is licensed under the GNU General Public License v3.0. See
the LICENSE file for the license notice.
What you need to know
- Bring your own key. Ankify doesn't host or resell model access, and
doesn't collect or track analytics - the only network calls it makes are to whichever provider you configure, sending the clipboard text you generate
from (and, for regenerate/switch, the current card's fields). If you'd
rather nothing leave your machine, point the Custom provider at a local
model (e.g. Ollama) instead.
- Generated cards are a first draft, not a final answer - give them a
quick look before hitting Add, the same way you would with any AI output.
- Costs and rate limits depend on whichever provider you pick; most
have a usable free tier to start with.
- Model choice greatly affects reliability, not just quality - smaller/faster
models are quicker (and often free) but follow exact formatting
instructions less consistently. If cards come out with odd type mismatches
or malformed cloze syntax, try a stronger model.
- Field mappings are per Note Type - a newly added custom Note Type needs
to be mapped once in Settings before generated content lands correctly.