Anita — AI-Powered Anki Deck Generator
Turn a plain CSV of word pairs into a rich, multimedia Anki deck with AI-generated native-like pronunciations and optional illustrations — in minutes, for any language pair.
Why Anita?
Language learners lose hours building decent flashcards by hand. Anita automates the tedious
part — generating TTS audio (OpenAI or ElevenLabs) and optional DALL·E images — so you can
focus on reviewing, not curating. Feed it a CSV, get back a .apkg you can import straight
into Anki on desktop or mobile.
Table of contents
Features
- CSV in,
.apkgout — point it at a two-column CSV and get a ready-to-import Anki deck. - Pluggable TTS — OpenAI
tts-1by default, ElevenLabs multilingual v2 optional. - Optional illustrations — DALL·E 2 images auto-resized to 128×128 px for clean cards.
- Local media cache — every generated asset is cached in a SQLite DB so repeat runs are free and fast.
- Language-agnostic — works for any source → target language pair.
- Clean card template — distraction-free front/back with audio playback and image.
Quickstart
# Install
uv tool install anita-anki # or: pipx install anita-anki
# Set credentials
export OPENAI_API_KEY=sk-...
# Optional:
export ELEVENLABS_API_KEY=...
# Generate
anita generate examples/basics.csv my_deck.apkg --deck-name "My Vocabulary"
Import my_deck.apkg into Anki and start reviewing.
Installation
From PyPI (recommended)
uv tool install anita-anki
# or
pipx install anita-anki
# or
pip install anita-anki
The distribution is published as
anita-ankion PyPI (the nameanitawas taken), but the import name and CLI are bothanita.
From source (development)
git clone https://github.com/timpara/anita.git
cd anita
uv sync --all-extras
uv run anita --help
Usage
CLI
anita generate INPUT.csv OUTPUT.apkg [OPTIONS]
Common options:
| Flag | Default | Description |
|---|---|---|
--deck-name |
Anita Vocabulary |
Deck name shown inside Anki. |
--tts |
openai |
TTS provider: openai or elevenlabs. |
--images / --no-images |
--no-images |
Generate DALL·E illustrations per card. |
--voice-id |
(elevenlabs preset) | ElevenLabs voice ID. |
--verbose |
false |
Enable debug logging. |
Run anita generate --help for the full list.
Python API
from anita import AnkiDeckGenerator
generator = AnkiDeckGenerator(
deck_name="Italian Restaurant",
tts_provider="elevenlabs",
generate_images=True,
)
generator.generate_deck("examples/restaurant.csv", "restaurant.apkg")
CSV format
Two columns: source word (prompt side) and target word (answer side). Header row is optional and auto-detected.
apple,mela
house,casa
book,libro
water,acqua
Working examples live in examples/.
Configuration
API keys are read from environment variables. A .env file in the working directory is
auto-loaded if present.
| Variable | Required for |
|---|---|
OPENAI_API_KEY |
OpenAI TTS, DALL·E |
ELEVENLABS_API_KEY |
ElevenLabs TTS (optional) |
Generated media is cached under your OS user-cache directory (via
platformdirs) so re-running on the same words
incurs zero API cost.
Cost estimate
| Service | Use case | Model | Approximate cost |
|---|---|---|---|
| OpenAI | TTS | tts-1 |
$0.015 / 1k characters |
| OpenAI | Image generation | DALL·E 2 | $0.020 / image (256×256) |
| ElevenLabs | Premium TTS | v2 | Per your subscription tier |
A 500-word deck with audio-only (OpenAI) typically costs well under $0.50.
Contributing
Contributions welcome! See CONTRIBUTING.md for dev setup, coding style, and PR conventions. By participating you agree to the Code of Conduct.
To report a security issue, please see SECURITY.md.
License
Apache License 2.0 © 2024–present Anita contributors.
Acknowledgments
- genanki — Anki deck construction.
- OpenAI — TTS and image generation.
- ElevenLabs — premium multilingual voices.
Metadata
Release files for anita-anki 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| anita_anki-0.1.0.tar.gz | 18.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| anita_anki-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.6 kB
Release files / anita_anki-0.1.0.tar.gz
| Download URL | anita_anki-0.1.0.tar.gz |
|---|---|
| Size | 18.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
50f48f79771adb1bff0f7c309a984b59bd71d98475f8d1c2c0d0f8b9bf058786
|
|
BLAKE2b-256 checksum How to use checksums |
e93e0c1039ebbdd2178bac8081c1e02f947a49e4579f66546f5f6c4e878910f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 21, 2026.
Transparency logRelease files / anita_anki-0.1.0-py3-none-any.whl
| Download URL | anita_anki-0.1.0-py3-none-any.whl |
|---|---|
| Size | 16.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ce7cdd70336fc1d2a5d8ccafc9a89956c739b37cae79e554b3fc6381179e7ed
|
|
BLAKE2b-256 checksum How to use checksums |
9112ce9a4f6b911fc35e5be7edd12acf934925c1b218e298ca8d0db821f54ac8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 21, 2026.
Transparency log