Skip to main content

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.

PyPI version CI Python 3.9+ License: MIT

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 + asyncContentFlow and AsyncContentFlow clients
  • Smart pollingjobs.wait() with exponential backoff
  • Automatic retries — configurable retry with backoff on transient errors
  • Rate limit handling — parsed rate limit headers on RateLimitError
  • CLI toolpip 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

contentflow_sdk-0.1.0.tar.gz (21.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

contentflow_sdk-0.1.0-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

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

Hashes for contentflow_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b35a092316843e34a3050dbc26cb3ed6d8fcc6d4077dff9351072195b0cec543
MD5 155015e6d76c4df7e42e6219bf8f2191
BLAKE2b-256 8bf3eb8d69083671b26bdacd005ea3fb196b54bf0c62145f2f69cb59055e42e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for contentflow_sdk-0.1.0.tar.gz:

Publisher: publish.yml on gocontentflow/contentflow-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for contentflow_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a18ede1de9b875d3b89b809a7c0198c6eb8868e89f9fadae5f81a6e9bae8a060
MD5 2b91380417b29dffda6e77ccdef25709
BLAKE2b-256 c8900c56f07b767703f07856a4b1da9819af36195b67b05623f18c4e5be7c3d2

See more details on using hashes here.

Provenance

The following attestation bundles were made for contentflow_sdk-0.1.0-py3-none-any.whl:

Publisher: publish.yml on gocontentflow/contentflow-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page