Skip to main content

HappyHorse API Python SDK for RunAPI

The HappyHorse Python SDK is the language-specific package for HappyHorse on RunAPI. Use this package for video generation, animation, and video editing workflows when your application needs request bodies, task status lookup, and consistent RunAPI errors in Python.

Install

pip install runapi-happyhorse

Quick start

from runapi.happyhorse import HappyHorseClient

client = HappyHorseClient()  # reads RUNAPI_API_KEY, or pass api_key="sk-..."

video = client.text_to_video.run(
    model="happyhorse-text-to-video",
    prompt="A horse galloping along a beach at sunset, cinematic",
    aspect_ratio="16:9",
    output_resolution="1080p",
    duration_seconds=5,
)
print(video.videos[0].url)

For image-to-video, call client.image_to_video.run with model="happyhorse-image-to-video" and a first_frame_image_url. For edit-video, call client.edit_video.run with model="happyhorse-edit-video". Use create to submit a task and return quickly, get to fetch the latest task state, and run to create and poll until completion. In web request handlers, prefer create plus webhook or later get polling so a worker is not held open.

RunAPI-generated file URLs are temporary. Download and store generated images, videos, audio, or other files in your own durable storage within 7 days; do not treat returned URLs as long-term assets.

Language notes

Pass parameters as keyword arguments and catch the runapi.happyhorse error classes when building video jobs or scripts. The available resources are text_to_video, image_to_video, and edit_video. Keep RUNAPI_API_KEY in the environment or your secret manager; never commit API keys or callback secrets.

Links

License

Licensed under the Apache License, Version 2.0.

Release files for runapi-happyhorse 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for runapi-happyhorse 0.1.1
File Size Uploaded
runapi_happyhorse-0.1.1.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for runapi-happyhorse 0.1.1
File Interpreter ABI Platform
runapi_happyhorse-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size:14.0 kB

Release files / runapi_happyhorse-0.1.1.tar.gz

Download URL runapi_happyhorse-0.1.1.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8d36f53cd32a7c1cccc9a1eaa854aa2f3f22d5ae573eb13920e38c3ebdc50d03
BLAKE2b-256 checksum
How to use checksums
1f653ad7fe7d7c02f02db3615b6f34446bdfda127a9d7f33a79fd0574252867f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / runapi_happyhorse-0.1.1-py3-none-any.whl

Download URL runapi_happyhorse-0.1.1-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
76b117143a90b32fe364e665880f6400b7138f4d01d56391144d1790884e54d7
BLAKE2b-256 checksum
How to use checksums
abcc09659c1cd708e704f204d4fbf0adc184b205193c74755829849ee0ea09a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

0.2.1

2 release files

0.2.0

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page