Python SDK for the ContentFlow Podcast Intelligence API
Project description
ContentFlow Python SDK
Podcast intelligence API — transcripts, semantic search, entity extraction, topic classification, and AI summaries from 50,000+ hours of business podcasts.
Installation
pip install contentflow-sdk
Quick Start
from contentflow import ContentFlow
client = ContentFlow(api_key="pk_live_...")
# Search 50,000+ hours of podcast content
results = client.search.hybrid(query="AI fundraising strategies")
for result in results.results:
print(f"{result.title}: {result.best_chunk_text[:100]}")
# Transcribe any YouTube video
job = client.jobs.create(youtube_url="https://youtube.com/watch?v=...")
job = client.jobs.wait(job.id) # polls until complete
summary = client.jobs.get_summary(job.id)
print(summary.summaries[0].content)
Async Support
from contentflow import AsyncContentFlow
async with AsyncContentFlow() as client:
job = await client.jobs.create(youtube_url="https://youtube.com/watch?v=...")
job = await client.jobs.wait(job.id)
transcript = await client.jobs.get_transcript(job.id)
Features
- Typed responses — full Pydantic models with IDE autocomplete
- Sync + async —
ContentFlowandAsyncContentFlowclients - Smart polling —
jobs.wait()with exponential backoff - Automatic retries — configurable retry with backoff on transient errors
- Rate limit handling — parsed rate limit headers on
RateLimitError - CLI tool —
pip install contentflow-sdk[cli]for terminal access
API Reference
Jobs
| Method | Description |
|---|---|
client.jobs.create(youtube_url=...) |
Submit a video for transcription |
client.jobs.get(job_id) |
Get job status and details |
client.jobs.wait(job_id) |
Poll until job completes |
client.jobs.create_and_wait(youtube_url=...) |
Submit and wait in one call |
client.jobs.get_transcript(job_id, format=...) |
Download transcript (json/srt/markdown/plain) |
client.jobs.get_summary(job_id) |
AI summary with citations |
client.jobs.get_speakers(job_id) |
Identified speakers and roles |
client.jobs.get_segments(job_id) |
Topical video sections |
client.jobs.get_entities(job_id) |
Companies, people, products mentioned |
client.jobs.get_topics(job_id) |
Topic classifications |
Search
| Method | Description |
|---|---|
client.search.hybrid(query, ...) |
Keyword + semantic search with filters |
client.search.semantic(query, ...) |
Pure meaning-based search |
Search filters: limit, alpha (keyword vs semantic balance), speaker_ids, entity_ids, topic_ids, channel_ids, date_from, date_to
CLI
pip install contentflow-sdk[cli]
export CONTENTFLOW_API_KEY=pk_live_...
# Submit and wait for transcription
contentflow jobs create "https://youtube.com/watch?v=..." --wait
# Download transcript
contentflow jobs transcript JOB_ID --format markdown --output transcript.md
# Get AI summary
contentflow jobs summary JOB_ID
# Search across all content
contentflow search hybrid "startup fundraising" --limit 5
contentflow search semantic "how to handle investor objections"
Configuration
client = ContentFlow(
api_key="pk_live_...", # or set CONTENTFLOW_API_KEY env var
base_url="https://custom.url", # default: https://api.gocontentflow.com
timeout=60.0, # request timeout in seconds (default: 30)
max_retries=5, # retry count for transient errors (default: 3)
)
Error Handling
from contentflow import ContentFlow, RateLimitError, NotFoundError, AuthenticationError
client = ContentFlow(api_key="pk_live_...")
try:
job = client.jobs.get("nonexistent-id")
except NotFoundError:
print("Job not found")
except RateLimitError as e:
print(f"Rate limited. Retry after {e.retry_after}s")
print(f"Remaining: {e.remaining}/{e.limit}")
except AuthenticationError:
print("Invalid API key")
Exception hierarchy:
ContentFlowError
├── APIError
│ ├── APIConnectionError
│ │ └── APITimeoutError
│ └── APIStatusError
│ ├── BadRequestError (400)
│ ├── AuthenticationError (401)
│ ├── PermissionDeniedError (403)
│ ├── NotFoundError (404)
│ ├── RateLimitError (429)
│ └── InternalServerError (5xx)
├── JobFailedError
└── JobTimeoutError
Get Your API Key
Sign up at gocontentflow.com to get your API key.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file contentflow_sdk-0.1.0.tar.gz.
File metadata
- Download URL: contentflow_sdk-0.1.0.tar.gz
- Upload date:
- Size: 21.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b35a092316843e34a3050dbc26cb3ed6d8fcc6d4077dff9351072195b0cec543
|
|
| MD5 |
155015e6d76c4df7e42e6219bf8f2191
|
|
| BLAKE2b-256 |
8bf3eb8d69083671b26bdacd005ea3fb196b54bf0c62145f2f69cb59055e42e7
|
Provenance
The following attestation bundles were made for contentflow_sdk-0.1.0.tar.gz:
Publisher:
publish.yml on gocontentflow/contentflow-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
contentflow_sdk-0.1.0.tar.gz -
Subject digest:
b35a092316843e34a3050dbc26cb3ed6d8fcc6d4077dff9351072195b0cec543 - Sigstore transparency entry: 1292709508
- Sigstore integration time:
-
Permalink:
gocontentflow/contentflow-python@7f53bedf1934d054d9bca933131e4eb97145ab32 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/gocontentflow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7f53bedf1934d054d9bca933131e4eb97145ab32 -
Trigger Event:
push
-
Statement type:
File details
Details for the file contentflow_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: contentflow_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 22.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a18ede1de9b875d3b89b809a7c0198c6eb8868e89f9fadae5f81a6e9bae8a060
|
|
| MD5 |
2b91380417b29dffda6e77ccdef25709
|
|
| BLAKE2b-256 |
c8900c56f07b767703f07856a4b1da9819af36195b67b05623f18c4e5be7c3d2
|
Provenance
The following attestation bundles were made for contentflow_sdk-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on gocontentflow/contentflow-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
contentflow_sdk-0.1.0-py3-none-any.whl -
Subject digest:
a18ede1de9b875d3b89b809a7c0198c6eb8868e89f9fadae5f81a6e9bae8a060 - Sigstore transparency entry: 1292709585
- Sigstore integration time:
-
Permalink:
gocontentflow/contentflow-python@7f53bedf1934d054d9bca933131e4eb97145ab32 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/gocontentflow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7f53bedf1934d054d9bca933131e4eb97145ab32 -
Trigger Event:
push
-
Statement type: