Anki-Connect API
Overview
Use this skill to build or troubleshoot Anki-Connect API calls for local Anki automation. It focuses on request/response shape, versioning, authentication, and the action-specific payloads for cards, decks, and media.
Workflow
- •Confirm Anki is running and AnkiConnect is installed (HTTP server on port 8765).
- •Decide whether an API key is required and include
keyif configured. - •Send a POST request with
action,version, andparams; always setversionto 6 to keep theerrorfield in responses. - •Use the relevant action reference file for the exact params and examples.
Action references
Read only the specific reference file needed to avoid loading the entire API documentation:
- •Request/response format, authentication, and sample client code:
skills/anki-connect-api/references/overview.md - •Card-related actions (find cards, card info, intervals):
skills/anki-connect-api/references/card-actions.md - •Deck-related actions (list/create/move):
skills/anki-connect-api/references/deck-actions.md - •Media actions (store/retrieve/delete media files):
skills/anki-connect-api/references/media-actions.md
Quick example
json
{
"action": "deckNames",
"version": 6
}
POST to http://127.0.0.1:8765 and read result or error from the response.