Skip to content

magichourhq/magic-hour-node

Repository files navigation

Magic Hour API Typescript 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.

Example Client Initialization

import Client from "magic-hour";

const client = new Client({ token: process.env["API_TOKEN"]!! });

Module Documentation and Snippets

  • create - Create AI Headshots
  • create - Create Upscaled Image
  • create - Create Face Swap video
  • create - Create Face Swap Photo
  • create - Generate asset upload urls
  • create - Image Background Remover
  • delete - Delete image
  • get - Get image details
  • create - Create Image-to-Video
  • create - Create Lip Sync video
  • create - Create Text-to-Video
  • delete - Delete video
  • get - Get video details
  • create - Create Video-to-Video