{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Resizer & Cropper – 9:16, 1:1, 16:9 for Reels, Shorts",
    "description": "Video resizer & cropper for social media: reframe video URLs to 9:16 (Reels, Shorts, TikTok), 1:1, 4:5 or 16:9 with blurred background, crop or color bars. Many formats per video, 1080p MP4, trim to 60/90 s, public links. $0.06 per output minute (1080p).",
    "version": "0.1",
    "x-build-id": "bfCc2TJ2wTr20mWVy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gazidev~video-resizer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gazidev-video-resizer",
        "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-resizer/runs": {
      "post": {
        "operationId": "runs-sync-gazidev-video-resizer",
        "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-resizer/run-sync": {
      "post": {
        "operationId": "run-sync-gazidev-video-resizer",
        "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 file URLs (direct links)",
            "type": "array",
            "description": "Direct links to video FILES: MP4, MOV, WebM, MKV, AVI or HLS `.m3u8` (your CDN, S3/R2/GCS bucket, Dropbox direct link…). Pages of YouTube, TikTok, Instagram, Vimeo etc. are refused: this is a resizer, not a downloader.",
            "default": [
              "https://download.samplelib.com/mp4/sample-10s.mp4"
            ],
            "items": {
              "type": "string"
            }
          },
          "bulkText": {
            "title": "Bulk list (paste text or CSV)",
            "type": "string",
            "description": "One URL per line or a CSV with a `url` column."
          },
          "datasetId": {
            "title": "Read URLs from an Apify dataset (ID or name)",
            "type": "string",
            "description": "Chain after another Actor that outputs video file URLs."
          },
          "datasetField": {
            "title": "Dataset field with the URL",
            "type": "string",
            "description": "Field name in that dataset.",
            "default": "url"
          },
          "aspectRatios": {
            "title": "Target aspect ratios",
            "type": "array",
            "description": "One output per ratio per video. Presets: `9:16` (Reels, Shorts, TikTok, Stories), `1:1` (square feed), `4:5` (Instagram/Facebook portrait feed), `16:9` (YouTube, landscape), `4:3`, `3:4`, `2:3`, `21:9` - or any custom `W:H`. Words like `vertical`, `square`, `portrait`, `landscape` work too.",
            "default": [
              "9:16"
            ],
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Resize mode",
            "enum": [
              "pad-blur",
              "crop",
              "pad-color"
            ],
            "type": "string",
            "description": "`pad-blur` keeps the whole picture and fills the empty area with a blurred, zoomed copy (the typical Reels/Shorts look). `crop` fills the frame and cuts the overflow. `pad-color` adds bars in `padColor`.",
            "default": "pad-blur"
          },
          "cropFocus": {
            "title": "Crop position",
            "enum": [
              "center",
              "top",
              "bottom",
              "left",
              "right"
            ],
            "type": "string",
            "description": "Only for `crop`: which part of the picture to keep.",
            "default": "center"
          },
          "padColor": {
            "title": "Bar color",
            "type": "string",
            "description": "Only for `pad-color`: a color name (`black`, `white`, `gray`…) or hex like `#1a1a1a`.",
            "default": "black"
          },
          "blurStrength": {
            "title": "Background blur strength",
            "minimum": 4,
            "maximum": 160,
            "type": "integer",
            "description": "Only for `pad-blur`: blur radius in pixels of the output (40 = soft, 100 = very blurry).",
            "default": 40
          },
          "resolution": {
            "title": "Output resolution (short side)",
            "enum": [
              "2160",
              "1440",
              "1080",
              "720",
              "480",
              "360"
            ],
            "type": "string",
            "description": "Size of the SHORT side of the output: 1080 gives 1080×1920 (9:16), 1080×1080 (1:1), 1080×1350 (4:5), 1920×1080 (16:9). Small sources are not upscaled unless `allowUpscale` is on. Billing depends on the output resolution.",
            "default": "1080"
          },
          "allowUpscale": {
            "title": "Allow upscaling",
            "type": "boolean",
            "description": "Off: the output's short side is never larger than the source's short side (a 720p video becomes 720×1280 for 9:16 even if 1080 is chosen, and is billed as HD). On: always output exactly the chosen resolution.",
            "default": false
          },
          "startTime": {
            "title": "Start at",
            "type": "string",
            "description": "Optional: skip the beginning, seconds (`12.5`) or `MM:SS` / `HH:MM:SS`."
          },
          "maxOutputSeconds": {
            "title": "Max output length (seconds)",
            "minimum": 0,
            "maximum": 36000,
            "type": "integer",
            "description": "0 = whole video. E.g. 60 for YouTube Shorts, 90 for Reels, 180 for TikTok. You pay only for the output length.",
            "default": 0
          },
          "quality": {
            "title": "Quality",
            "enum": [
              "small",
              "balanced",
              "high"
            ],
            "type": "string",
            "description": "MP4 H.264 + AAC with fast start, plays on every platform.",
            "default": "balanced"
          },
          "fps": {
            "title": "Frame rate (fps)",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "0 = keep the source frame rate.",
            "default": 0
          },
          "mute": {
            "title": "Remove audio",
            "type": "boolean",
            "description": "Drop the audio track.",
            "default": false
          },
          "maxFileSizeMb": {
            "title": "Max input file size (MB)",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Larger files are skipped with an error row (not charged).",
            "default": 500
          },
          "maxDurationMinutes": {
            "title": "Max output length per video (minutes)",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Cost cap: longer videos are skipped (not charged) - set `maxOutputSeconds` or raise the limit.",
            "default": 30
          },
          "maxConcurrency": {
            "title": "Videos in parallel",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Encoding is CPU-bound; more than 2 only helps with more memory (CPU).",
            "default": 2
          },
          "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}