{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Compressor & Resizer: Shrink MP4 for Web, Social & AI",
    "description": "Compress videos from direct file URLs to smaller H.264 mp4: 480p, 720p or 1080p presets, CRF quality or a target file size in MB. Any frame rate, audio kept or removed, signed download links, saved MB per video. No YouTube. Billed per output minute, free on failure.",
    "version": "0.1",
    "x-build-id": "8abqVDfznimRWeryx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data-done-right~video-compressor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data-done-right-video-compressor",
        "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-compressor/runs": {
      "post": {
        "operationId": "runs-sync-data-done-right-video-compressor",
        "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-compressor/run-sync": {
      "post": {
        "operationId": "run-sync-data-done-right-video-compressor",
        "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": [
          "videoUrls"
        ],
        "properties": {
          "videoUrls": {
            "title": "Video URLs",
            "type": "array",
            "description": "Direct links to video files (mp4, mov, webm, mkv, avi). Example: https://example.com/clip.mp4. YouTube, Vimeo, TikTok and other streaming-site page links are rejected, with no charge.",
            "items": {
              "type": "string"
            }
          },
          "preset": {
            "title": "Size preset",
            "enum": [
              "480p",
              "720p",
              "1080p",
              "original"
            ],
            "type": "string",
            "description": "Longest allowed length of the SHORT side of the picture, so it works for landscape and vertical video alike: 720p turns 1920x1080 into 1280x720 and 1080x1920 into 720x1280. Videos already smaller are never enlarged. 'Original' keeps the size, but anything above Full HD is reduced to 1080. The price tier follows the size of the result.",
            "default": "720p"
          },
          "crf": {
            "title": "Quality (CRF)",
            "minimum": 18,
            "maximum": 35,
            "type": "integer",
            "description": "Lower is better quality and bigger files: 20 is near the source, 26 is a good web default, 30 is small. Ignored when 'Target size' is set.",
            "default": 26
          },
          "targetSizeMb": {
            "title": "Target size (MB)",
            "minimum": 0,
            "maximum": 2000,
            "type": "number",
            "description": "Optional. Aim for a file of about this many MB, for example 25 for an email or chat limit. Uses a two-pass bitrate encode (about twice the encoding time). The result can overshoot on hard-to-encode footage; each row says whether the target was met. 0 or empty = use CRF."
          },
          "maxFps": {
            "title": "Max frame rate (fps)",
            "minimum": 0,
            "maximum": 120,
            "type": "integer",
            "description": "Lower higher frame rates to this value, for example 30 turns 60 fps into 30 fps for smaller files. 0 = keep the source frame rate.",
            "default": 0
          },
          "removeAudio": {
            "title": "Remove audio",
            "type": "boolean",
            "description": "Drop the sound track. Saves a little space. Default: audio is kept (first audio track, AAC stereo).",
            "default": false
          },
          "audioBitrateKbps": {
            "title": "Audio bitrate (kbps)",
            "minimum": 32,
            "maximum": 320,
            "type": "integer",
            "description": "AAC bitrate for the kept audio track. 96 is fine for speech, 128 to 192 for music.",
            "default": 96
          },
          "encoderPreset": {
            "title": "Encoder speed",
            "enum": [
              "veryfast",
              "faster",
              "fast",
              "medium"
            ],
            "type": "string",
            "description": "Slower settings give a somewhat smaller file at the same quality and take longer. The price per minute does not change.",
            "default": "veryfast"
          },
          "deliverIfLarger": {
            "title": "Deliver even if not smaller",
            "type": "boolean",
            "description": "By default a result that is not smaller than the source is not delivered and not charged (the row says why). Turn on to receive and pay for it anyway, for example to get a uniform H.264 mp4.",
            "default": false
          },
          "videos": {
            "title": "Videos with their own settings",
            "type": "array",
            "description": "Per-video settings: [{\"url\": \"https://example.com/a.mp4\", \"preset\": \"480p\", \"targetSizeMb\": 10, \"name\": \"promo\"}]. Added to 'Video URLs'; an entry overrides the run-level preset and target size for its URL."
          },
          "maxDurationMinutes": {
            "title": "Max video duration (minutes)",
            "minimum": 0.1,
            "type": "number",
            "description": "Longer source videos are rejected without charge. Example: 30. Sources above Full HD (up to 4K) are limited to 10 minutes.",
            "default": 30
          },
          "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
          },
          "maxVideosPerRun": {
            "title": "Max videos per run",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on videos processed in one run (and so on what you can be charged). Videos past the cap are listed as skipped.",
            "default": 50
          },
          "videoTimeoutSecs": {
            "title": "Timeout (seconds)",
            "minimum": 10,
            "maximum": 7200,
            "type": "integer",
            "description": "Applies separately to each download and to the encoding of each video.",
            "default": 1800
          },
          "outputStoreName": {
            "title": "Save files 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: compressed-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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}