How to Configure and Set Up Get笔记 API Keys for qiaomu‑anything‑to‑NotebookLM

Export GETNOTE_API_KEY and GETNOTE_CLIENT_ID as environment variables before running the transcription script to authenticate with the Get笔记 OpenAPI and enable automated podcast transcription.

The qiaomu‑anything‑to‑NotebookLM repository automates the conversion of audio and video content from platforms like 小宇宙, 喜马拉雅, and B 站 into structured notes using the Get笔记 transcription service. To process media URLs, you must configure valid Get笔记 API keys that the tool reads from your shell environment at runtime.

Locating Your Get笔记 API Credentials

Before configuring the tool, obtain your authentication credentials from the Get笔记 platform.

  1. Sign up or log in to the Get笔记 web dashboard.
  2. Navigate to the API or Developer settings section.
  3. Copy the API Key and Client ID values—these are distinct from your account password and are specifically provisioned for OpenAPI access.

Configuring Environment Variables

The core transcription logic resides in scripts/get_podcast_transcript.py, which reads GETNOTE_API_KEY and GETNOTE_CLIENT_ID from the environment (lines 15-18). Set these variables in your current terminal session:

export GETNOTE_API_KEY="your_api_key_here"
export GETNOTE_CLIENT_ID="your_client_id_here"

Verify the variables are active:

echo $GETNOTE_API_KEY $GETNOTE_CLIENT_ID

Persisting Credentials Across Sessions

To avoid re-exporting variables every time you open a terminal, add the export commands to your shell configuration file (e.g., ~/.bashrc or ~/.zshrc). Alternatively, create a dedicated .env file and source it before running the skill:

source .env

The repository README (lines 78-84) documents this export pattern as the recommended setup method.

Understanding the Authentication Flow

Once your Get笔记 API keys are configured, scripts/get_podcast_transcript.py executes a four-step workflow:

  1. Create Link Note – Sends a POST request to /open/api/v1/resource/note/save with your credentials in the Authorization and X-Client-ID headers.
  2. Poll Task Status – Checks the transcription job status until processing completes.
  3. Fetch Transcript – Uses a refreshed JWT token to retrieve the full text content.
  4. Store Results – Writes the transcript to a temporary .txt file and outputs a JSON summary containing the file path and metadata.

The script automatically handles token refresh after the first successful authentication, persisting the JWT to ~/.claude/skills/getnote/tokens.json for subsequent API calls.

Running Your First Transcription

With your environment variables set, invoke the script with a target podcast or video URL:

python3 scripts/get_podcast_transcript.py https://www.xiaoyuzhoufm.com/episode/1234

Successful execution returns a JSON object similar to:

{
  "txt_path": "/tmp/podcast_ExampleTitle_abcdef.txt",
  "title": "Example Title",
  "content_length": 34210,
  "note_id": "987654321",
  "source_url": "https://www.xiaoyuzhoufm.com/episode/1234"
}

Summary

  • Export GETNOTE_API_KEY and GETNOTE_CLIENT_ID before executing any transcription tasks.
  • The tool reads these credentials from environment variables in scripts/get_podcast_transcript.py.
  • Initial API authentication creates ~/.claude/skills/getnote/tokens.json to cache JWT tokens.
  • The repository README provides the exact export syntax for permanent shell configuration.

Frequently Asked Questions

Where do I find my Get笔记 API Key and Client ID?

Log in to the Get笔记 platform and navigate to your account dashboard or developer settings. The API Key and Client ID are listed in the OpenAPI section and are required for all programmatic access to the transcription service.

What happens if the environment variables are not set?

If GETNOTE_API_KEY or GETNOTE_CLIENT_ID are missing, scripts/get_podcast_transcript.py will fail to construct the required headers (Authorization and X-Client-ID) and cannot initiate the transcription workflow. The script will exit with an authentication error before creating any link notes.

Can I use a .env file instead of exporting variables directly?

Yes. Create a file named .env containing the two export lines, then load it with source .env before running the Python script. This approach keeps credentials out of your shell history while maintaining the environment variable interface expected by the code.

What is the tokens.json file used for?

After your first successful API call, the script creates ~/.claude/skills/getnote/tokens.json to store the JWT access token and refresh token issued by Get笔记. This file enables the script to refresh authentication automatically without re-prompting for your API keys, though the directory must be writable by the user executing the skill.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →