Abstract gradient background for the Magic Hour API

Create with the Magic Hour API

Run a real video or image request before you create an account.
Create a key, then make your first API call.
API Playground
POST   /v1/ai-image-generator
Ready
ExampleExample image generated with Magic Hour
from magic_hour import Client
from os import getenv

client = Client(token=getenv("MAGIC_HOUR_API_KEY"))
res = client.v1.ai_image_generator.generate(
    image_count=1,
    style={
        "prompt": "Black perfume bottle on wet stone, violet light and soft haze.",
        "tool": "general",
    },
    aspect_ratio="16:9",
    model="z-image-turbo",
    name="My first AI image",
    resolution="640px",
    wait_for_completion=True,
    download_outputs=True,
    download_directory="."
)
API Playground
POST   /v1/text-to-video
Ready
Example
from magic_hour import Client
from os import getenv

client = Client(token=getenv("MAGIC_HOUR_API_KEY"))
res = client.v1.text_to_video.create(
    end_seconds=3.0,
    aspect_ratio="16:9",
    style={"prompt": "Perfume bottle on wet stone. Slow orbit, moving light and mist."},
    name="My first AI video",
    model="ltx-2.5",
    resolution="480p",
    audio=True,
)

Integrate Dozens of AI Tools in Minutes

Choose the Right Model API

Build with model-specific APIs for video, image generation, and image editing. Compare inputs, examples, and capabilities across Magic Hour's supported models. Start with product-video and lip-sync recipes or use our API evaluation guide to compare cost per accepted output on your own workload. For ChatGPT or Claude, see Magic Hour MCP setup.

Estimate Your API Costs

Every generation uses credits. Prepay with a subscription or one-time credit packs, or request usage-based billing for monthly invoicing and volume discounts.
USD subscription prices. Image allowances use Z-Image Turbo at 1K (5 credits/image); video allowances use LTX-2.5 at 480p. These reference allowances do not describe every endpoint. Choose your tool, model, and settings below for its estimate.
Seconds of Video Per Month
100 seconds
seconds
Recommended plan
Business Yearly
$792
/year
840,000 credits per year
Up to 9.7 hours of video
Up to 168,000 images
Selected plan: Business Yearly
BUSINESS YEARLY covers your usage
Estimated usage
30,000credits / month
Included
70,000credits / month
Remaining headroom
40,000credits / month
TOTAL BILL
$792
/year

Need Usage-Based Billing?

Pay monthly for the credits you use, with graduated volume discounts. Contact our team for setup assistance.
Contact Form
Name
Email
Project requirements
or
Chat with our team directly here.

Built for How Developers Actually Ship

SDKs for Your Tech Stack

Our SDKs support multiple popular languages, making integration seamless and fast

What developers say

"about 30K people try the face swap daily. The API handled that scale easily and was fast and easy to integrate."
"I built it myself in two weeks with Replit and OpenAI, Magic Hour, music, and Stripe API's"
"Especially when using the API, you don't have to spend ages tweaking little parameters to get it to work well, most tools are great out of the box and when you do need to make some adjustments, its very easy to do so."
"Magic Hour is cost-effective and a great way to harness image and video generation from modern models in a way where I can abstract the nitty gritty and focus on my actual application."