Skip to main content

Magic Hour API Python SDK

Overview

Introduction

Magic Hour provides an API (beta) that can be integrated into your own application to generate videos using AI.

Webhook documentation can be found here.

If you have any questions, please reach out to us via discord.

Authentication

Every request requires an API key.

To get started, first generate your API key here.

Then, add the Authorization header to the request.

Key Value
Authorization Bearer mhk_live_apikey

Warning: any API call that renders a video will utilize frames in your account.

Synchronous Client

from magic_hour import Client
from os import getenv

client = Client(token=getenv("API_TOKEN"))

Asynchronous Client

from magic_hour import AsyncClient
from os import getenv

client = AsyncClient(token=getenv("API_TOKEN"))

Module Documentation and Snippets

v1.ai_headshot_generator

  • create - Create AI Headshots

v1.ai_image_generator

v1.ai_image_upscaler

  • create - Create Upscaled Image

v1.ai_photo_editor

v1.ai_qr_code_generator

v1.animation

v1.face_swap

  • create - Create Face Swap video

v1.face_swap_photo

  • create - Create Face Swap Photo

v1.files.upload_urls

  • create - Generate asset upload urls

v1.image_projects

  • delete - Delete image
  • get - Get image project details

v1.image_to_video

  • create - Create Image-to-Video

v1.lip_sync

  • create - Create Lip Sync video

v1.text_to_video

  • create - Create Text-to-Video

v1.video_projects

  • delete - Delete video
  • get - Get video details

v1.video_to_video

  • create - Create Video-to-Video

Metadata

Release files for magic-hour 0.4.0

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

Source distribution (sdist)

Source distribution for magic-hour 0.4.0
File Size Uploaded Provenance Actions
magic_hour-0.4.0.tar.gz 27.0 kB Without provenance Details for magic_hour-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for magic-hour 0.4.0
File Interpreter ABI Platform Actions
magic_hour-0.4.0-py3-none-any.whl Python 3 none any Details for magic_hour-0.4.0-py3-none-any.whl

Total release size: 108.5 kB

Release files / magic_hour-0.4.0.tar.gz

Download URL magic_hour-0.4.0.tar.gz
Size 27.0 kB
Tags Source
SHA-256 checksum
How to use checksums
795865b7d26ce63bc302d86d1fee9f0850e73e2007597b5768a6014d58d715e0
BLAKE2b-256 checksum
How to use checksums
678c12aeb9dbd4f607f10a3fb2c24378cae61b7207285a3436a0c318aab237cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0 CPython/3.10.12 Linux/6.5.0-1025-azure

Release files / magic_hour-0.4.0-py3-none-any.whl

Download URL magic_hour-0.4.0-py3-none-any.whl
Size 81.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
531fd8e838f7a2a95fad85816787d0d653bc555ca9390adad997a838a71ad250
BLAKE2b-256 checksum
How to use checksums
757284dd810a3f46365a9386f472888285329ab772d530c7bae22dd1aa02110d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0 CPython/3.10.12 Linux/6.5.0-1025-azure

Security for magic-hour 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files No provenance

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