Skip to main content

A Python SDK for the PodFeed API

Project description

PodFeed SDK

A Python SDK for the PodFeed API, enabling developers to generate high-quality Podcast-style audio content from various input sources using AI.

Features

  • Multiple Input Types: Support for text, URLs, files, topics, and bring-your-own-script
  • Audio Generation Modes: Monologue (single voice) and dialogue (two voices) modes
  • Voice Customization: Multiple voice options for different languages. Some voices support custom instructions
  • Script Customization: Adjustable complexity levels, lengths, and emphasis

Installation

pip install podfeed-sdk

Authentication

The SDK supports two ways to provide your API key:

  1. Environment Variable:

    export PODFEED_API_KEY="your-api-key-here"
    
  2. Direct initialization:

    from podfeed import PodfeedClient
    
    client = PodfeedClient(api_key="your-api-key-here")
    

Quick Start

Get an API key

Go to https://podfeed.ai, log in, and get an API key.

Generate Audio (from Website)

from podfeed import (
    PodfeedClient,
    PodfeedError,
    AudioGenerationRequest,
    InputContent,
    VoiceConfig,
    ContentConfig,
)

# Initialize client (uses PODFEED_API_KEY env var)
client = PodfeedClient()

# Example URL
website_url = "https://podfeed.ai/faq"

# Generate audio from website
result = client.generate_audio(
    request=AudioGenerationRequest(
        input_type="url",
        mode="dialogue",
        input_content=InputContent(url=website_url),
        voice_config=VoiceConfig(
            host_voice="google-male-puck", cohost_voice="google-female-leda"
        ),
        content_config=ContentConfig(
            level="intermediate",
            length="medium",
            language="en-US",
        ),
    )
)

task_id = response["task_id"]
print(f"Task created: {task_id}")

# Wait for completion
result = client.wait_for_completion(task_id)
print(f"Audio generated: {result['result']['audio_url']}")

List Available Voices

from podfeed import PodfeedClient

api_key = os.getenv("PODFEED_API_KEY")
if not api_key:
    print("Error: PODFEED_API_KEY environment variable not set")
    return 1

client = PodfeedClient(api_key=api_key)

voices_config = client.list_available_voices()
print(voices_config)

Usage Examples

See the example in the examples repository: https://github.com/smh-labs/podfeed-sdk-samples

Error Handling

from podfeed_sdk import PodfeedClient, PodfeedError, PodfeedAuthError, PodfeedAPIError

try:
    client = PodfeedClient()
    response = client.generate_audio(
        input_type="text",
        text_content="Sample text"
    )
except PodFeedAuthError as e:
    print(f"Authentication error: {e}")
except PodFeedAPIError as e:
    print(f"API error: {e.message} (Status: {e.status_code})")
except PodFeedError as e:
    print(f"General error: {e}")

API Reference

Core Methods

  • generate_audio(**kwargs) - Generate audio from various input types
  • wait_for_completion(task_id, timeout=1800) - Wait for task completion
  • get_task_progress(task_id) - Check task progress
  • get_audio_status(task_id) - Get audio generation status

Audio Management

  • list_audios(limit=20, offset=0, status=None) - List audio files
  • get_audio(audio_id) - Get audio details
  • delete_audio(audio_id) - Delete audio file
  • download_audio_with_metadata(audio_id) - Download with metadata

File Operations

  • get_upload_urls(files) - Get signed upload URLs
  • create_share_link(audio_id) - Create shareable link

Requirements

  • Python 3.7+
  • requests >= 2.25.0

Rate Limits

Details coming soon.

Support

For API support, email support@podfeed.ai.

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

podfeed_sdk-0.2.0.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

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

podfeed_sdk-0.2.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file podfeed_sdk-0.2.0.tar.gz.

File metadata

  • Download URL: podfeed_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for podfeed_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3eb92a3cb55aba0230a6de044cc97e10c4e1361a75b5b244ae910dd02f4efecf
MD5 3338b0c6c385a2e86f80430ddc52adb9
BLAKE2b-256 b4a15414c5eb0dcca5fb7f18bb81392dc0319852d96d8b374c790bbb91d79f80

See more details on using hashes here.

File details

Details for the file podfeed_sdk-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: podfeed_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for podfeed_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c1bd0e4017757a65df7b820a9f6ab634fb3da61bc1b9e3efa8cb375af5fcea18
MD5 6ab12f66cd4016c7f89e4211f7a75ff5
BLAKE2b-256 440bbc9267b6bcf7380a49c8a5ef3397d54549563a388a08044cf1961d5750b5

See more details on using hashes here.

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