Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/teng-lin/notebooklm-py/llms.txt

Use this file to discover all available pages before exploring further.

client.artifacts is the gateway to all AI-generated studio content in NotebookLM. You call a generation method to kick off an async task, poll or wait for it to complete, then download the result to a local file or export it to Google Docs or Sheets. Every generation method returns a GenerationStatus containing a task_id you pass to wait_for_completion() or poll_status().

Core methods

list(notebook_id, artifact_type)

Lists all artifacts in a notebook, including mind maps stored in the notes system.
async def list(
    notebook_id: str,
    artifact_type: ArtifactType | None = None,
) -> list[Artifact]
notebook_id
str
required
The notebook ID.
artifact_type
ArtifactType | None
default:"None"
Filter by type. Pass ArtifactType.AUDIO, ArtifactType.REPORT, etc. None returns all types.
return
list[Artifact]
List of Artifact objects ordered by creation time.

get(notebook_id, artifact_id)

Fetches a single artifact by ID.
async def get(notebook_id: str, artifact_id: str) -> Artifact | None
return
Artifact | None
Artifact object, or None if not found.

delete(notebook_id, artifact_id)

Permanently deletes an artifact.
async def delete(notebook_id: str, artifact_id: str) -> bool
return
bool
True when deletion succeeds.

rename(notebook_id, artifact_id, new_title)

Renames an artifact.
async def rename(notebook_id: str, artifact_id: str, new_title: str) -> None

poll_status(notebook_id, task_id)

Checks the current status of a generation task.
async def poll_status(notebook_id: str, task_id: str) -> GenerationStatus
return
GenerationStatus
Object with task_id, is_complete (bool), and status (str).

wait_for_completion(notebook_id, task_id, timeout, poll_interval)

Polls until generation is complete or the timeout is reached.
async def wait_for_completion(
    notebook_id: str,
    task_id: str,
    timeout: float = 300,
    poll_interval: float = 5,
) -> GenerationStatus
notebook_id
str
required
The notebook ID.
task_id
str
required
The task_id from the GenerationStatus returned by a generate method.
timeout
float
default:"300"
Maximum seconds to wait before returning regardless of completion state.
poll_interval
float
default:"5"
Seconds between each status poll.
return
GenerationStatus
Final GenerationStatus. Check final.is_complete before downloading.
status = await client.artifacts.generate_audio(nb_id)
final = await client.artifacts.wait_for_completion(
    nb_id, status.task_id, timeout=300, poll_interval=5
)
if final.is_complete:
    path = await client.artifacts.download_audio(nb_id, "podcast.mp3")
    print(f"Saved to: {path}")
else:
    print(f"Failed or timed out: {final.status}")

Type-specific list methods

Convenience wrappers around list() that filter to a single artifact type.
MethodReturns
list_audio(notebook_id)list[Artifact] — Audio Overviews
list_video(notebook_id)list[Artifact] — Video Overviews
list_reports(notebook_id)list[Artifact] — Briefing Docs, Study Guides, Blog Posts
list_quizzes(notebook_id)list[Artifact] — Quiz artifacts
list_flashcards(notebook_id)list[Artifact] — Flashcard artifacts
list_infographics(notebook_id)list[Artifact] — Infographic artifacts
list_slide_decks(notebook_id)list[Artifact] — Slide deck artifacts
list_data_tables(notebook_id)list[Artifact] — Data table artifacts

Generation methods

generate_audio()

Generates an Audio Overview (podcast) from the notebook’s sources.
async def generate_audio(
    notebook_id: str,
    source_ids: list[str] | None = None,
    language: str = "en",
    instructions: str | None = None,
    audio_format: AudioFormat | None = None,
    audio_length: AudioLength | None = None,
) -> GenerationStatus
notebook_id
str
required
The notebook ID.
source_ids
list[str] | None
default:"None"
IDs of sources to include. None uses all sources.
language
str
default:"en"
BCP 47 language code for the output.
instructions
str | None
default:"None"
Custom instructions for the podcast hosts.
audio_format
AudioFormat | None
default:"None"
DEEP_DIVE · BRIEF · CRITIQUE · DEBATE. Defaults to DEEP_DIVE when None.
audio_length
AudioLength | None
default:"None"
SHORT · DEFAULT · LONG.
from notebooklm import AudioFormat, AudioLength

status = await client.artifacts.generate_audio(
    nb_id,
    instructions="Focus on practical applications",
    audio_format=AudioFormat.DEEP_DIVE,
    audio_length=AudioLength.LONG,
    language="en",
)

generate_video()

