Skip to content
AnkinizeOpenAPILog in
OverviewSync with AnkiAuthenticationAPI referenceTypeScript SDKAnkiConnect alternativeAI agentsMCP serverSelf-host

Tutorials

Browser extension

Build on your Anki collection

Ankinize is a sync server for Anki with a REST API on top of the same collection. Use it to keep your devices in step, to add cards from your own tools, or to read your decks from an app you are writing.

Sync with AnkiPoint Anki on your computer or phone at Ankinize and keep every device in step.Read AuthenticationPasswords, passkeys, two-factor and API keys, and which one to use where.Read API referenceRead and change decks, notes, note types and cards over HTTP, with runnable examples.Read TypeScript SDKCall the API from TypeScript with typed functions, no setup beyond a key.Read

How it fits together#

Every account has one Collection: your decks, notes, cards and scheduling, plus the Media Files (images and audio) that go with them. There are two ways to reach it, and both work on the same data.

Anki syncREST API
Used byAnki on desktop, Android and iOSYour scripts, apps and automations
SpeaksAnki's own sync protocolJSON over HTTPS
Signs in withEmail and password, or a sync API keyAn API key (Bearer)
Addresshttps://ankinize.com/https://ankinize.com/api/v1

A note you add through the API appears in Anki on its next sync, and a note you add in Anki is there when you read it through the API. While Anki is syncing, the API waits its turn: a write during a sync is answered 423 Locked with a Retry-After header, and retrying is always safe.

Quickstart#

  1. Create an account and verify your email

    Sign up, then follow the link in the verification email. Syncing and API keys stay switched off until the address is verified.

  2. Connect Anki

    In Anki, open Preferences → Syncing and set the self-hosted sync server to:

    Sync server
    https://ankinize.com/

    Then press Sync and log in with your email and password. The sync guide has the steps for AnkiDroid and AnkiMobile too.

  3. Create an API key (optional)

    Under API Keys & Devices in the dashboard, create a key with the read scope. Copy it when it is shown: it is never shown again.

  4. Make your first request

    # Keep the key in an environment variable, not in your code.
    export ANKINIZE_API_KEY="paste-your-key-here"
    
    curl https://ankinize.com/api/v1/decks \
      -H "Authorization: Bearer $ANKINIZE_API_KEY"

    You should get back the decks in your collection:

    Response · 200
    {
      "decks": [
        { "id": 1, "name": "Default" },
        { "id": 1736899200123, "name": "Languages::German" }
      ]
    }

Good to know

Your storage counts the collection plus every media file, in full. You can see how much you use on the dashboard, and export a copy of everything at any time.

For AI agents#

Ankinize publishes what an agent needs to use it without a person explaining the API. There is one skill for the TypeScript SDK and one for the REST API, so an agent can pick the one that fits the code it is writing.

ResourceWhat it is
https://ankinize.com/.well-known/agent-skills/ankinize-sdk/SKILL.mdThe agent skill for the TypeScript SDK: set-up, every function, batches, errors, retries and type-safe names. Load this when the task is TypeScript or JavaScript.
https://ankinize.com/.well-known/agent-skills/ankinize-api/SKILL.mdThe agent skill for the REST API: authentication, conventions and every endpoint. Use it from any other language or with plain HTTP.
https://ankinize.com/.well-known/agent-skills/index.jsonThe discovery index of both skills, with the SHA-256 of each file.
https://ankinize.com/llms.txtThe llms.txt index: what Ankinize is, and a link to every page and skill.
https://ankinize.com/llms-full.txtEvery documentation page in one Markdown file.
https://ankinize.com/api/v1/openapi.jsonThe OpenAPI document: exact parameters and responses. SDK functions are named after its operation ids.

Any page of these docs is also available as Markdown: add .md to its address (https://ankinize.com/docs/sdk.md), or ask for it with Accept: text/markdown.

Words used in these docs#

TermMeaning
CollectionEverything in your Anki profile that is not a media file: decks, notes, cards, note types and their scheduling.
Media FilesImages, audio and video that your notes refer to.
NoteOne piece of content with named fields. Anki turns it into one or more cards.
Note typeThe template for notes: which fields they have and which cards they make.
Full syncAnki downloads or uploads the whole collection instead of only the changes. Some changes, such as removing a field, force one on every device.
ScopeWhat an API key may do: sync, read or write.

On this page

  • How it fits together
  • Quickstart
  • For AI agents
  • Words used in these docs