Create
Video
Image
Audio
Library
Developer

Developer Hub

No Quickstart key yet
Create a key to use the request code.

API Playground

Configure a request and generate a test result.
Result
Example output
Example image generated with Magic Hour
Step 3

Production code

Matches your prompt and generation settings — ready to copy into your app.
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="."
)
Uses your API key from MAGIC_HOUR_API_KEY.
Docs

API Playground

Configure a request and generate a test result.
Result
Example output

API Playground

Configure a request and generate a test result.
First frame preview
Example image
Result
Example output
Resources
AI Agent Skills
Create finished videos with Codex or Claude.
Plans & credit packs
Add credits for API generations.
Usage pricing
Pay for API usage as you scale.
Quick Start
Make your first API call in minutes.
API Cookbook
Runnable examples in a Colab notebook.
SDKs
Official client libraries on GitHub.
Community
Get help from our Discord community.