{
  "openapi": "3.0.1",
  "info": {
    "title": "Image to Video API — MiniMax Hailuo, Batch, Pay per Second",
    "description": "Turn images or text prompts into short videos with MiniMax Hailuo and get, for each clip, a dataset item with the video URL and its exact duration. Image to video, text to video, optional last-frame keyframe, batch input, no API key, pay per second of delivered video.",
    "version": "0.1",
    "x-build-id": "A4mTDrhVOqa54qkf3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sherwood~video-generator-batch/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sherwood-video-generator-batch",
        "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/sherwood~video-generator-batch/runs": {
      "post": {
        "operationId": "runs-sync-sherwood-video-generator-batch",
        "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/sherwood~video-generator-batch/run-sync": {
      "post": {
        "operationId": "run-sync-sherwood-video-generator-batch",
        "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",
        "properties": {
          "prompts": {
            "title": "Prompts",
            "type": "array",
            "description": "What should happen in each clip, in English for best results. Alone: one text-to-video clip per prompt. With imageUrls: paired by index (a single prompt is reused for every image). One dataset item is returned per clip, with an index matching the input order. Aliases merged into this list: prompt, texts.",
            "default": [
              "A paper plane gliding over pastel mountains, minimal flat illustration style, smooth camera pan"
            ],
            "items": {
              "type": "string"
            }
          },
          "imageUrls": {
            "title": "Images (first frame)",
            "type": "array",
            "description": "Images to animate, one clip per image, at least 256x256 pixels: public http(s) URLs, Google Drive or Dropbox share links, Drive file IDs, base64 images or data URIs. A newline- or comma-separated string works too. Without a matching prompt, a neutral motion prompt is used. Aliases merged into this list: imageUrl, urls, images, startUrls, imageFiles.",
            "items": {
              "type": "string"
            }
          },
          "endImageUrls": {
            "title": "End images (last frame, optional)",
            "type": "array",
            "description": "Pin the LAST frame of each clip (same accepted sources as imageUrls, paired by index, a single value is reused for every clip). With imageUrls this makes a first-to-last keyframe transition; alone it generates a clip that ends on this image. Alias: endImageUrl.",
            "items": {
              "type": "string"
            }
          },
          "prompt": {
            "title": "Single prompt (alias)",
            "type": "string",
            "description": "A single prompt, or several prompts in one newline-separated string (one prompt per line). Merged with prompts."
          },
          "texts": {
            "title": "texts (alias)",
            "type": "array",
            "description": "Alias of prompts.",
            "items": {
              "type": "string"
            }
          },
          "imageUrl": {
            "title": "imageUrl (alias)",
            "type": "string",
            "description": "A single image, or several in one newline- or comma-separated string. Merged with imageUrls."
          },
          "urls": {
            "title": "urls (alias)",
            "type": "array",
            "description": "Alias of imageUrls.",
            "items": {
              "type": "string"
            }
          },
          "images": {
            "title": "images (alias)",
            "type": "array",
            "description": "Alias of imageUrls.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "startUrls (alias)",
            "type": "array",
            "description": "Alias of imageUrls.",
            "items": {
              "type": "string"
            }
          },
          "imageFiles": {
            "title": "Upload images",
            "type": "array",
            "description": "Images uploaded from your computer, animated like imageUrls."
          },
          "datasetId": {
            "title": "Dataset ID (images from another Actor)",
            "type": "string",
            "description": "Animate the image URLs found in the items of an Apify dataset, for example the output of an image generator or a product scraper. Common image fields are detected automatically; set urlField to pick one."
          },
          "urlField": {
            "title": "Image field in the dataset",
            "type": "string",
            "description": "Field path(s) holding the image URL in each dataset item, for example images[].url or outputUrl. Comma-separated paths are tried in order. Leave empty to auto-detect."
          },
          "duration": {
            "title": "Clip duration (seconds)",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "Length of each clip, 1 to 15 seconds. You are charged per second of delivered video (the model can produce slightly more than requested; you pay the delivered duration, rounded to the nearest second).",
            "default": 5
          },
          "resolution": {
            "title": "Resolution",
            "enum": [
              "768P",
              "1080P",
              "480P"
            ],
            "type": "string",
            "description": "Output resolution. All three cost the same per second.",
            "default": "768P"
          },
          "promptExpansion": {
            "title": "Prompt expansion",
            "enum": [
              "balanced",
              "disabled",
              "quality"
            ],
            "type": "string",
            "description": "How much the model rewrites your prompt before generating. balanced is fast and usually better; disabled uses your prompt verbatim; quality spends up to ~30 s writing a richer prompt.",
            "default": "balanced"
          },
          "seed": {
            "title": "Seed (optional)",
            "minimum": 0,
            "type": "integer",
            "description": "Fix the seed to make a clip reproducible. Applied to every clip of the run. Leave empty for a random result each run."
          },
          "maxVideos": {
            "title": "Max videos per run",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Stop after this many clips. Protects against oversized lists. Default 20.",
            "default": 20
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}