Core
createFlashcards
Generate flashcards from educational content.
Generates flashcards from educational content.
Usage
import { createFlashcards } from "edu-sdk";
const flashcards = await createFlashcards({
model: "google/gemini-3.6-flash",
content,
count: 10,
difficulty: "medium"
});Options
| Option | Type | Required | Default |
|---|---|---|---|
model | string | LanguageModel | Yes | — |
content | string | Yes | — |
count | number (positive int) | Yes | — |
difficulty | "easy" | "medium" | "hard" | No | "medium" |
Returns
Promise<Flashcard[]>
Each flashcard contains:
{
front: string;
back: string;
}Example
import { createFlashcards } from "edu-sdk";
const flashcards = await createFlashcards({
model: "google/gemini-3.6-flash",
content: notes,
count: 8,
difficulty: "easy"
});Render with <Flashcards />.