Anki add-on: Anki AI - Enhance Your Flashcards with ChatGPT and other LLMs

Description This plugin allows you to use Large Language Models (LLMs) to add information to your Anki flashcards using the power of AI. Supports Claude (Anthropic), ChatGPT (OpenAI), Gemini (Google), and Deepseek models. Completely free! (You create your own API key and pay for LLM usage) Quickstart: Install this plugin. (Open Anki. Tools -> Add-ons -> Get Addons -> Enter code: 643253121) In the Card Browser, select the cards you want to modify (tip: Shift+Click to select many or Ctrl+A to select all) You have a new menu option: Anki AI -> Update Your Flashcards with AI Enter your API key and the required prompts. Detailed Setup: 1. Create an API Key: For all of these you'll have to add a credit card and add a few dollars of credit first. Claude (Anthropic): Sign up here: https://console.anthropic.com/dashboard Then click "Get API Keys" and create a key. ChatGPT (OpenAI): Go here: https://platform.openai.com/ If you've never signed up for OpenAI before, click "Sign up". Follow the prompts, and be sure to create an API key and also to add a credit card with a few dollars, otherwise it won't work. Gemini Go here: https://aistudio.google.com/app/apikey And click the "Create API key" button. DeepSeek Sign up here: https://platform.deepseek.com/ Then click on "API Keys" and create a key. 2. Create a System Prompt: This is where you write specific instructions, examples, and do "prompt engineering". This is also where you tell the model which output to return, which you'll need in Step 4. Example System Prompt: You are an experienced German teacher who is helping me practice grammar. You will be provided with a German word. Respond with: -an "exampleSentence" at A2 or B1 level about 10-15 words long using the provided German word, and -the "translation" of that sentence into English In the above prompt, the model will return "exampleSentence" and "translation", which you'll use in step 4. DeepSeek specific: If you use DeepSeek, you must include an example JSON response in your System Prompt. Your prompt should look like this: You are an experienced German teacher who is helping me practice grammar. You will be provided with a German word. Respond with: -an "exampleSentence" at A2 or B1 level about 10-15 words long using the provided German word, and -the "translation" of that sentence into English EXAMPLE JSON OUTPUT: { "exampleSentence": "Mein Bruder kommt aus den USA.", "translation": "My brother is from the USA." } 3. Create a User Prompt: This is where you use Fields from your Cards by writing the field name surrounded by braces {}. Example User Prompt: {de_sentence} 4. Save the response to your Anki Cards: In the System Prompt, you told the LLM what information you want. In our example it's an "exampleSentence" and a "translation", but you can ask the LLM for any information and call it whatever you want. In the "Save the Output" part, match the information to Fields on your Cards. For example: exampleSentence de_sentence translation en_sentence In our example, the LLM returns: an "exampleSentence", which gets saved to the "de_sentence" field on our card a "translation", which gets saved to the "en_sentence" field on our card FAQ: What is an API Key? An API Key is a secret unique identifier used to authenticate and authorize a user. So basically it identifies you with your account, so you can be charged for your usage. An API Key should never be shared with anyone. Because then they can use your account and your saved credit. If you accidentally "expose" your API key (text it to someone by accident or whatever), you can easily delete it and create a new one using the links listed above. Which LLM should I use? Answer quality: they're all pretty good, and it depends more on your prompt engineering Speed: If you add $5 of credit, you can use Tier 1 from Gemini, OpenAI, or Claude, which give you 300, 500, and 50 requests per minute (RPM), respectively. Then, speed is affected by which specific model you choose. They should all be fast enough for normal use cases. Cost: Gemini has a completely free tier for the "Flash-Light" model with 15 calls per minute and 1000 per day. Otherwise, gemini-2.5-flash-lite and gpt-4.1-nano are the cheapest. As of February 2026 they are $0.10 per 1 million input tokens and $0.40 per 1 million output tokens. Can I use a custom LLM? Yes! The plugin supports a custom "Base URL", so you can use a LLM or service that matches the OpenAI API, for example OpenRouter. You can also type in your own custom model name to use. (Note: this is a new feature as of February 2026 that has not been extensively tested, please contact me at https://github.com/rroessler1/anki-ai-field-generator/issues if there are problems.) Why are the models so slow / why am I getting rate-limited? This used to be a problem, but now it should happen less as most providers have upgraded their maximum Requests per Minute (RPMs). If you are using the Gemini free tier, you are limited to 15 calls per minute and 1000 per day. Adding $5 of credit increases this to Tier 1 and 1500 RPMs. If you have $5 of credit for OpenAI or Claude, you get 500 or 50 RPMs, respectively (or less if you use a more complex model). If you keep getting rate-limited in the plugin, you can reduce the number of "Max Concurrent Requests". Can I use this to generate new Anki cards? Not exactly - this plugin doesn’t create new Anki cards from scratch. However, you can import a list of words or phrases into a new deck (e.g., from an Excel sheet) and then use the plugin to automatically generate additional information for each card, such as: Definitions Example sentences Translations Usage tips How much does it cost? This Add-on is free! See "Pricing" below for a more detailed breakdown of expected costs of using the LLMs. What if I have questions, bug reports, or feature requests? Please submit them to the Github repo here. How can I support the creator of this plugin? Please upvote the plugin from this page! That helps other people discover it and encourages me to keep it maintained. I really appreciate every upvote. If you would like to financially donate, you can buy me a coffee here: https://buymeacoffee.com/rroessler Pricing All the companies have models are relatively inexpensive, and have the pricing information on their website. But specifically: The cheapest models currently are Anthropic's claude-3-5-haiku, Google's gemini-2.5-flash-lite, DeepSeek's deepseek-chat, and OpenAI's gpt-4.1-nano. More advanced models might cost quite a bit more. Pricing is based on number of tokens in the input and the output. A "token" is generally a few letters. I tested with the same prompt, and Claude uses 3x the number of tokens as OpenAI and Deepseek. This makes Claude more expensive. Estimated Costs: Using the example prompts shown in the UI: OpenAI : One flashcard uses 180 tokens, so 1 million tokens = 5500 cards = $0.15 USD DeepSeek : One flashcard uses 195 tokens, so 1 million tokens = 5100 cards = $0.27 USD Claude : One flashcard uses 660 tokens, so 1 million tokens = 1500 cards = $0.80 USD Example Prompts and Use Case Ideas This plugin is designed to be flexible so that with a bit of creativity you could create almost anything. But here are some example use cases: Generate Example Sentences: System Prompt: You are an experienced German teacher who is helping me practice grammar. You will be provided with a German word. Respond with: -an "exampleSentence" at A2 or B1 level about 10-15 words long using the provided German word, and -the "translation" of that sentence into English User Prompt: {de_word} Output Mapping: exampleSentence de_sentence translation en_sentence Change "de_sentence" and "en_sentence" in the dropdown boxes to whatever the Fields on your Cards are called. Generate Cloze Deletions: System Prompt: You are an Anki plugin that helps users create Cloze deletions. You will be provided with a sentence. Choose 1-3 key words or phrases and replace them using Anki's Cloze deletion format: {{c1::word or phrase}}. If there are multiple deletions, use c1, c2, c3, etc. Ensure that deletions are meaningful and not too easy. User Prompt: {sentence} Output Mapping: cloze_sentence formatted_cloze_sentence Change "formatted_cloze_sentence" in the dropdown box to the Field where you want to store the Cloze version. Summarize Information: System Prompt: You are an expert at summarizing complex information. You will be provided with a passage of text. Summarize it in 1-2 sentences while preserving the core meaning. Keep the language clear and concise. User Prompt: {field_text} Output Mapping: summary summarized_text Change "summarized_text" in the dropdown box to the Field where you want to store the summary. Step-by-Step Derivations: System Prompt: You are a math and science tutor who explains concepts with step-by-step derivations. You will be provided with a math or science problem. Break it down into logical steps, explaining each step clearly. Use LaTeX formatting for equations when necessary. User Prompt: {problem_statement} Output Mapping: derivation step_by_step_solution Change "step_by_step_solution" in the dropdown box to the Field where you want to store the derivation. Generate a Context-Rich Explanation: System Prompt: You are an expert language tutor helping students understand vocabulary in context. You will be provided with: - A target word or phrase - An example sentence containing that word or phrase - A definition of the word or phrase - (Optional) A topic or category for additional context Respond with: - A revised version of the example sentence that sounds more natural and contextually appropriate. - A brief explanation of the word or phrase in simple terms. - A usage tip explaining when and how to use the word correctly. User Prompt: Word: {word} Example Sentence: {example_sentence} Definition: {definition} Category (optional): {category} Output Mapping: refined_sentence example_sentence explanation simple_explanation usage_tip usage_guidance Change "example_sentence," "simple_explanation," and "usage_guidance" in the dropdown boxes to match your Anki Card Fields. Note that this example would overwrite your current "example_sentence". This may or may not be desirable.

GitHub repository: rroessler1/anki-ai-field-generator
Languages: Python, Shell