{
  "openapi": "3.0.1",
  "info": {
    "title": "Auto Reframe Video to Vertical (9:16) — Face Tracking Crop API",
    "description": "Auto reframe video to vertical: turn 16:9 video into 9:16, 4:5 or 1:1 with a crop that follows faces and the person talking, no watermark. Bulk links to your own MP4, MOV or WebM; returns the MP4, thumbnail and crop keyframes. Trim or blur the background. Export to JSON, CSV or Excel, or via API.",
    "version": "1.0",
    "x-build-id": "MgSvAWiaGAfqDXitK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/steadyscrape~auto-reframe-vertical-video/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-steadyscrape-auto-reframe-vertical-video",
        "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/steadyscrape~auto-reframe-vertical-video/runs": {
      "post": {
        "operationId": "runs-sync-steadyscrape-auto-reframe-vertical-video",
        "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/steadyscrape~auto-reframe-vertical-video/run-sync": {
      "post": {
        "operationId": "run-sync-steadyscrape-auto-reframe-vertical-video",
        "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": {
          "videos": {
            "title": "Video file links",
            "maxItems": 200,
            "type": "array",
            "description": "Direct links to your own video files: mp4, mov, webm, mkv, avi, m4v and anything else FFmpeg reads, up to 2 GB each. Signed links of Apify key-value records work too. Links of YouTube, TikTok, Instagram, Vimeo and other platforms, or that redirect to them, are refused before anything is downloaded, free.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Or take the links from a dataset",
            "type": "string",
            "description": "Pick the dataset of another run (a render, a downloader, a clip cutter) and every video link in it is reframed. Only the dataset you pick here can be read."
          },
          "datasetFields": {
            "title": "Dataset fields with the links",
            "type": "array",
            "description": "The fields of each dataset item that hold the links, as dotted paths (media.url takes the url of every element of media). Leave empty to take every link in a field named like video, media, clip, file or recording, or ending in .mp4, .mov and the like.",
            "items": {
              "type": "string"
            }
          },
          "aspectRatio": {
            "title": "Shape of the output",
            "enum": [
              "9:16",
              "4:5",
              "1:1"
            ],
            "type": "string",
            "description": "9:16 for TikTok, Reels and YouTube Shorts; 4:5 for the Instagram and Facebook feed; 1:1 square.",
            "default": "9:16"
          },
          "resolution": {
            "title": "Output size",
            "enum": [
              "auto",
              "720",
              "1080"
            ],
            "type": "string",
            "description": "Auto writes 1080 wide when the source is 1080p or larger and 720 wide otherwise. 720 wide is billed as reframed-minute and 1080 wide as hd-reframed-minute; a 4K source costs more whatever the size written (see the price table).",
            "default": "auto"
          },
          "framing": {
            "title": "Framing",
            "enum": [
              "follow_faces",
              "blurred_background"
            ],
            "type": "string",
            "description": "Follow faces: a sliding crop keeps the person in the frame. Blurred background: the whole picture in the middle over a blurred copy of itself, for slides, screens and video without people; no faces are looked for and the price is the same.",
            "default": "follow_faces"
          },
          "followSpeaker": {
            "title": "Follow whoever is talking",
            "type": "boolean",
            "description": "With several people too far apart to fit together, the crop goes to the one whose mouth is moving, read from the picture and held for a few seconds so it does not jump around. Turn it off to stay on the largest face.",
            "default": true
          },
          "startTime": {
            "title": "Start at",
            "pattern": "^\\s*$|^\\s*\\d+([.,]\\d+)?\\s*$|^\\s*\\d+:[0-5]?\\d([.,]\\d+)?\\s*$|^\\s*\\d+:[0-5]?\\d:[0-5]?\\d([.,]\\d+)?\\s*$",
            "type": "string",
            "description": "Only work from here on: seconds (95.5) or a timecode (1:35.5, 00:01:35.500). Leave empty for the beginning. You pay for the output minutes only."
          },
          "endTime": {
            "title": "End at",
            "pattern": "^\\s*$|^\\s*\\d+([.,]\\d+)?\\s*$|^\\s*\\d+:[0-5]?\\d([.,]\\d+)?\\s*$|^\\s*\\d+:[0-5]?\\d:[0-5]?\\d([.,]\\d+)?\\s*$",
            "type": "string",
            "description": "Only work up to here, written like Start at. Leave empty for the end of the video."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}