Skip to main content

Python SDK for Whiteframes AI — create AI-powered videos programmatically

Project description

Whiteframes AI Python SDK

Create AI-powered videos programmatically with a single Python call.

Installation

pip install whiteframes

Quick Start

from whiteframes import WhiteframesAI

client = WhiteframesAI(api_key="wfai_your_key_here")

# Create a video (blocks until ready, ~2 minutes)
video = client.create_video(
    prompt="Explain how neural networks learn",
    voice="Stephen",
    quality="standard",
    scenes=8,
    video_type="educational",
)

print(video.title)          # "How Neural Networks Learn"
print(len(video.scenes))    # 8
print(video.scenes[0].narration)

Async (non-blocking)

job = client.create_video_async(prompt="Explain blockchain")
print(job.job_id)  # save this, poll later

# Poll manually
job.refresh()
print(job.status, job.progress)

# Or block with progress callback
def show_progress(progress, message):
    print(f"[{progress}%] {message}")

video = job.wait(on_progress=show_progress)

Supported Voices

voiceId Language Gender
Stephen en-US Male
Matthew en-US Male
Ruth en-US Female
Joanna en-US Female
Amy en-GB Female
Brian en-GB Male
Olivia en-AU Female

Supported Video Types

whiteboard, saas-demo, infographic, corporate, architecture, educational, social-short, pitch, onboarding, storytelling, news, videocast

Videocast (Multi-speaker)

video = client.create_video(
    prompt="Discuss the future of AI",
    video_type="videocast",
    scenes=8,
    speaker_voices={
        "speaker_1": "Stephen",
        "speaker_2": "Ruth",
        "speaker_3": "Brian",
    },
)

Error Handling

from whiteframes import WhiteframesAI, InsufficientCreditsError, ContentRejectedError

try:
    video = client.create_video(prompt="...")
except InsufficientCreditsError:
    print("Not enough credits")
except ContentRejectedError:
    print("Content was rejected by moderation")

Get API Key

Sign in at whiteframes.ai → Settings → API Keys → Create 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

whiteframes-0.1.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

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

whiteframes-0.1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file whiteframes-0.1.0.tar.gz.

File metadata

  • Download URL: whiteframes-0.1.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for whiteframes-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6bc6ab8ca4f6c4d6cfe50697bf7c63a1ccb442111b5a6a276780518fea7133cf
MD5 4137ad27cb59ff75366ea475afb43644
BLAKE2b-256 1235325dee44e57ff75eaaca89108a12b13ae957972b278dd461cbec1adf9ddf

See more details on using hashes here.

File details

Details for the file whiteframes-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: whiteframes-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for whiteframes-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c2682d33ea9e7897e0f1395c6c5d382c9603819943f7892aefa9742dfa43b5c
MD5 7066d8160d01c278c1aae78a288ef605
BLAKE2b-256 8d3db5934f693272752bdcfc3623a3d7329d346b6fd81f31c81ad8eb33e4af71

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