Generates a Video Overview.
async def generate_video(
    notebook_id: str,
    source_ids: list[str] | None = None,
    language: str = "en",
    instructions: str | None = None,
    video_format: VideoFormat | None = None,
    video_style: VideoStyle | None = None,
) -> GenerationStatus
video_format
VideoFormat | None
default:"None"
EXPLAINER · BRIEF.
video_style
VideoStyle | None
default:"None"
AUTO_SELECT · CLASSIC · WHITEBOARD · KAWAII · ANIME · WATERCOLOR · RETRO_PRINT · HERITAGE · PAPER_CRAFT.
from notebooklm import VideoFormat, VideoStyle

status = await client.artifacts.generate_video(
    nb_id,
    video_format=VideoFormat.EXPLAINER,
    video_style=VideoStyle.WHITEBOARD,
)

generate_cinematic_video()

Generates a cinematic-style video. This is a convenience wrapper around generate_video() with video_format=VideoFormat.CINEMATIC.
async def generate_cinematic_video(
    notebook_id: str,
    source_ids: list[str] | None = None,
    language: str = "en",
    instructions: str | None = None,
    video_style: VideoStyle | None = None,
) -> GenerationStatus
status = await client.artifacts.generate_cinematic_video(
    nb_id,
    instructions="documentary-style summary",
    video_style=VideoStyle.CLASSIC,
)
Equivalent CLI command: notebooklm generate cinematic-video "documentary-style summary"

generate_study_guide()

Generates a Study Guide report. This is a convenience wrapper around generate_report() with report_format=ReportFormat.STUDY_GUIDE.
async def generate_study_guide(
    notebook_id: str,
    source_ids: list[str] | None = None,
    language: str = "en",
    extra_instructions: str | None = None,
) -> GenerationStatus
status = await client.artifacts.generate_study_guide(
    nb_id,
    extra_instructions="Target audience: beginners",
)

generate_report()

Generates a report in one of four formats.
async def generate_report(
    notebook_id: str,
    report_format: ReportFormat = ReportFormat.BRIEFING_DOC,
    source_ids: list[str] | None = None,
    language: str = "en",
    custom_prompt: str | None = None,
    extra_instructions: str | None = None,
) -> GenerationStatus
report_format
ReportFormat
default:"BRIEFING_DOC"
BRIEFING_DOC · STUDY_GUIDE · BLOG_POST · CUSTOM.
custom_prompt
str | None
default:"None"
Full generation prompt when report_format=CUSTOM. Ignored for built-in formats.
extra_instructions
str | None
default:"None"
Additional instructions appended to the built-in template. Ignored when report_format=CUSTOM (embed everything in custom_prompt instead).
from notebooklm import ReportFormat

status = await client.artifacts.generate_report(
    nb_id,
    report_format=ReportFormat.STUDY_GUIDE,
    extra_instructions="Include a glossary section",
)

generate_quiz()

Generates a multiple-choice quiz.
async def generate_quiz(
    notebook_id: str,
    source_ids: list[str] | None = None,
    instructions: str | None = None,
    quantity: QuizQuantity | None = None,
    difficulty: QuizDifficulty | None = None,
) -> GenerationStatus
quantity
QuizQuantity | None
default:"None"
FEWER · STANDARD · MORE (note: MORE is an alias for STANDARD in the API).
difficulty
QuizDifficulty | None
default:"None"
EASY · MEDIUM · HARD.

generate_flashcards()

Generates a set of flashcards.
async def generate_flashcards(
    notebook_id: str,
    source_ids: list[str] | None = None,
    instructions: str | None = None,
    quantity: QuizQuantity | None = None,
    difficulty: QuizDifficulty | None = None,
) -> GenerationStatus
Parameters mirror generate_quiz().

generate_infographic()

Generates an infographic image.
async def generate_infographic(
    notebook_id: str,
    source_ids: list[str] | None = None,
    language: str = "en",
    instructions: str | None = None,
    orientation: InfographicOrientation | None = None,
    detail_level: InfographicDetail | None = None,
    style: InfographicStyle | None = None,
) -> GenerationStatus
orientation
InfographicOrientation | None
default:"None"
LANDSCAPE · PORTRAIT · SQUARE.
detail_level
InfographicDetail | None
default:"None"
CONCISE · STANDARD · DETAILED.

generate_slide_deck()

Generates a presentation slide deck.
async def generate_slide_deck(
    notebook_id: str,
    source_ids: list[str] | None = None,
    language: str = "en",
    instructions: str | None = None,
    slide_format: SlideDeckFormat | None = None,
    slide_length: SlideDeckLength | None = None,
) -> GenerationStatus
slide_format
SlideDeckFormat | None
default:"None"
DETAILED_DECK · PRESENTER_SLIDES.
slide_length
SlideDeckLength | None
default:"None"
DEFAULT · SHORT.

generate_data_table()

