Edu SDKEdu SDK

Core

Generation APIs in the edu-sdk package.

edu-sdk generates learning materials from content. Pass a model (string ID or AI SDK LanguageModel), content (string or FileContent), and optional difficulty (easy | medium | hard).

Every generator returns an Artifact<T> envelope. Invalid options throw InvalidInputError. Unsupported or empty files throw UnsupportedContentError / ContentExtractionError.

When to use which

GoalAPI
One material typeA single generator below
Several materials from the same contentcreateLearningSet()
Timed agenda plus materialscreateStudySession()
Text from a file firstextractContent()
Score quiz answersgradeQuiz() / Assessment

Content

FunctionReturns
extractContent()Extracted text from file bytes (not an artifact)

Pass a file object directly as content on any create* call, or extract first to inspect / cache / trim. See Working with files.

Generators

Functioncontent type
createFlashcards()Flashcard[] (each with id)
createNote()Markdown string
createQuiz()QuizQuestion[] (each with id)
createStudyGuide()StudyGuideContent
createPracticeProblems()PracticeProblem[] (each with id)

Workflows

Functioncontent type
createLearningSet()Nested artifacts chosen via include
createStudySession()Timed agenda + LearningSetContent materials

Assessment

FunctionRole
gradeQuiz()Deterministic scoring (no model call)
AssessmentcreateQuizAttempt() / completeQuizAttempt() for attempt lifecycle

See Quick Start for a full createQuiz example, and Concepts for the shared contract.

On this page