Asi notebooklm-enterprise
NotebookLM Enterprise API via Discovery Engine — notebook CRUD, source management, audio overviews, flashcard pipeline integration
install
source · Clone the upstream repo
git clone https://github.com/plurigrid/asi
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/plurigrid/asi "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/notebooklm-enterprise" ~/.claude/skills/plurigrid-asi-notebooklm-enterprise && rm -rf "$T"
manifest:
skills/notebooklm-enterprise/SKILL.mdsource content
NotebookLM Enterprise API
Trit: 0 (ERGODIC — coordinates knowledge between sources and consumers)
Accessed through the Discovery Engine API (
discoveryengine.googleapis.com), not a standalone API.
Interaction with nblm-flashcards skill
This skill is the provider of notebooks consumed by
nblm-flashcards:
notebooklm-enterprise (this skill) nblm-flashcards ──────────────────────────────────── ───────────────────── Create notebook → Read notebook sources Add DeepWiki URLs as sources → Generate flashcards via Gemini Check ingestion status → Batch per source (5/call) Share with users → Merge decks across notebooks Audio overview generation → Emacs drill (M-x nblm-drill-all)
GF(3) Triad
notebooklm-enterprise (0) + nblm-flashcards (+1) + drill-verification (-1) = 0
Base URL
https://global-discoveryengine.googleapis.com/v1alpha
All endpoints use project number (not project ID):
projects/302712368086/locations/global/notebooks/{NOTEBOOK_ID}
Active Notebooks (plurigrid/bmorphism ecosystem)
| Notebook | ID | Sources | Purpose |
|---|---|---|---|
| Original flashcard deck | | 300 | Core bmorphism + plurigrid repos |
| Backfill 1/4 | | 300 | Gap repos chunk 1 |
| Backfill 2/4 | (see backfill-state.json) | 300 | Gap repos chunk 2 |
| Backfill 3/4 | | 300 | Gap repos chunk 3 |
| Backfill 4/4 | | 44 | Gap repos chunk 4 |
| Peer Reality Citations | | — | Academic papers |
| Gay.jl Color Generation | | — | Deterministic color |
| Aptos On-Chain | | — | Move contracts |
| Plurigrid Portal | | — | Infrastructure |
API Quick Reference
Create Notebook
curl -X POST "${BASE}/notebooks" \ -H "Authorization: Bearer ${TOKEN}" \ -d '{"title": "My Notebook"}'
Add Sources (batch of 5)
curl -X POST "${BASE}/notebooks/${NB}/sources:batchCreate" \ -H "Authorization: Bearer ${TOKEN}" \ -d '{"userContents": [{"webContent": {"url": "https://deepwiki.com/org/repo"}}]}'
Critical: field is
webContent.url, not uri, not googleDriveSource.
Get Notebook + Sources
curl -s "${BASE}/notebooks/${NB}" -H "Authorization: Bearer ${TOKEN}"
Share
curl -X POST "${BASE}/notebooks/${NB}:share" \ -H "Authorization: Bearer ${TOKEN}" \ -d '{"accountAndRoles": [{"email": "user@example.com", "role": "PROJECT_ROLE_WRITER"}]}'
Audio Overview
curl -X POST "${BASE}/notebooks/${NB}/audioOverviews" \ -H "Authorization: Bearer ${TOKEN}" -d '{}'
Source URL Rules
Works: DeepWiki URLs, direct PDFs, PMC, arXiv, Frontiers, PLOS, Nature Fails: DOI redirects (
doi.org/...), ScienceDirect, paywalled publishers
For the flashcard pipeline, all sources are DeepWiki URLs:
https://deepwiki.com/{org}/{repo}
Babashka Pipeline Integration
The backfill pipeline (
n/nblm_backfill.bb) automates this skill's operations:
bb n/nblm_backfill.bb --dry-run # plan: chunk 944 repos into 4 notebooks bb n/nblm_backfill.bb # create notebooks + add sources bb n/nblm_backfill.bb --status # check ingestion across all notebooks bb n/nblm_backfill.bb --generate # trigger nblm-flashcards for each notebook
State persisted at
~/worlds/n/flashcards/backfill-state.json.
GCP Context
| Field | Value |
|---|---|
| Project ID | |
| Project Number | |
| API | |
| Version | only |
| Auth | |
Gotchas
- Use project number not ID in API paths
only — no v1 or v1betav1alpha- No list-sources endpoint — sources in GET notebook response
- Batch size 5-10 for source adds
- Ingestion is async — poll for
SOURCE_STATUS_COMPLETE - DOI URLs always fail (no redirect following)
- Duplicate sources silently accepted
- Audio overview: empty
body only, field names rejected{} - Audio has no download API — listen in notebook UI only
- Podcast API returns 404 despite docs
Related Skills
— Flashcard generation + Emacs drill (PLUS, consumer)nblm-flashcards
— Source documentation URLs (ERGODIC, source provider)deepwiki-mcp
— Pipeline orchestrationbabashka
— Repo discovery for gap analysisgh-cli
— Gemini model access for flashcard generationvertex-ai