Golpo Python SDK

Latest: v1.0.0

The Golpo Python SDK helps you effortlessly generate professional-quality AI podcasts from text prompts and documents. It transparently handles file uploads, backend processing, and podcast generation.

Installation

Terminal
pip install golpo

Quick Start

Create a Golpo client with your API key:

quickstart.py
from golpo import Golpo

golpo_client = Golpo(api_key="your-api-key")

Method: create_podcast

Stable

This method uploads files (if local), starts podcast generation, waits until processing finishes, and returns a direct podcast URL.

Method Signature

method_signature.py
golpo_client.create_podcast(
    prompt: str,
    uploads: Optional[Union[str, Path, Iterable[Union[str, Path]]]] = None,
    *,
    add_music: bool = False,
    voice_instructions: Optional[str] = None,
    personality_1: Optional[str] = None,
    personality_2: Optional[str] = None,
    do_research: bool = False,
    tts_model: str = "accurate",
    language: Optional[str] = None,
) -> str

Parameters

ParameterTypeRequiredDefaultDescription
promptstrTopic or question for the podcast.
uploadsstr, Path, or iterableOptionalNoneLocal file paths or remote URLs (https://, http://, s3://).
add_musicboolOptionalFalseAdds intro/outro music.
voice_instructionsstrOptionalNoneVoice style instructions, e.g., "calm female".
personality_1strOptionalNonePrimary narrator persona, e.g., "historian".
personality_2strOptionalNoneSecond persona for dialogue format.
do_researchboolOptionalFalseIf enabled, Golpo adds web research to your input documents.
tts_model"accurate" or "fast"Optional"accurate"Choose "accurate" for high quality, "fast" for quicker results.
languagestrOptional"en"Any language string ("en", "English", "Hindi", etc.).

Returns

A direct HTTPS URL (str) linking to your final podcast (MP3).

Usage Examples

Simple example (prompt-only)

Basic
simple_example.py
podcast_url = golpo_client.create_podcast(prompt="Explain quantum computing simply")
print(podcast_url)

Podcast from local files

Advanced
local_files.py
podcast_url = golpo_client.create_podcast(
    prompt="Summarize these privacy documents",
    uploads=["~/Documents/privacy_policy.pdf"],
    add_music=True,
    voice_instructions="calm professional female",
    personality_1="privacy expert"
)
print(podcast_url)

Podcast from remote URLs

Advanced
remote_urls.py
podcast_url = golpo_client.create_podcast(
    prompt="Analyze these articles",
    uploads=[
        "https://example.com/article1.pdf",
        "https://example.com/article2.pdf"
    ],
    do_research=True,
    personality_1="historian",
    personality_2="journalist"
)
print(podcast_url)

Mixing local and remote files

Advanced
mixed_files.py
podcast_url = golpo_client.create_podcast(
    prompt="Combine these documents",
    uploads=[
        "~/local.pdf",
        "https://example.com/remote.pdf"
    ],
    add_music=True
)
print(podcast_url)

Error Handling

Error TypeCommon CausesHow to Fix
FileNotFoundErrorIncorrect local file pathsVerify file paths
HTTPError (413)File too large for direct uploadUpload using URLs or presigned uploads
HTTPError (422)Invalid field dataConfirm parameter correctness