plaudit-core
Rust client library for the Plaud developer API
(platform.plaud.ai/developer/api). Handles OAuth 2.0 + PKCE authentication,
token persistence, and typed access to recordings, transcripts, and AI summaries.
This is the engine behind plaudit-cli.
It's frontend-agnostic — all public functions return structured types and
Results with no direct I/O to stdout.
Quick start
use ;
// First run: authenticate via browser OAuth
let client = new;
run_login?;
// List recordings
let page = client.list_files?;
for file in &page.data
// Fetch a transcript
let detail = client.get_file?;
if let Some = transcript_segments
// Fetch the AI summary
if let Some = summary_markdown
Modules
client — API client
Client wraps authenticated requests to the Plaud REST API. Tokens are loaded
from disk and refreshed transparently.
| Method | Endpoint |
|---|---|
get_current_user() → Value |
GET /users/current |
revoke_current_user() |
POST /users/current/revoke |
list_files(page, page_size) → FilesPage |
GET /files/ |
get_file(id) → FileDetail |
GET /files/{id} |
oauth — PKCE login and token management
run_login(oauth)— full browser-based PKCE flow (binds:8199, opens browser, exchanges the authorization code)OAuth::get_access_token()— returns a valid token, refreshing if neededTokenStore— reads/writes~/.plaud/tokens.jsonwith0600permissions
types — Data structures
FileSummary/FileDetail— recording metadata, audio URL, embedded source and note dataSegment— a single transcript segment withstart_time,end_time, optionalspeaker, andcontentDataItem— rawdata_type+data_contentcontainer used by the API for transcripts ("transaction") and summaries ("auto_sum_note")TokenSet— persisted OAuth tokens
fmt — Formatting and extraction
transcript_segments(file)— extractsVec<Segment>from aFileDetailsummary_markdown(file)— extracts the AI summary string from aFileDetailsegments_to_text(segs)— renders[MM:SS - MM:SS] Speaker: contentlinessegments_to_srt(segs)— renders SRT subtitle formatformat_duration(ms)/format_date(iso)— human-friendly display helpers
License
MIT