Skip to content

Study interchange format

Draft specification (0.1.0). Subject to revision before 1.0.0.

The OpenL2 Study Interchange Format (openl2-study) is a self-contained JSON format for exchanging spaced-repetition memory state and optional review history between language-learning applications.

Each item embeds a self-contained concept object (language, kind, text, and optional sense, pos, skill, realizes_concept) so exports can be read and imported by any SRS app without requiring an external OpenL2 Language Library. Applications that use OpenL2 libraries can resolve items to canonical library Concepts downstream.

See the Specification overview for how this format relates to Concepts, Libraries, and Courses.

  • Serialization: UTF-8 JSON (.openl2-study.json), optionally gzip-compressed (.openl2-study.json.gz).
  • Timestamps: RFC 3339 UTC strings (e.g., 2026-11-29T18:50:00Z).
  • Versioning: spec_version uses strict SemVer (MAJOR.MINOR.PATCH).
{
"format": "openl2-study",
"spec_version": "0.1.0",
"exported_at": "2026-11-29T18:50:00Z",
"source": {
"app": "jetway",
"version": "1.4.0"
},
"scheduler": {
"algorithm": "fsrs-6",
"weights": [0.212, 1.2931, 2.3065, 8.2956]
},
"items": [ ... ],
"reviews": [ ... ]
}
Field Required Description
format Yes Must be "openl2-study".
spec_version Yes SemVer string for this specification (e.g., "0.1.0").
exported_at Yes RFC 3339 UTC timestamp when the file was generated.
items Yes Array of current learner memory state records.
source No Exporting application provenance ({ "app": "...", "version": "..." }).
scheduler No Default scheduler configuration (e.g., algorithm and optional FSRS weights). Avoids repeating parameter arrays on every item.
reviews No Chronological array of atomic review events. Omit for snapshot-only exports; include to support FSRS parameter optimization, cross-algorithm replay, or multi-app merging.
extensions No Reverse-DNS namespaced map for app-specific document metadata.

Self-contained Concept object (item.concept)

Section titled “Self-contained Concept object (item.concept)”

Every item carries a nested concept object containing the core OpenL2 Concept identity fields defined in Concepts, Skills, and annotations:

Field Required Description
language Yes Lowercase BCP 47 language tag (e.g., de, en, es-mx, zh-cn, ja-jp; see Language codes).
kind Yes "lexical", "communicative_expression", "skill", or "orthography".
text Yes Target-language surface form or Skill display signature (e.g., "der Kaffee", "<Nomen>, dem <Subjekt> <Verb>", "行").
sense No Study-language sense or disambiguating gloss (expected for lexical and communicative_expression Concepts).
pos No Part of speech when helpful for disambiguation.
skill No Owning Skill name (for kind: "skill").
realizes_concept No For kind: "skill" Concepts that realize an inflected form of a Lexical Concept (without collapsing their learner states): { "text": "...", "sense": "...", "pos": "...", "concept_key": "..." } (text required; others optional).
concept_key No Optional canonical OpenL2 Concept id hint for fast library resolution.
external_id No Optional stable identifier in the source app (e.g., "anki:note:172839").
extensions No Reverse-DNS namespaced map for Concept-level metadata (e.g., L1 gloss, pronunciation/pinyin, frequency_rank, idiomatic, media references).

Each item pairs a concept object and scheduler-agnostic portable fields with an optional algorithm-specific block keyed by algorithm family (fsrs, sm2, etc.):

{
"concept": {
"language": "de",
"kind": "skill",
"skill": "Präsens (unregelmäßig)",
"text": "er spricht",
"realizes_concept": {
"text": "sprechen",
"concept_key": "sprechen"
},
"concept_key": "sprechen-praesens-3sg",
"extensions": {
"ai.jetway": {
"l1_gloss": "he speaks"
}
}
},
"status": "review",
"due_at": "2026-12-06T12:00:00Z",
"last_reviewed_at": "2026-11-29T12:00:00Z",
"reps": 7,
"lapses": 1,
"fsrs": {
"stability": 7.14,
"difficulty": 5.82
},
"extensions": {
"ai.jetway": {
"mastery_band": "developing"
}
}
}
Field Required Description
concept Yes Self-contained Concept object (see above).
status Yes One of "new", "learning", "review", "relearning", "suspended", "known".
due_at No RFC 3339 UTC timestamp when next review is due. null or omitted for "new", "suspended", or "known" items.
last_reviewed_at No RFC 3339 UTC timestamp of the most recent review.
reps No Total completed reviews (>= 0).
lapses No Total lapses after graduating to "review" (>= 0).
extensions No Reverse-DNS namespaced object for learner/scheduling-level fields (e.g., recognition vs. production splits, mastery bands, deck tags).

Algorithm-specific scheduling state lives in a dedicated object on the item, without duplicating status, due_at, or last_reviewed_at:

Use top-level scheduler.algorithm values such as "fsrs-4.5", "fsrs-5", or "fsrs-6".

"fsrs": {
"stability": 7.14,
"difficulty": 5.82,
"step": null
}
  • stability: Memory stability in days (interval at which retrievability reaches 90%).
  • difficulty: Item difficulty (1.0–10.0).
  • step (optional): Current intra-day learning/relearning step index (0-based integer, or null when in "review").
  • algorithm (optional): Per-item algorithm override (e.g., "fsrs-5") if different from top-level scheduler.algorithm.

Use top-level scheduler.algorithm: "sm2".

"sm2": {
"ease_factor": 2.5,
"interval_days": 14
}
  • ease_factor: Current ease multiplier (e.g., 2.5).
  • interval_days: Current scheduled interval in days.

Other schedulers (Leitner, custom models, etc.) may define their own algorithm key or place state under extensions.

Include reviews when exporting history for FSRS weight optimization, migrating across different schedulers or FSRS versions, or merging progress across multiple apps.

{
"id": "01JDF8Q7V4X9K2M3N5P6R8T0VW",
"reviewed_at": "2026-11-29T12:00:00Z",
"language": "de",
"concept_key": "sprechen-praesens-3sg",
"text": "er spricht",
"rating": 3,
"evidence": "implicit"
}
Field Required Description
reviewed_at Yes RFC 3339 UTC timestamp of the review.
language Yes Lowercase BCP 47 language tag matching item.concept.language.
concept_key / external_id / text Yes At least one identifier matching the reviewed item.concept in items[].
rating Yes Integer 1 (again), 2 (hard), 3 (good), or 4 (easy). Binary pass/fail apps should map fail → 1 and pass → 3.
id No Globally unique event ID (UUID/ULID) for idempotent deduplication when merging exports.
evidence No "explicit" (isolated flashcard/drill, default) or "implicit" (natural reuse during reading, listening, or role-play).
extensions No Reverse-DNS namespaced object for telemetry (e.g., response duration, exercise reference).

Events in reviews should be ordered chronologically by reviewed_at ascending.

  1. Extension preservation: Importers must ignore unknown keys inside extensions (at document, item, concept, or review level) and should preserve them when re-exporting. Keys inside extensions must use reverse-DNS notation (e.g., "ai.jetway", "net.ankiweb").
  2. Downstream library resolution: Because items are self-contained, importers do not need an OpenL2 library to read or schedule them. Tools that map items onto a library should match by concept.concept_key (including library aliases) first, then fall back to (language, kind, text, sense, pos).
  3. Algorithm fallback: When an importer does not support an item’s algorithm block (or runs a different FSRS version):
    • If reviews are present, replay the item’s review events under the destination scheduler.
    • Otherwise, seed from portable fields (status, due_at, last_reviewed_at, reps, lapses) or approximate stability/difficulty from interval_days/ease_factor.
  4. Merging multiple exports: When combining exports from two apps, deduplicate reviews by id (or (reviewed_at, target, rating) when id is absent), sort chronologically, and recompute item states.