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.

notebooklm-py uses Python enums to configure generation options, filter results, and control sharing. Most enums are plain int enums (e.g., AudioFormat.DEEP_DIVE). Two enums—SourceType and ArtifactType—are str enums used by the .kind property on Source, SourceFulltext, and Artifact, enabling both enum and string comparisons without casting. All enums are importable directly from the notebooklm package:
from notebooklm import AudioFormat, AudioLength, SourceType, ArtifactType
SourceType and ArtifactType are str enums. This means source.kind == "pdf" and source.kind == SourceType.PDF are both True. You can use them in f-strings without calling .value: f"{source.kind}" prints "pdf".

Audio generation

from notebooklm import AudioFormat, AudioLength

AudioFormat

Controls the podcast style generated by generate_audio().
MemberValueDescription
DEEP_DIVE1In-depth discussion (default)
BRIEF2Quick summary
CRITIQUE3Critical analysis
DEBATE4Two-sided debate

AudioLength

Controls the approximate duration of a generated podcast.
MemberValueDescription
SHORT1Shorter podcast
DEFAULT2Standard length (default)
LONG3Longer podcast
status = await client.artifacts.generate_audio(
    nb_id,
    audio_format=AudioFormat.DEBATE,
    audio_length=AudioLength.LONG,
)

Video generation

from notebooklm import VideoFormat, VideoStyle

VideoFormat

Controls the video overview format.
MemberValueDescription
EXPLAINER1Educational explainer (default)
BRIEF2Short overview

VideoStyle

Controls the visual animation style of the generated video.
MemberValueDescription
AUTO_SELECT1Let NotebookLM choose (default)
CUSTOM2Custom style
CLASSIC3Classic style
WHITEBOARD4Whiteboard animation
KAWAII5Kawaii / cute anime style
ANIME6Anime style
WATERCOLOR7Watercolor painting style
RETRO_PRINT8Retro print / vintage style
HERITAGE9Heritage / classic illustration
PAPER_CRAFT10Paper craft / cut-out style
status = await client.artifacts.generate_video(
    nb_id,
    video_format=VideoFormat.EXPLAINER,
    video_style=VideoStyle.KAWAII,
)

Quiz and flashcards

from notebooklm import QuizQuantity, QuizDifficulty

QuizQuantity

Controls how many quiz questions or flashcards are generated.
MemberValueDescription
FEWER1Fewer questions
STANDARD2Standard quantity (default)
MORE2Alias for STANDARD (used by CLI and web UI)
QuizQuantity.MORE is an alias for QuizQuantity.STANDARD—they share the same integer value 2. Both generate the same number of items.

QuizDifficulty

Controls the difficulty level of generated quizzes and flashcards.
MemberValueDescription
EASY1Foundational concepts
MEDIUM2Intermediate difficulty (default)
HARD3Advanced / challenging
status = await client.artifacts.generate_quiz(
    nb_id,
    quantity=QuizQuantity.MORE,
    difficulty=QuizDifficulty.HARD,
)

Reports

from notebooklm import ReportFormat

ReportFormat

Controls the style and template of a generated text report.
MemberValueDescription
BRIEFING_DOC1Executive briefing document (default)
STUDY_GUIDE2Study guide with key concepts
BLOG_POST3Blog-style article
CUSTOM4Fully custom prompt via custom_prompt
status = await client.artifacts.generate_report(
    nb_id,
    report_format=ReportFormat.STUDY_GUIDE,
    extra_instructions="Target audience: beginners",
)

Infographics

from notebooklm import InfographicOrientation, InfographicDetail

InfographicOrientation

Controls the aspect ratio of the generated infographic image.
MemberValueDescription
LANDSCAPE1Wider than tall
PORTRAIT2Taller than wide
SQUARE3Equal dimensions

InfographicDetail

Controls how much information is packed into the infographic.
MemberValueDescription
CONCISE1Minimal, high-level overview
STANDARD2Balanced detail (default)
DETAILED3Dense, comprehensive

Slide decks

from notebooklm import SlideDeckFormat, SlideDeckLength

SlideDeckFormat

Controls the slide deck template and layout style.
MemberValueDescription
DETAILED_DECK1Full slides with content (default)
PRESENTER_SLIDES2Presenter-focused with speaker notes

SlideDeckLength

Controls the approximate number of slides generated.
MemberValueDescription
DEFAULT1Standard slide count (default)
SHORT2Fewer slides

Export

from notebooklm import ExportType

ExportType

Controls the target Google Workspace application when exporting an artifact.
MemberValueDescription
DOCS1Export to Google Docs
SHEETS2Export to Google Sheets
result = await client.artifacts.export_report(
    nb_id,
    artifact_id="report_123",
    title="My Briefing Doc",
    export_type=ExportType.DOCS,
)

Sharing

from notebooklm import ShareAccess, ShareViewLevel, SharePermission

ShareAccess

Controls who can access the notebook via a link.
MemberValueDescription
RESTRICTED0Only explicitly shared users
ANYONE_WITH_LINK1Anyone with the share URL

ShareViewLevel

