Generate Anki flashcards with any model, one Base URL.

Updated 2026-07-16

A growing set of Anki AI add-ons accepts a custom OpenAI-compatible Base URL next to the API key field, which turns card generation into a model choice instead of a vendor lock. Point the add-on at https://api.apisrouter.com/v1, pick an id like claude-haiku-4-5-20251001 or deepseek-v4-flash, and batch-fill fields across a whole deck on one prepaid key.

Quick answer: the three fields, wherever the add-on puts them.

Anki's AI add-ons are independent projects, so the settings layout varies, but the pattern is the same three fields every OpenAI-compatible tool uses: an API key, a Base URL or endpoint field, and a model name. Set the Base URL to https://api.apisrouter.com/v1, paste your APIsRouter key, and type the exact catalog id as the model. A concrete, verified example: the add-on "Anki AI - Enhance Your Flashcards with ChatGPT and other LLMs" (AnkiWeb code 643253121) added a custom Base URL setting in February 2026, explicitly so it can run against services matching the OpenAI API, and it accepts a free-text custom model name. Its own page flags the feature as new, so treat the exact field labels as version-dependent and the pattern as stable.

API Key:     sk-YOUR-APISROUTER-KEY
Base URL:    https://api.apisrouter.com/v1
Model:       claude-haiku-4-5-20251001
             (free-text field: any catalog id works)

How AI add-ons use the endpoint.

Anki is the spaced-repetition app with millions of users, and its add-on ecosystem is where AI arrived: add-ons that generate example sentences for language decks, fill definition and mnemonic fields from a note's front side, draft cloze deletions from pasted text, or explain a card you got wrong. Under the hood these are chat-completions calls with a prompt template per field, sent once per note. That per-note shape is why the endpoint choice matters more here than in a chat app. A deck run is a batch job: a two-thousand-note deck with one generated field is two thousand requests, each small, all shaped identically. Volume-tier models handle this beautifully, and the difference between a flagship and a floor-rate id across a big deck is the difference between a meaningful bill and a rounding error. Honesty about the ecosystem: not every Anki AI add-on exposes a Base URL. Some hardcode OpenAI's hosts, and each add-on names its fields its own way. Before topping up anything, open your add-on's config and confirm an endpoint or Base URL field exists; if it only takes an API key with no endpoint setting, it cannot route to a gateway, and you should pick an add-on that can.

Choosing models for card generation.

Batch jobs make A/B testing trivial: run fifty notes through two ids, read the cards, and check the per-model spend in the console. The winner is usually obvious within one screen of cards, and the cost of the experiment is effectively nothing at volume-tier rates.

  • deepseek-v4-flash for bulk deck runs: definitions, translations, and example sentences at the lowest rate in the catalog.
  • claude-haiku-4-5-20251001 when generation quality on nuanced fields, mnemonics, usage notes, subtle sense distinctions, is worth a step up.
  • gpt-5.4-mini as the GPT-family volume option if your prompt templates were tuned against OpenAI behavior.
  • gemini-3.5-flash for decks generated from long source texts, where a big context window earns its rate.
  • glm-5.2 worth an A/B for Chinese-language decks, where its bilingual output is a genuine strength.

Pay-as-you-go · transparent per-model pricing

Selected models are priced below official list prices. Exact input, output, cache, and per-request prices are shown for each model.

ModelOfficial PriceOur Price
Claude Haiku 4.5 20251001$1.00 / $5.00 per M$0.80 / $4.00 per M
GPT-5.4 Mini$0.75 / $4.50 per M$0.60 / $3.60 per M
DeepSeek V4 Flash$0.14 / $0.28 per M$0.13 / $0.25 per M
Gemini 3.5 Flash$1.50 / $9.00 per M$1.20 / $7.20 per M
GLM-5.2$1.14 / $4.00 per M$1.03 / $3.60 per M

Failure modes specific to Anki add-ons.

Since the add-on layer varies, the reliable debugging move is the same curl pair as always: models listing, then one completion with your exact id. If both pass, the gateway is fine and the issue is in the add-on's config or version.

  • No Base URL field in the config: the add-on hardcodes its vendor. No gateway can help; switch to an add-on that exposes an endpoint setting, like the verified example above.
  • Model dropdown without free text: some add-ons list only vendor model names. Look for a custom model option; the verified example accepts typed-in model names.
  • 401 mid-batch: the key was pasted with whitespace or truncated. Curl the models listing with the same key to confirm outside Anki.
  • Batch stalls or errors partway: per-minute rate limits meeting a burst of requests. Rerun the remaining notes; batches are resumable in most add-ons, and pacing settings help where offered.
  • Field labels do not match this page: expected. Add-ons rename fields across versions; match the pattern (key, endpoint, model) rather than the exact label, and check the add-on's AnkiWeb page for current instructions.

Who routes Anki through a gateway.

  • Language learners batch-generating example sentences and translations across thousand-note decks at volume rates.
  • Medical and law students filling mnemonic and explanation fields on dense decks, where card quality justifies a Claude id.
  • Deck authors who publish shared decks and regenerate fields at scale each revision.
  • Students without a vendor billing relationship, since the prepaid balance starts free with no card.
  • Tinkerers already running other tools through a gateway who want deck generation on the same key and usage log.

Verify the endpoint before a big deck run.

Run the two standard checks with the id you plan to use, then generate a handful of cards before committing a full deck. The three-field config plus a five-note test run catches every common failure in under five minutes. After a batch, the APIsRouter console shows the run as it actually billed: request count, tokens per request, spend per model. For deck generation this is worth reading once, because it turns "roughly how much does a deck cost" into an exact number you can scale linearly to any deck size.

curl -s https://api.apisrouter.com/v1/models \
  -H "Authorization: Bearer $APISROUTER_API_KEY" | head -50

curl -s https://api.apisrouter.com/v1/chat/completions \
  -H "Authorization: Bearer $APISROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-v4-flash",
       "messages":[{"role":"user","content":"Example sentence for the word Fernweh"}]}'

FAQ

Which Anki AI add-ons support a custom OpenAI-compatible Base URL?

Support varies by add-on and version. A verified example is "Anki AI - Enhance Your Flashcards" (AnkiWeb 643253121), which added a custom Base URL and free-text model name in February 2026. Check your add-on's config for an endpoint or Base URL field; if there is none, it cannot route to a gateway.

Can I generate Anki cards with Claude models?

Yes, through any add-on with a Base URL field: set https://api.apisrouter.com/v1 as the endpoint and claude-haiku-4-5-20251001 or claude-sonnet-4-6 as the model name. The gateway serves Claude ids over the OpenAI-compatible surface the add-ons speak.

What does it cost to generate a whole deck?

Card generation requests are small and shaped identically, so cost scales linearly with note count and the per-token rate of the id you pick. Run a small test batch and read the console's per-request numbers; multiplying that by your deck size is more honest than any estimate on this page.

Why does my add-on have no field for a custom endpoint?

Some add-ons hardcode their vendor's hosts and only ask for a key. That is an add-on design choice, not something a gateway can override. Pick an add-on that exposes a Base URL or endpoint setting; the AnkiWeb page normally documents whether it does.

Do I need a card or an OpenAI account to start?

No. The free start requires no card, keys arrive by email, and usage draws from a prepaid balance. No vendor account is needed; the gateway serves the models behind one key.

Is a floor-rate model good enough for flashcards?

For structured fields like translations, definitions, and example sentences, usually yes: deepseek-v4-flash holds up well. For nuanced mnemonics or explanation fields, A/B fifty notes against claude-haiku-4-5-20251001 and judge the cards yourself; the test costs next to nothing at these rates.