{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Editor API: Crop, Rotate, Speed, Mute & Reverse",
    "description": "Edit videos from direct file URLs in one call: crop (9:16, 1:1 or exact box), rotate, flip, speed up or slow down, mute, reverse and set fps. H.264 mp4 out with a signed link. No YouTube. Billed per clip (30 s included), free on failure.",
    "version": "0.1",
    "x-build-id": "QzPFzkG9pId1LsTF0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data-done-right~video-editor-ops/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data-done-right-video-editor-ops",
        "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/data-done-right~video-editor-ops/runs": {
      "post": {
        "operationId": "runs-sync-data-done-right-video-editor-ops",
        "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/data-done-right~video-editor-ops/run-sync": {
      "post": {
        "operationId": "run-sync-data-done-right-video-editor-ops",
        "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 URLs",
            "type": "array",
            "description": "Direct links to video files (mp4, mov, webm, mkv, avi). Example: https://example.com/clip.mp4. Every video gets the operations set below. YouTube, Vimeo, TikTok and other streaming-site page links are rejected, with no charge.",
            "items": {
              "type": "string"
            }
          },
          "videos": {
            "title": "Videos with their own operations",
            "type": "array",
            "description": "Different operations per video: [{\"url\": \"https://example.com/a.mp4\", \"name\": \"intro\", \"speed\": 2, \"cropAspect\": \"9:16\"}, ...]. Any option below can be set per video; options left out come from the run-level settings. Used in addition to 'Video URLs'."
          },
          "cropAspect": {
            "title": "Crop to aspect ratio",
            "type": "string",
            "description": "Centre-crop to the largest frame of this ratio: 1:1 (square), 9:16 (vertical), 16:9, 4:5 or any W:H. Example: 9:16. Leave empty for no ratio crop. Use either this or the exact crop box below."
          },
          "cropWidth": {
            "title": "Crop width (px)",
            "minimum": 16,
            "maximum": 16384,
            "type": "integer",
            "description": "Exact crop box, width in pixels of the picture as you see it (after any rotation tag). If you give only one of width and height, the other runs to the edge of the frame. Example: 640."
          },
          "cropHeight": {
            "title": "Crop height (px)",
            "minimum": 16,
            "maximum": 16384,
            "type": "integer",
            "description": "Exact crop box, height in pixels. Example: 360."
          },
          "cropX": {
            "title": "Crop left edge X (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Distance of the crop box from the left edge. Leave empty to centre it horizontally. Example: 0."
          },
          "cropY": {
            "title": "Crop top edge Y (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Distance of the crop box from the top edge. Leave empty to centre it vertically. Example: 0."
          },
          "rotate": {
            "title": "Rotate (degrees clockwise)",
            "enum": [
              "0",
              "90",
              "180",
              "270"
            ],
            "type": "string",
            "description": "Quarter turns only. 90 and 270 swap width and height. Applied after the crop.",
            "default": "0"
          },
          "flip": {
            "title": "Flip (mirror)",
            "enum": [
              "none",
              "horizontal",
              "vertical",
              "both"
            ],
            "type": "string",
            "description": "Mirror the picture. Horizontal swaps left and right, vertical turns it upside down.",
            "default": "none"
          },
          "speed": {
            "title": "Speed factor",
            "minimum": 0.25,
            "maximum": 4,
            "type": "number",
            "description": "2 = twice as fast (half the length), 0.5 = slow motion (twice as long). Audio is changed with its pitch kept. Range 0.25 to 4. 1 = unchanged.",
            "default": 1
          },
          "reverse": {
            "title": "Reverse (play backwards)",
            "type": "boolean",
            "description": "Play the video backwards, audio included. Limited to 60 seconds and about 1.5 GB of raw frames (a 720p 30 fps clip up to roughly 35 s); crop or cut longer videos first. Applied after crop, rotate and flip.",
            "default": false
          },
          "mute": {
            "title": "Mute (remove audio)",
            "type": "boolean",
            "description": "Drop the audio track. On H.264 files, mute alone is a fast stream copy with no quality loss.",
            "default": false
          },
          "fps": {
            "title": "Output frame rate (fps)",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Convert to this constant frame rate, for example 24 or 30. Leave empty to keep the source rate. Applied last, so it is the real output rate."
          },
          "crf": {
            "title": "Video quality (CRF)",
            "minimum": 16,
            "maximum": 35,
            "type": "integer",
            "description": "H.264 quality when the video is re-encoded: lower = better and bigger files. 18 is near-lossless, 23 is the default, 28 is small.",
            "default": 23
          },
          "maxDurationMinutes": {
            "title": "Max video duration (minutes)",
            "minimum": 0.1,
            "type": "number",
            "description": "Longer source videos are rejected without charge. Billing is per started 30 seconds, so this also caps your cost. Example: 10.",
            "default": 10
          },
          "maxVideosPerRun": {
            "title": "Max videos per run",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on videos edited in one run. Videos past the cap are listed as skipped.",
            "default": 50
          },
          "maxVideoSizeMb": {
            "title": "Max video file size (MB)",
            "minimum": 1,
            "maximum": 2048,
            "type": "integer",
            "description": "Source files above this size are rejected before the download finishes.",
            "default": 500
          },
          "videoTimeoutSecs": {
            "title": "Timeout (seconds)",
            "minimum": 10,
            "maximum": 7200,
            "type": "integer",
            "description": "Applies separately to the download and to the edit of each video.",
            "default": 1800
          },
          "outputStoreName": {
            "title": "Save videos in a named store",
            "type": "string",
            "description": "Optional key-value store name. Named stores are kept until you delete them, while a run's own store expires after your plan's retention period. Example: my-edited-videos."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}