# Magic Hour — AI Video & Image Generation (`equitable_overtone/magic-hour-ai-video-image`) Actor

Generate and edit video and images with Magic Hour's models — text-to-video, image-to-video, talking photo, character replace and instruction-based image editing.

- **URL**: https://apify.com/equitable\_overtone/magic-hour-ai-video-image.md
- **Developed by:** [Muhammad Ali Hashar](https://apify.com/equitable_overtone) (community)
- **Categories:**
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Magic Hour — AI Video & Image Generation

Generate and edit video and images with Magic Hour models, directly from Apify.

### What it does

| Model | Does | Inputs | Output |
|---|---|---|---|
| `magic-hour/video-1` | Flagship and hero launch. Strongest self-hosted general video retentio | text, image | video |
| `magic-hour/image-editor-1` | Best evidence at scale and a large existing Magic Hour workflow. | text, image | image |
| `magic-hour/talking-photo-1` | Clear, highly demonstrable output. Highest measured Talking Photo D1. | text, image, audio | video |
| `magic-hour/character-replace-1` | Differentiated capability that general video models do not reliably re | video, image | video |
| `magic-hour/video-1-fast` | Price and latency wedge. Initial engine selection must be confirmed by | text, image | video |

### Input

| Field | Type | Notes |
|---|---|---|
| `model` | string | One of the aliases above. **Required.** |
| `prompt` | string | What to generate, or the edit instruction. |
| `imageUrl` | string | Required for image-to-video, image edit, talking photo, character replace. |
| `videoUrl` | string | Required for character replace and video-to-video. |
| `audioUrl` | string | Optional drive audio for talking photo. |
| `durationSeconds` | integer | Video models only. |
| `resolution` | string | Must be supported by the chosen model. |
| `aspectRatio` | string | Must be supported by the chosen model. |
| `seed` | integer | Optional; reproduces a run. |
| `batch` | array | Many generations in one run; each item overrides the top-level fields. |

Example:

```json
{
  "model": "magic-hour/video-1",
  "prompt": "Camera slowly panning right over a misty pine forest at dawn",
  "durationSeconds": 5,
  "resolution": "1080p",
  "aspectRatio": "16:9"
}
```

### Output

One dataset item per generation:

```json
{
  "model": "magic-hour/video-1",
  "revision": "2026-09-04-minimax-h3-a",
  "status": "success",
  "outputUrl": "https://...",
  "inputMode": "i2v",
  "durationSeconds": 5,
  "resolution": "1080p",
  "aspectRatio": "16:9",
  "totalMs": 96214,
  "failureReason": null
}
```

The generated file is also stored in the run's key-value store under
`OUTPUT-<n>` so you can link to it directly.

### Pricing

Pay per event. You are charged once for the run starting, then per second of
generated video (or per generated image) — **only for generations that
actually succeed**. Failed, moderation-blocked and invalid-input generations
are not charged.

- **Actor start** — $0.002
- **Magic Hour Video 1 — per video second** — $0.5
- **Magic Hour Image Editor 1 — per image** — $0.04
- **Magic Hour Talking Photo 1 — per video second** — $0.3
- **Magic Hour Character Replace 1 — per video second** — $0.6
- **Magic Hour Video 1 Fast — per video second** — $0.12

### Notes

- Model names are stable. When Magic Hour improves the implementation behind
  `magic-hour/video-1`, the name does not change; the `revision` in the output
  does. Log the revision if you need reproducibility.
- Long videos take minutes. Set the run timeout accordingly.

### Support

- **Bugs and feature requests** — open an issue on the Issues tab of this
  Actor. That is the fastest route and it is tracked.
- **Questions about the models, prompting, credits or your Magic Hour
  account** — support@magichour.ai
- **Community** — the Magic Hour Discord: https://discord.gg/JX5rgsZaJp

### Your API key

This Actor never uses anyone else's key. Yours is an encrypted input,
decrypted only inside your own run, and generations bill your own Magic Hour
account. Run it without a key to see the model catalog without generating
anything.

# Actor input Schema

## `magicHourApiKey` (type: `string`):

Your own Magic Hour API key, from the Developer dashboard at magichour.ai. Generations are billed to your Magic Hour account. The value is encrypted and is not visible to anyone else, including the author of this Actor. Leave it empty to list the available models without generating.

## `model` (type: `string`):

Which Magic Hour model to run. Names are stable — the underlying implementation may improve without the name changing.

## `modelOverride` (type: `string`):

Optional. Run a specific checkpoint instead of the one the chosen Magic Hour model normally uses. Leave empty unless you have a reason — the defaults are the tuned ones.

## `prompt` (type: `string`):

What to generate, or the edit instruction.

## `imageUrl` (type: `string`):

Required for image-to-video, image editing, talking photo and character replace. Publicly reachable URL.

## `videoUrl` (type: `string`):

Required for character replace and video-to-video.

## `audioUrl` (type: `string`):

Audio track to drive the animation. **Required** by magic-hour/talking-photo-1 — a text prompt alone is not enough. Publicly reachable URL.

## `durationSeconds` (type: `integer`):

Video only. Supported across the catalog: \[5, 10, 15, 30].

## `resolution` (type: `string`):

Output resolution. Must be supported by the chosen model — see the model list above.

## `aspectRatio` (type: `string`):

Shape of the output. Must be supported by the chosen model.

## `seed` (type: `integer`):

Optional. Same seed + same prompt reproduces a run.

## `batch` (type: `array`):

Run many generations in one Actor run. Each item accepts the same fields as above and overrides them. When set, the top-level fields act as defaults.

## Actor input object example

```json
{
  "model": "magic-hour/video-1",
  "modelOverride": "",
  "prompt": "Camera slowly panning right over a misty pine forest at dawn",
  "durationSeconds": 5,
  "resolution": "720p",
  "aspectRatio": "16:9"
}
```

# Actor output Schema

## `generations` (type: `string`):

One row per generation: the public model name, the exact internal revision that produced it, the output URL, latency, and a failure reason when it did not succeed.

## `media` (type: `string`):

The generated video or image for each successful generation, stored as OUTPUT-0, OUTPUT-1 and so on.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "prompt": "Camera slowly panning right over a misty pine forest at dawn"
};

// Run the Actor and wait for it to finish
const run = await client.actor("equitable_overtone/magic-hour-ai-video-image").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "prompt": "Camera slowly panning right over a misty pine forest at dawn" }

# Run the Actor and wait for it to finish
run = client.actor("equitable_overtone/magic-hour-ai-video-image").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "prompt": "Camera slowly panning right over a misty pine forest at dawn"
}' |
apify call equitable_overtone/magic-hour-ai-video-image --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,equitable_overtone/magic-hour-ai-video-image"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/zx8sLgjddYJdbvQ3R/builds/QMnYnJKH6d7zmhqzA/openapi.json
