{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk FFmpeg Video Converter - MP4, MP3, GIF & Clips",
    "description": "Convert up to 100 video or audio URLs per run with FFmpeg: H.264 MP4 for the web or social uploads, MP3, Opus, M4A or WAV audio, GIFs, trimmed clips, thumbnails and 16 kHz speech audio, plus probe and remux. One status row per file; a failed file never stops the batch.",
    "version": "0.1",
    "x-build-id": "cjg8PXR9kSS34RTyW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automa-flow~bulk-ffmpeg-media-processor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automa-flow-bulk-ffmpeg-media-processor",
        "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/automa-flow~bulk-ffmpeg-media-processor/runs": {
      "post": {
        "operationId": "runs-sync-automa-flow-bulk-ffmpeg-media-processor",
        "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/automa-flow~bulk-ffmpeg-media-processor/run-sync": {
      "post": {
        "operationId": "run-sync-automa-flow-bulk-ffmpeg-media-processor",
        "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": [
          "operation"
        ],
        "properties": {
          "operation": {
            "title": "Operation",
            "enum": [
              "probe",
              "audio16k",
              "thumbnail",
              "remux",
              "proxy",
              "audio",
              "gif",
              "web_mp4",
              "social_mp4"
            ],
            "type": "string",
            "description": "probe reads metadata. audio16k writes 16 kHz mono WAV for speech tools. thumbnail saves one JPEG or WebP frame. remux copies streams into MP4 or MKV. proxy builds a low-resolution H.264 or MPEG-4 MP4. audio converts to MP3, Opus, M4A or WAV. gif makes an animated GIF of up to 30 seconds. web_mp4 re-encodes to an H.264 MP4 for web pages (480p or 720p). social_mp4 makes an upload-safe H.264 MP4 for short-video platforms (up to 1080 wide, 30 fps). web_mp4 and social_mp4 accept sources up to 1920x1080.",
            "default": "probe"
          },
          "items": {
            "title": "Media files",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "1-100 direct media files. Use this or a dataset, not both. id is optional. source is an http(s) file URL or kvs://record in this run's Key-Value Store.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "source"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "title": "Item id",
                  "description": "Optional id, 1-80 letters, digits, dots, underscores or hyphens. Duplicate ids are reported and not processed twice.",
                  "minLength": 1,
                  "maxLength": 80,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,79}$"
                },
                "source": {
                  "type": "string",
                  "title": "Media URL",
                  "description": "http:// or https:// URL of a media file, or kvs://record-name for a binary record in this run's Key-Value Store. Page URLs and non-HTTP protocols are rejected.",
                  "minLength": 1,
                  "maxLength": 2048,
                  "pattern": "^(https?://\\S+|kvs://[A-Za-z0-9][A-Za-z0-9._-]{0,200})$"
                },
                "options": {
                  "type": "object",
                  "title": "Options",
                  "description": "Operation options for this file. They replace the top-level options and take the same names, including trim. See Options for every file.",
                  "editor": "json"
                }
              }
            }
          },
          "options": {
            "title": "Options for every file",
            "type": "object",
            "description": "Operation options for every file, in items or dataset mode. A file with its own options uses those instead. audio: format mp3 (default), opus, m4a or wav; bitrateKbps 32-320 (default 128, not used for wav); sampleRate 8000-48000 (Opus: 8000, 12000, 16000, 24000 or 48000) and channels 1 or 2, both left out to keep the source. gif: fps 1-15 (default 10), maxWidth 120-640 (default 480). web_mp4: maxHeight 480 or 720 (default). trim for audio, gif, web_mp4, social_mp4, audio16k and proxy: {\"startSeconds\": 5, \"endSeconds\": 20} or {\"startSeconds\": 5, \"durationSeconds\": 15}; billing counts the trimmed minutes. audio16k: format wav. thumbnail: atSeconds or atPercent, and imageFormat jpeg or webp. remux: container mp4 or mkv. proxy: maxWidth from 160 to 640. Invalid options stop the run before any file is downloaded."
          },
          "datasetId": {
            "title": "Dataset ID",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{2,127}$",
            "type": "string",
            "description": "Apify dataset to read instead of items. The run requests read access to this field. In an integration, set it to {{resource.defaultDatasetId}}. A nested resource id is not read."
          },
          "sourceField": {
            "title": "Dataset URL field",
            "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
            "type": "string",
            "description": "Top-level field on each dataset row that holds the media URL. Required in dataset mode."
          },
          "idField": {
            "title": "Dataset id field",
            "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
            "type": "string",
            "description": "Optional top-level field used as the item id. Rows without it get item-0000 style ids."
          },
          "datasetOffset": {
            "title": "Dataset offset",
            "minimum": 0,
            "type": "integer",
            "description": "Dataset mode only. Skip this many rows, then read up to maxItems. When rows remain, RUN_SUMMARY gives nextDatasetOffset for the next run. Default 0.",
            "default": 0
          },
          "resource": {
            "title": "Integration resource",
            "type": "object",
            "description": "Optional webhook object. This Actor does not read defaultDatasetId. Put the id in datasetId.",
            "properties": {
              "defaultDatasetId": {
                "type": "string",
                "title": "Default dataset ID",
                "description": "Present on some webhook bodies. This Actor does not read it. Put the id in datasetId.",
                "editor": "textfield",
                "resourceType": "dataset",
                "resourcePermissions": [
                  "READ"
                ]
              }
            }
          },
          "payload": {
            "title": "Integration payload",
            "type": "object",
            "description": "Optional webhook wrapper. A nested resource.defaultDatasetId is not read. Put the id in datasetId.",
            "properties": {
              "resource": {
                "type": "object",
                "title": "Payload resource",
                "description": "Webhook resource object.",
                "editor": "json",
                "properties": {
                  "defaultDatasetId": {
                    "type": "string",
                    "title": "Payload dataset ID",
                    "description": "Present on some webhook bodies. This Actor does not read it. Put the id in datasetId.",
                    "editor": "textfield",
                    "resourceType": "dataset",
                    "resourcePermissions": [
                      "READ"
                    ]
                  }
                }
              }
            }
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Upper bound on files processed at once (1-4). The operation may use fewer workers. Default 2.",
            "default": 2
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum files to accept from items or a dataset. 1-100. Default 100.",
            "default": 100
          },
          "maxInputBytesPerItem": {
            "title": "Max bytes per file",
            "minimum": 1048576,
            "maximum": 1073741824,
            "type": "integer",
            "description": "Reject a file whose Content-Length or streamed body exceeds this size. Default 256 MiB. Maximum 1 GiB. A remux or proxy output above about 225 MB at 1024 MB memory (565 MB at 2048 MB) is not stored.",
            "default": 268435456
          },
          "maxTotalInputBytes": {
            "title": "Max bytes per run",
            "minimum": 1048576,
            "maximum": 10737418240,
            "type": "integer",
            "description": "Stop accepting further files once the downloaded bytes in this run would pass this total. Default 2 GiB. Must be at least the per-file cap.",
            "default": 2147483648
          },
          "maxDurationSeconds": {
            "title": "Max media duration (seconds)",
            "minimum": 1,
            "maximum": 7200,
            "type": "integer",
            "description": "Do not transform media whose probed duration is longer than this. A probe still reports any duration. Default 3600. Maximum 7200.",
            "default": 3600
          },
          "downloadTimeoutSeconds": {
            "title": "Download timeout (seconds)",
            "minimum": 10,
            "maximum": 600,
            "type": "integer",
            "description": "Total time allowed to download one file, including redirects and the one retry. Default 120.",
            "default": 120
          },
          "processingTimeoutSeconds": {
            "title": "FFmpeg timeout (seconds)",
            "minimum": 30,
            "maximum": 3600,
            "type": "integer",
            "description": "Maximum time ffprobe or ffmpeg may run for one file. The process is killed when this expires. Default 600.",
            "default": 600
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}