Skip to main content

HappyHorse text-to-video, image-to-video, and edit-video client for RunAPI

Project description

HappyHorse Python SDK for RunAPI

The HappyHorse Python SDK is the language-specific package for HappyHorse on RunAPI. Use it for text-to-video, image-to-video, and edit-video flows when your application needs JSON request bodies, task status lookup, and consistent RunAPI errors in Python.

For model details, use https://runapi.ai/models/happyhorse; for API reference, use https://runapi.ai/docs#happyhorse; for SDK docs, use https://runapi.ai/docs#sdk-happyhorse.

Install

pip install runapi-happyhorse

Quick start

from runapi.happyhorse import HappyHorseClient

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

task = client.text_to_video.create(
    model="happyhorse-text-to-video",
    prompt="A horse galloping along a beach at sunset, cinematic",
    aspect_ratio="16:9",
    output_resolution="1080p",
)
status = client.text_to_video.get(task.id)

clip = client.image_to_video.create(
    model="happyhorse-image-to-video",
    first_frame_image_url="https://example.com/first-frame.jpg",
)

Use create to submit a task and return quickly, get to fetch the latest task state, and run to create and poll until completion:

result = client.text_to_video.run(
    model="happyhorse-text-to-video",
    prompt="A serene mountain river at dawn",
)
print(result.videos[0].url)

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 videos 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.

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

runapi_happyhorse-0.1.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

runapi_happyhorse-0.1.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: runapi_happyhorse-0.1.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for runapi_happyhorse-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a4317199b120ca662a984d3cd85b5cc864545ccddd67a5171513e53627c4ed44
MD5 793dc61e2aef8cb9210dd76a7257ef9c
BLAKE2b-256 0d0c91065768828976dad7c568faa3f9386d4cd6202ff93d2219e4b28ac62395

See more details on using hashes here.

File details

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

File metadata

  • Download URL: runapi_happyhorse-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for runapi_happyhorse-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 548935aec729560e86da64d2e7db14d8db4536ce71e72b0f3da8866365a15961
MD5 3958b8055bdc6b8d8cbb3a7218ae0434
BLAKE2b-256 b0b5837a9c2a6700f38441aea2a09af96f0af5817a422fdd3a2b9872026446d0

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