Skip to content
Back to skills

Collection

ASecurity

Generate podcast audio using NotebookLM Enterprise API via Google Cloud. Automates the manual NotebookLM workflow - creates notebook, uploads sources, generates audio with custom focus prompt. Requires Google Cloud project with Discovery Engine API enabled.

  • 24 stars
  • 0 votes
  • 0 copies
  • 9 views
  • Added September 8, 2026
researchpythongobashapidocumentation

Works with

  • api

Security analysis

A100/100

Pro scans all 21 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add mattnigh/skills_collection --skill collection --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Collection?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Collection
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mattnigh-collection-02fe5440/badge)](https://www.skillsdirectory.com/skills/mattnigh-collection-02fe5440)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: notebooklm-enterprise-api
description: Generate podcast audio using NotebookLM Enterprise API via Google Cloud. Automates the manual NotebookLM workflow - creates notebook, uploads sources, generates audio with custom focus prompt. Requires Google Cloud project with Discovery Engine API enabled.
---

# NotebookLM Enterprise API Audio Generation

Generate podcast audio using the NotebookLM Enterprise API. This automates the manual NotebookLM web workflow:

1. Create notebook via API
2. Upload 5 source files (p1-brief.md, report.md, p3-briefing.md, sources.md, content_plan.md)
3. Generate audio overview with the standard Yudame Research prompt
4. Download the resulting MP3

## Prerequisites

### Google Cloud Setup

1. **Enable APIs:**
   ```bash
   gcloud services enable discoveryengine.googleapis.com
   gcloud services enable aiplatform.googleapis.com
   ```

2. **Required IAM Roles:**
   - `roles/discoveryengine.admin` (for notebook creation)
   - Or appropriate NotebookLM Enterprise permissions

3. **Authentication:**
   ```bash
   gcloud auth login
   gcloud config set project YOUR_PROJECT_ID
   ```

4. **NotebookLM Enterprise License:**
   - Must have Gemini Enterprise subscription with NotebookLM Enterprise enabled
   - Access may be restricted to select customers

### Environment Variables

```bash
# Optional - defaults to gcloud config
export GOOGLE_CLOUD_PROJECT=your-project-id
```

## Usage

### Command Line

```bash
cd podcast/tools

# Basic usage
python notebooklm_api.py ../episodes/YYYY-MM-DD-slug/

# With series name
python notebooklm_api.py ../episodes/cardiovascular-health/ep5-diet/ \
    --series "Cardiovascular Health"

# With custom title and cleanup
python notebooklm_api.py ../episodes/YYYY-MM-DD-slug/ \
    --title "Diet and Heart Health" \
    --series "Cardiovascular Health" \
    --cleanup
```

### Arguments

| Argument | Required | Description |
|----------|----------|-------------|
| `episode_dir` | Yes | Path to episode directory |
| `--series` | No | Series name (included in audio intro) |
| `--title` | No | Episode title (defaults to directory name) |
| `--cleanup` | No | Delete notebook after generation |
| `--timeout` | No | Timeout in minutes (default: 30) |

## Required Source Files

The episode directory must contain:

```
episode-directory/
├── research/
│   ├── p1-brief.md      # Phase 1 research brief
│   └── p3-briefing.md   # Master briefing (cross-validated)
├── report.md            # Narrative synthesis
├── sources.md           # Validated source links
└── content_plan.md      # Episode structure and NotebookLM guidance
```

## What It Does

1. **Creates Notebook:** API call to create a new notebook
2. **Uploads Sources:** Uploads all 5 source files as text content
3. **Generates Audio:** Calls `audioOverviews.create` with the standard Yudame Research prompt
4. **Waits for Completion:** Polls status every 30 seconds (up to timeout)
5. **Downloads MP3:** Saves to `episode-directory/SLUG.mp3`
6. **Cleanup:** Optionally deletes the notebook

## The Episode Focus Prompt

Uses the same prompt as the manual NotebookLM workflow:

- Opening: "Yudame Research" + series name
- Core principles: Spell out acronyms, define terms, cite studies
- Tone: Intellectually rigorous but accessible
- Closing: Summary + website URL

See `generate_episode_focus()` in the script for the full prompt.

## Output

```
episode-directory/
└── YYYY-MM-DD-slug.mp3   # Generated audio (typically 20-40 min)
```

The audio is in the standard NotebookLM format (two hosts, Deep Dive style).

## Troubleshooting

### "Permission Denied"
- Check gcloud authentication: `gcloud auth print-access-token`
- Verify Discovery Engine API is enabled
- Confirm NotebookLM Enterprise license is active

### "Notebook Not Found"
- The API uses project number, not project ID
- Check `gcloud projects describe PROJECT_ID` for the number

### "Audio Generation Failed"
- Check source file sizes (must be under 100,000 tokens combined)
- Verify source files are valid text/markdown
- Check Google Cloud quotas

### Timeout
- Increase with `--timeout 60` for larger source files
- Audio generation typically takes 5-15 minutes

## Integration with Workflow

This is the **primary audio generation method** for Phase 10.

**Fallback:** Manual NotebookLM web interface (`.claude/skills/notebooklm-audio/`) when API is unavailable.

## API Reference

### Endpoints Used

| Operation | Endpoint |
|-----------|----------|
| Create Notebook | `POST /notebooks` |
| Upload Source | `POST /notebooks/{id}/sources:batchCreate` |
| Generate Audio | `POST /notebooks/{id}/audioOverviews` |
| Check Status | `GET /notebooks/{id}/audioOverviews/default` |
| Download Audio | `GET /notebooks/{id}/audioOverviews/default:download` |
| Delete Notebook | `DELETE /notebooks/{id}` |

### Documentation

- [Audio Overview API](https://docs.cloud.google.com/gemini/enterprise/notebooklm-enterprise/docs/api-audio-overview)
- [Notebook API](https://docs.cloud.google.com/gemini/enterprise/notebooklm-enterprise/docs/api-notebooks)
- [Source Management](https://docs.cloud.google.com/gemini/enterprise/notebooklm-enterprise/docs/api-notebooks-sources)

Files in this skill

  • 0Chan-smc__claude-code-workflow-lab__claude__skills__frontend-dev-guidelines__SKILL.md15.1 KB
  • 17hz__nextjs-template__claude__skills__example-skill__SKILL.md316 B
  • 1ambda__dataops-platform__claude__skills__context-synthesis__SKILL.md3.5 KB
  • 1natsu172__dotfiles__claude__skills__git-analysis__SKILL.md5.4 KB
  • 1natsu172__dotfiles__claude__skills__github-pr-best-practices__SKILL.md7.7 KB
  • 23Maestro__prospect-pipeline__claude__skills__npid-fastapi-skill.md26.1 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-code-javascript__SKILL.md15.7 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-code-python__SKILL.md17.5 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-expression-syntax__SKILL.md9.4 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-mcp-tools-expert__SKILL.md12.5 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-node-configuration__SKILL.md16.6 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-workflow-patterns__SKILL.md11.2 KB
  • 3x-Projetos__claude-memory-framework__claude__skills__scientist__SKILL.md14.8 KB
  • 5MinFutures__futures-arena__claude__skills__migration-tracker__SKILL.md16.2 KB
  • 5MinFutures__futures-arena__claude__skills__planning-guidelines__SKILL.md11.8 KB
  • 92Bilal26__TaskPilotAI__claude__skills__assessment-builder__SKILL.md17.5 KB
  • 92Bilal26__TaskPilotAI__claude__skills__book-scaffolding__SKILL.md19.1 KB
  • 92Bilal26__TaskPilotAI__claude__skills__code-validation-sandbox__SKILL.md6.2 KB
  • 92Bilal26__TaskPilotAI__claude__skills__exercise-designer__SKILL.md18.1 KB
  • 92Bilal26__TaskPilotAI__claude__skills__learning-objectives__SKILL.md24.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in research →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.