Controls what content viewers can access in a shared notebook.
MemberValueDescription
FULL_NOTEBOOK0Chat, sources, and notes
CHAT_ONLY1Chat interface only

SharePermission

Controls what a shared user can do in the notebook.
MemberValueDescription
OWNER1Full control (read-only, cannot be assigned)
EDITOR2Can edit notebook content
VIEWER3Read-only access (default when sharing)
from notebooklm import SharePermission, ShareViewLevel

await client.sharing.add_user(nb_id, "colleague@example.com", SharePermission.EDITOR)
await client.sharing.set_view_level(nb_id, ShareViewLevel.CHAT_ONLY)

Source and artifact types

These are str enums returned by the .kind property. They support both enum and string comparisons.
from notebooklm import SourceType, ArtifactType

SourceType

Returned by Source.kind and SourceFulltext.kind. Use these values to identify source content types.
MemberString valueDescription
GOOGLE_DOCS"google_docs"Google Docs document
GOOGLE_SLIDES"google_slides"Google Slides presentation
GOOGLE_SPREADSHEET"google_spreadsheet"Google Sheets spreadsheet
PDF"pdf"PDF file
PASTED_TEXT"pasted_text"Pasted/typed text
WEB_PAGE"web_page"Web URL
GOOGLE_DRIVE_AUDIO"google_drive_audio"Audio file from Google Drive
GOOGLE_DRIVE_VIDEO"google_drive_video"Video file from Google Drive
YOUTUBE"youtube"YouTube video
MARKDOWN"markdown"Markdown file
DOCX"docx"Microsoft Word document
CSV"csv"CSV spreadsheet
EPUB"epub"EPUB e-book file
IMAGE"image"Image file (OCR’d)
MEDIA"media"Other audio or video file
UNKNOWN"unknown"Unrecognized type (see UnknownTypeWarning)
sources = await client.sources.list(nb_id)
for src in sources:
    if src.kind == SourceType.PDF:
        print(f"PDF: {src.title}")
    elif src.kind == SourceType.YOUTUBE:
        print(f"Video: {src.url}")
    elif src.kind == "web_page":   # string comparison also works
        print(f"Web: {src.url}")

ArtifactType

Returned by Artifact.kind. Quizzes and flashcards share the same internal type code but are automatically distinguished by the library.
MemberString valueDescription
AUDIO"audio"Audio overview (podcast)
VIDEO"video"Video overview
REPORT"report"Briefing doc, study guide, or blog post
QUIZ"quiz"Quiz with multiple-choice questions
FLASHCARDS"flashcards"Flashcard deck
MIND_MAP"mind_map"Mind map (hierarchical JSON)
INFOGRAPHIC"infographic"Infographic image
SLIDE_DECK"slide_deck"Slide deck (PDF or PPTX)
DATA_TABLE"data_table"Data table (CSV)
UNKNOWN"unknown"Unrecognized type (see UnknownTypeWarning)
artifacts = await client.artifacts.list(nb_id)
for art in artifacts:
    if art.kind == ArtifactType.AUDIO and art.is_completed:
        await client.artifacts.download_audio(nb_id, f"{art.title}.mp4")

SourceStatus

Internal processing status for sources. Use Source.is_ready, Source.is_processing, and Source.is_error properties instead of comparing integers.
MemberValueDescription
PROCESSING1Being indexed (use source wait to poll)
READY2Indexed and available
ERROR3Processing failed
PREPARING5Pre-processing / upload stage

Chat configuration

from notebooklm import ChatGoal, ChatResponseLength, ChatMode

ChatGoal

RPC-level enum passed to client.chat.configure() to set the chat persona.
MemberValueDescription
DEFAULT1General-purpose assistant (default)
CUSTOM2Uses a custom_prompt for persona
LEARNING_GUIDE3Educational focus

ChatResponseLength

Controls the verbosity of chat answers.
MemberValueDescription
DEFAULT1Standard length (default)
LONGER4More detailed responses
SHORTER5More concise responses

ChatMode

Service-level enum providing named presets for configure(). Use ChatMode for readable configuration; use ChatGoal when you need low-level RPC control.
MemberString valueDescription
DEFAULT"default"General-purpose assistant
LEARNING_GUIDE"learning_guide"Educational focus
CONCISE"concise"Brief responses
DETAILED"detailed"Verbose responses
from notebooklm import ChatGoal, ChatResponseLength

await client.chat.configure(
    nb_id,
    goal=ChatGoal.LEARNING_GUIDE,
    response_length=ChatResponseLength.LONGER,
    custom_prompt="Focus on practical applications",
)

Google Drive MIME types

from notebooklm import DriveMimeType

DriveMimeType

MIME type values for use with client.sources.add_drive().
MemberMIME type
DOCUMENTapplication/vnd.google-apps.document
SPREADSHEETapplication/vnd.google-apps.spreadsheet
PRESENTATIONapplication/vnd.google-apps.presentation
from notebooklm import DriveMimeType

await client.sources.add_drive(
    nb_id,
    file_id="1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms",
    title="Q4 Report",
    mime_type=DriveMimeType.SPREADSHEET,
)

Build docs developers (and LLMs) love