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
StableThis 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
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
prompt | str | ✓ | — | Topic or question for the podcast. |
uploads | str, Path, or iterable | Optional | None | Local file paths or remote URLs (https://, http://, s3://). |
add_music | bool | Optional | False | Adds intro/outro music. |
voice_instructions | str | Optional | None | Voice style instructions, e.g., "calm female". |
personality_1 | str | Optional | None | Primary narrator persona, e.g., "historian". |
personality_2 | str | Optional | None | Second persona for dialogue format. |
do_research | bool | Optional | False | If 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. |
language | str | Optional | "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)
Basicsimple_example.py
podcast_url = golpo_client.create_podcast(prompt="Explain quantum computing simply")
print(podcast_url)
Podcast from local files
Advancedlocal_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
Advancedremote_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
Advancedmixed_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 Type | Common Causes | How to Fix |
---|---|---|
FileNotFoundError | Incorrect local file paths | Verify file paths |
HTTPError (413) | File too large for direct upload | Upload using URLs or presigned uploads |
HTTPError (422) | Invalid field data | Confirm parameter correctness |