Generates a structured data table.
async def generate_data_table(
    notebook_id: str,
    source_ids: list[str] | None = None,
    language: str = "en",
    instructions: str | None = None,
) -> GenerationStatus
instructions
str | None
default:"None"
Natural language description of the desired table structure and columns.

generate_mind_map()

Generates an interactive mind map and saves it as a note.
async def generate_mind_map(
    notebook_id: str,
    source_ids: list[str] | None = None,
    language: str = "en",
    instructions: str | None = None,
) -> dict
return
dict
Dict with mind_map (parsed JSON tree with name and children keys) and note_id (the ID of the note where the mind map is stored).
result = await client.artifacts.generate_mind_map(nb_id)
print(result["mind_map"]["name"])   # Root node title
print(result["note_id"])            # Note ID for later retrieval

GenerationStatus dataclass

task_id
str
Task identifier. Pass to poll_status() or wait_for_completion().
is_complete
bool
True when the generation task has finished successfully.
status
str
Status string such as "completed", "processing", or "failed".

Download methods

All download methods accept an optional artifact_id. When omitted they automatically select the most recently completed artifact of that type. They raise ValueError if no completed artifact exists.
# Most recent completed audio
path = await client.artifacts.download_audio(nb_id, "podcast.mp4")

# Specific artifact
path = await client.artifacts.download_audio(nb_id, "podcast.mp4", artifact_id="abc123")
MethodOutput formatNotes
download_audio(nb_id, output_path, artifact_id=None)MP4/MP3
download_video(nb_id, output_path, artifact_id=None)MP4
download_infographic(nb_id, output_path, artifact_id=None)PNG
download_slide_deck(nb_id, output_path, artifact_id=None, output_format="pdf")PDF or PPTXoutput_format="pptx" also supported
download_report(nb_id, output_path, artifact_id=None)Markdown (.md)Extracts markdown from Briefing Doc, Study Guide, Blog Post
download_mind_map(nb_id, output_path, artifact_id=None)JSONTree: {"name": "Topic", "children": [...]}
download_data_table(nb_id, output_path, artifact_id=None)CSVUTF-8 with BOM for Excel compatibility
download_quiz(nb_id, output_path, artifact_id=None, output_format="json")JSON / Markdown / HTMLoutput_format: "json", "markdown", "html"
download_flashcards(nb_id, output_path, artifact_id=None, output_format="json")JSON / Markdown / HTMLJSON normalizes f/b keys to front/back

Export methods

Export artifacts to Google Docs or Sheets. Requires the authenticated Google account to have write access.
from notebooklm import ExportType

# Export report to Google Docs
result = await client.artifacts.export_report(
    nb_id,
    artifact_id="report_123",
    title="My Briefing Doc",
    export_type=ExportType.DOCS,
)
# result contains the Google Docs URL

# Export data table to Google Sheets
result = await client.artifacts.export_data_table(
    nb_id,
    artifact_id="table_456",
    title="Research Data",
)

# Generic export
result = await client.artifacts.export(
    nb_id,
    artifact_id="artifact_789",
    title="Exported Content",
    export_type=ExportType.SHEETS,
)
ExportType enum:
  • ExportType.DOCS — Export to Google Docs
  • ExportType.SHEETS — Export to Google Sheets

Complete generate → wait → download example

import asyncio
from notebooklm import NotebookLMClient, AudioFormat

async def main():
    async with await NotebookLMClient.from_storage() as client:
        nb_id = "your_notebook_id"

        # Generate
        status = await client.artifacts.generate_audio(
            nb_id,
            audio_format=AudioFormat.DEEP_DIVE,
            language="en",
        )
        print(f"Task: {status.task_id}")

        # Wait
        final = await client.artifacts.wait_for_completion(
            nb_id, status.task_id, timeout=300, poll_interval=5
        )

        # Download
        if final.is_complete:
            path = await client.artifacts.download_audio(nb_id, "podcast.mp3")
            print(f"Audio saved to: {path}")
        else:
            print(f"Failed: {final.status}")

asyncio.run(main())

Artifact dataclass

id
str
Unique artifact identifier.
title
str
Display title.
status
int
Raw status code: 1=processing, 2=pending, 3=completed.
created_at
datetime | None
Creation timestamp.
url
str | None
Download or preview URL when available.
kind
ArtifactType
Property returning an ArtifactType str-enum (AUDIO, VIDEO, REPORT, QUIZ, FLASHCARDS, MIND_MAP, INFOGRAPHIC, SLIDE_DECK, DATA_TABLE, UNKNOWN).
is_completed
bool
Property: True when status == 3.
is_quiz
bool
Property: True when the artifact is a quiz.
is_flashcards
bool
Property: True when the artifact is a flashcard set.

Build docs developers (and LLMs) love