-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Bug report: flashcard.create() generates a QUIZ artifact / flashcards data extraction returns 0
Summary
Calling sdk.artifacts.flashcard.create() successfully creates an artifact and reaches READY, but the resulting artifact appears to be a Quiz (HTML title "Quiz" and artifact title like "Linear Regression Quiz") rather than Flashcards. As a result, fetchFlashcardData() fails to find any flashcards array and returns 0 cards.
Environment
- notebooklm-kit: 2.2.0 (from source)
- Node: 24.13.0 (Windows)
- Auth: NOTEBOOKLM_AUTH_TOKEN + NOTEBOOKLM_COOKIES
Reproduction
Notebook ID used: 335444d2-7efd-40f5-8f14-9a1911944e64
import { NotebookLMClient, ArtifactState } from "notebooklm-kit";
const sdk = new NotebookLMClient({ autoRefresh: false });
await sdk.connect();
const artifact = await sdk.artifacts.flashcard.create("335444d2-7efd-40f5-8f14-9a1911944e64", {
title: "Flashcards test",
instructions: "Create short Q/A flashcards",
customization: { numberOfCards: 2, difficulty: 2, language: "en" },
});
// Poll until READY
let current: any = artifact;
while (current.state !== ArtifactState.READY) {
await new Promise(r => setTimeout(r, 3000));
current = await sdk.artifacts.get(artifact.artifactId, "335444d2-7efd-40f5-8f14-9a1911944e64");
}
const full = await sdk.artifacts.get(artifact.artifactId, "335444d2-7efd-40f5-8f14-9a1911944e64");
console.log(Object.keys(full));
console.log(full.type, full.title);Artifact created (example): 4b1ff3c0-eeaa-46a3-ad97-4a25de3b594e
Expected
- Artifact type should be
FLASHCARDS(6) sdk.artifacts.get()(when READY) should return flashcard data (e.g.,flashcards[],csv,totalCards), orartifacts.download()should save JSON containing flashcards.
Actual
- Artifact is READY, but
sdk.artifacts.get()returns only metadata keys:artifactId,title,type,state,sourceIds
fetchFlashcardData()fails with: "No valid flashcards found in flashcard response"- The raw response preview contains HTML titled
Quizand artifact title like"Linear Regression Quiz".
Notes / suspicion
- Mapping for
ArtifactType.FLASHCARDSin the R7cb6c creation payload might be using the wrong type code, producing a QUIZ artifact. - Alternatively,
RPC_GET_QUIZ_DATAmay return a quiz-shaped payload even for flashcards now (API change), and parser needs update.
Impact
Users cannot programmatically generate flashcards even when the artifact reaches READY.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels