AnkiWeb
- Rating
- 0 (π 0 Β· π 0)
- Updated
- 2025-11-18
- Anki versions
- 2.1.1~
- Description language
- en
AnkiWeb addon 776640448
Generates vocabulary card fields using AI/LLM APIs from a subtitle or sentence inside Anki's card editor.
Open on AnkiWeb GitHub Ask about alternatives
stale
| Min Anki | Max Anki | Updated |
|---|---|---|
| 2.1.1 | + | 2025-11-18 |
Loadingβ¦
Generates formatted Anki cards from English words using Claude or ChatGPT, with example sentences, IPA, definitions, synonyms, vocabulary breakdowns, Google TTS audio, preview, and duplicate detection.
Queries Anthropic or OpenAI APIs with custom prompts to fill Anki note fields, supporting shortcuts, bulk updates, multiple note types, card creation, and debugging.
Generates AI sentences for a vocabulary word, randomly cycling them during review so users memorize the word, not sentence context.
Uses user-provided LLM API keys and prompts to add AI-generated fields to selected Anki flashcards via Claude, ChatGPT, Gemini, Deepseek, or custom OpenAI-compatible models.
Asks ChatGPT questions in bulk about Anki notes using field placeholders, storing responses in a chosen field, with configurable API key, timeout, retries, and request options.
Displays Heisig RTK keywords and related vocabulary containing the same kanji on Japanese sentence cards, optionally generating vocabulary via KanjiVocab.
An Anki add-on that automatically generates vocabulary card fields using AI/LLM APIs.
This add-on streamlines the process of creating vocabulary cards by integrating AI-powered field generation directly into Anki's card editor. Instead of manually filling out multiple fields for each card, you can generate them automatically from a single subtitle or sentence.
Navigate to your Anki add-ons folder:
Create a new folder named ai_vocab_generator
Save the add-on code as __init__.py in this folder
Create a config.json file in the same folder with the following content:
{
"api_endpoint": "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-exp:generateContent",
"api_key": "",
"model": "gemini-2.0-flash-exp",
"prompt_template": "Please create a vocabulary card for the following subtitle line.\nReturn ONLY a JSON object with these exact keys:\n\nSubtitle: {{subtitle}}\nContext Before: {{contextBefore}}\nContext After: {{contextAfter}}\nSource: {{source}}\n\nReturn JSON format:\n{\n \"expression\": \"the main word or phrase to learn\",\n \"reading\": \"pronunciation/reading (e.g., hiragana for Japanese)\",\n \"meaning\": \"definition in English or target language\",\n \"notes\": \"grammar notes, usage tips, etc.\"\n}",
"field_mapping": {
"expression": "Expression",
"reading": "Reading",
"meaning": "Meaning",
"notes": "Notes"
},
"context_sentences": 1
}
The add-on works with Google's Gemini API, which offers generous free tier limits.
The prompt template supports the following placeholders:
{{subtitle}} - The main sentence or subtitle text{{contextBefore}} - Previous sentences for context{{contextAfter}} - Following sentences for context{{source}} - Source material informationThe default configuration includes an example prompt template optimized for Japanese vocabulary cards.
Define how AI-generated fields map to your Anki note type:
| AI JSON Key | Anki Field Name |
|---|---|
| expression | Expression |
| reading | Reading |
| meaning | Meaning |
| notes | Notes |
Add or remove mappings as needed for your card template.
Ctrl+Shift+GCtrl+Shift+G - Generate card fields with AI
The add-on automatically detects the API type based on the endpoint:
generativelanguage.googleapis.com in the endpointTo switch APIs, simply change the endpoint URL and API key in the configuration.
{
"api_endpoint": "https://api.openai.com/v1/chat/completions",
"api_key": "sk-...",
"model": "gpt-4"
}
Make sure you've entered your API key in the configuration dialog.
The add-on looks for text in fields named: Sentence, Subtitle, Text, or Expression. Ensure at least one of these fields contains text before generating.
For Google Gemini, verify your API key is correct and has not expired. You can test it directly at Google AI Studio.
Check that your field mapping matches your note type's field names exactly. Field names are case-sensitive.
The add-on can work with any LLM API that accepts JSON requests and returns text responses. You may need to modify the call_ai_api() function for APIs with different request/response formats.
Adjust the "Context sentences to include" setting to provide more surrounding text to the AI. This can improve accuracy for ambiguous terms but will use more API tokens.
This add-on is provided as-is for personal use with Anki.