{
  "openapi": "3.0.1",
  "info": {
    "title": "Magic Hour — AI Video & Image Generation",
    "description": "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.",
    "version": "0.1",
    "x-build-id": "QMnYnJKH6d7zmhqzA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/equitable_overtone~magic-hour-ai-video-image/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-equitable_overtone-magic-hour-ai-video-image",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/equitable_overtone~magic-hour-ai-video-image/runs": {
      "post": {
        "operationId": "runs-sync-equitable_overtone-magic-hour-ai-video-image",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/equitable_overtone~magic-hour-ai-video-image/run-sync": {
      "post": {
        "operationId": "run-sync-equitable_overtone-magic-hour-ai-video-image",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "model"
        ],
        "properties": {
          "magicHourApiKey": {
            "title": "Magic Hour API key",
            "type": "string",
            "description": "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": {
            "title": "Model",
            "enum": [
              "magic-hour/video-1",
              "magic-hour/image-editor-1",
              "magic-hour/talking-photo-1",
              "magic-hour/character-replace-1",
              "magic-hour/video-1-fast"
            ],
            "type": "string",
            "description": "Which Magic Hour model to run. Names are stable — the underlying implementation may improve without the name changing.",
            "default": "magic-hour/video-1"
          },
          "modelOverride": {
            "title": "Specific model (advanced)",
            "enum": [
              "",
              "ltx-2.3",
              "ltx-2.5",
              "minimax-h3",
              "wan-2.2",
              "kling-2.6",
              "kling-3.0",
              "seedance-1.5",
              "seedance-2.0-mini",
              "seedance-2.0",
              "seedance-2.5",
              "veo3.1-lite",
              "veo3.1",
              "sora-2",
              "gemini-omni-1.1",
              "qwen-edit",
              "flux-schnell",
              "flux-2-klein",
              "z-image-turbo",
              "seedream-v4",
              "seedream-v4.5",
              "seedream-v5-pro",
              "nano-banana",
              "nano-banana-2",
              "nano-banana-pro",
              "gpt-image-2"
            ],
            "type": "string",
            "description": "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.",
            "default": ""
          },
          "prompt": {
            "title": "Prompt",
            "type": "string",
            "description": "What to generate, or the edit instruction."
          },
          "imageUrl": {
            "title": "Input image URL",
            "type": "string",
            "description": "Required for image-to-video, image editing, talking photo and character replace. Publicly reachable URL."
          },
          "videoUrl": {
            "title": "Input video URL",
            "type": "string",
            "description": "Required for character replace and video-to-video."
          },
          "audioUrl": {
            "title": "Input audio URL",
            "type": "string",
            "description": "Audio track to drive the animation. **Required** by magic-hour/talking-photo-1 — a text prompt alone is not enough. Publicly reachable URL."
          },
          "durationSeconds": {
            "title": "Duration (seconds)",
            "type": "integer",
            "description": "Video only. Supported across the catalog: [5, 10, 15, 30].",
            "default": 5
          },
          "resolution": {
            "title": "Resolution",
            "enum": [
              "1080p",
              "1k",
              "2k",
              "480p",
              "720p"
            ],
            "type": "string",
            "description": "Output resolution. Must be supported by the chosen model — see the model list above.",
            "default": "720p"
          },
          "aspectRatio": {
            "title": "Aspect ratio",
            "enum": [
              "16:9",
              "1:1",
              "3:2",
              "4:3",
              "9:16"
            ],
            "type": "string",
            "description": "Shape of the output. Must be supported by the chosen model.",
            "default": "16:9"
          },
          "seed": {
            "title": "Seed",
            "type": "integer",
            "description": "Optional. Same seed + same prompt reproduces a run."
          },
          "batch": {
            "title": "Batch (advanced)",
            "type": "array",
            "description": "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."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}