{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Merger – Join MP4 Clips, Add Music & Intro",
    "description": "Video merger: join MP4/MOV/WebM clips and photos from URLs into one MP4 in your order. Lossless when formats match, else re-encode to 1080p/720p, 16:9, 9:16 or 1:1. Add intro/outro, crossfade transitions, background music. Public download link. $0.09 per output minute (1080p).",
    "version": "0.1",
    "x-build-id": "0Ojg7RXF1OLv03Voc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gazidev~video-merger/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gazidev-video-merger",
        "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/gazidev~video-merger/runs": {
      "post": {
        "operationId": "runs-sync-gazidev-video-merger",
        "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/gazidev~video-merger/run-sync": {
      "post": {
        "operationId": "run-sync-gazidev-video-merger",
        "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": {
          "videoUrls": {
            "title": "Video clips to merge (in playback order)",
            "type": "array",
            "description": "Direct links to video FILES (MP4, MOV, WebM, MKV, AVI, M4V, HLS .m3u8) or photos (JPG, PNG, WebP), joined top to bottom into one MP4. Pages of YouTube, TikTok, Instagram, Vimeo etc. are refused: this is a merger, not a downloader.",
            "default": [
              "https://download.samplelib.com/mp4/sample-5s.mp4",
              "https://download.samplelib.com/mp4/sample-10s.mp4"
            ],
            "items": {
              "type": "string"
            }
          },
          "bulkText": {
            "title": "Bulk list (paste text or CSV)",
            "type": "string",
            "description": "Optional: more clip URLs, one per line (or a CSV with a `url` column), appended after `videoUrls` in this order."
          },
          "datasetId": {
            "title": "Read clip URLs from an Apify dataset (ID or name)",
            "type": "string",
            "description": "Optional: chain after another Actor that outputs video file URLs; items are merged in dataset order."
          },
          "datasetField": {
            "title": "Dataset field with the URL",
            "type": "string",
            "description": "Field name in that dataset.",
            "default": "url"
          },
          "introUrl": {
            "title": "Intro clip or image URL",
            "type": "string",
            "description": "Optional video (or title-card image) placed before the first clip."
          },
          "outroUrl": {
            "title": "Outro clip or image URL",
            "type": "string",
            "description": "Optional video (or end-card image) placed after the last clip."
          },
          "backgroundMusicUrl": {
            "title": "Background music URL (MP3, M4A, WAV, ...)",
            "type": "string",
            "description": "Optional audio file laid under the whole video, cut to the video length with fade in/out. Use music you have the rights to."
          },
          "musicVolume": {
            "title": "Music volume",
            "minimum": 0,
            "maximum": 3,
            "type": "number",
            "description": "1 = original loudness. 0.2–0.4 keeps speech in the clips audible; use 1 when `keepOriginalAudio` is off.",
            "default": 0.3
          },
          "keepOriginalAudio": {
            "title": "Keep the clips' own audio",
            "type": "boolean",
            "description": "Off = music only (or a silent video when no music is given).",
            "default": true
          },
          "originalVolume": {
            "title": "Clip audio volume",
            "minimum": 0,
            "maximum": 3,
            "type": "number",
            "description": "Volume of the clips' own audio when mixed with music.",
            "default": 1
          },
          "loopMusic": {
            "title": "Loop music if shorter than the video",
            "type": "boolean",
            "description": "Off = the music plays once, then silence.",
            "default": true
          },
          "musicFadeInSec": {
            "title": "Music fade-in (seconds)",
            "minimum": 0,
            "maximum": 30,
            "type": "number",
            "description": "Seconds to fade the background music in at the start. 0 = no fade.",
            "default": 1
          },
          "musicFadeOutSec": {
            "title": "Music fade-out (seconds)",
            "minimum": 0,
            "maximum": 30,
            "type": "number",
            "description": "Seconds to fade the background music out at the end. 0 = no fade.",
            "default": 2
          },
          "transition": {
            "title": "Transition between clips",
            "enum": [
              "none",
              "fade",
              "fadeblack",
              "fadewhite",
              "dissolve",
              "wipeleft",
              "wiperight",
              "slideleft",
              "slideright",
              "smoothleft",
              "circleopen",
              "radial"
            ],
            "type": "string",
            "description": "Transitions overlap neighbouring clips by `transitionSec` (video and audio crossfade) and always re-encode.",
            "default": "none"
          },
          "transitionSec": {
            "title": "Transition length (seconds)",
            "minimum": 0.1,
            "maximum": 3,
            "type": "number",
            "description": "Capped at half of the shortest clip.",
            "default": 0.5
          },
          "maxResolution": {
            "title": "Max output resolution",
            "enum": [
              "original",
              "2160",
              "1440",
              "1080",
              "720",
              "480",
              "360"
            ],
            "type": "string",
            "description": "The output takes the first clip's size, with the short side capped at this value (never upscaled). Billing depends on the output resolution.",
            "default": "1080"
          },
          "aspectRatio": {
            "title": "Aspect ratio",
            "enum": [
              "auto",
              "16:9",
              "9:16",
              "1:1",
              "4:5",
              "4:3"
            ],
            "type": "string",
            "description": "Clips with a different shape are letterboxed (`pad`) or cropped to fill (`crop`).",
            "default": "auto"
          },
          "fitMode": {
            "title": "Fit clips of a different shape",
            "enum": [
              "pad",
              "crop"
            ],
            "type": "string",
            "description": "How clips with a different aspect ratio than the output are fitted: pad keeps the whole picture with bars, crop fills the frame.",
            "default": "pad"
          },
          "padColor": {
            "title": "Padding color",
            "type": "string",
            "description": "Color name or hex like `#202020`.",
            "default": "black"
          },
          "imageDurationSec": {
            "title": "Seconds per photo",
            "minimum": 0.5,
            "maximum": 60,
            "type": "number",
            "description": "How long each JPG/PNG/WebP in the list (or intro/outro image) is shown.",
            "default": 3
          },
          "fps": {
            "title": "Frame rate (fps)",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "0 = the first clip's frame rate.",
            "default": 0
          },
          "quality": {
            "title": "Quality (when re-encoding)",
            "enum": [
              "small",
              "balanced",
              "high"
            ],
            "type": "string",
            "description": "Encoding quality used when clips must be re-encoded. Lossless joins are not affected.",
            "default": "balanced"
          },
          "forceReencode": {
            "title": "Always re-encode",
            "type": "boolean",
            "description": "By default clips with identical format, resolution and frame rate are joined losslessly (stream copy: fast, no quality loss, billed as lossless minutes). Turn on to always re-encode to H.264/AAC.",
            "default": false
          },
          "outputName": {
            "title": "Output file name",
            "type": "string",
            "description": "Name of the MP4 in the key-value store (letters, digits, - _ . only).",
            "default": "merged"
          },
          "jobs": {
            "title": "Batch: several merges in one run (advanced)",
            "type": "array",
            "description": "Optional list of objects `{\"videoUrls\": [...], \"introUrl\", \"outroUrl\", \"backgroundMusicUrl\", \"outputName\"}` - one MP4 per object, all other settings shared. When set, the top-level clip fields are ignored."
          },
          "skipFailedClips": {
            "title": "Skip clips that fail to download",
            "type": "boolean",
            "description": "Off = a merge with a broken clip is not produced (error row, not charged). On = merge the remaining clips and list the skipped ones.",
            "default": false
          },
          "maxFileSizeMb": {
            "title": "Max size per input file (MB)",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Larger files fail with an error (not charged). For many big files give the run more memory (disk).",
            "default": 500
          },
          "maxDurationMinutes": {
            "title": "Max merged video length (minutes)",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Cost cap: longer merges are refused before encoding (not charged).",
            "default": 60
          },
          "maxClips": {
            "title": "Max clips per merge",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Safety limit on the number of clips in one merge.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Only for hosts that block datacenter IPs (HTTP 403).",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}