{
  "openapi": "3.0.1",
  "info": {
    "title": "Media Toolkit (FFmpeg, ExifTool)",
    "description": "Probe, thumbnail, trim, extract audio, convert images, and read or scrub EXIF metadata for media files by URL. Fixed typed operations only.",
    "version": "1.0",
    "x-build-id": "Q02bUopXL5CYXDLu2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jetlaunch~media-toolkit-ffmpeg-exiftool/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jetlaunch-media-toolkit-ffmpeg-exiftool",
        "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/jetlaunch~media-toolkit-ffmpeg-exiftool/runs": {
      "post": {
        "operationId": "runs-sync-jetlaunch-media-toolkit-ffmpeg-exiftool",
        "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/jetlaunch~media-toolkit-ffmpeg-exiftool/run-sync": {
      "post": {
        "operationId": "run-sync-jetlaunch-media-toolkit-ffmpeg-exiftool",
        "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": [
          "operations",
          "mediaUrls"
        ],
        "properties": {
          "operations": {
            "title": "Operations",
            "minItems": 1,
            "maxItems": 7,
            "uniqueItems": true,
            "type": "array",
            "description": "Operations to run on every URL, in this order: probe (media facts), thumbnail (one frame), trim (clip between two times), extract-audio (MP3 or WAV), image-convert (resize, convert, re-compress), exif-dump (read metadata), exif-scrub (remove metadata). Each successful operation is one billable event.",
            "items": {
              "type": "string",
              "enum": [
                "probe",
                "thumbnail",
                "trim",
                "extract-audio",
                "image-convert",
                "exif-dump",
                "exif-scrub"
              ],
              "enumTitles": [
                "Probe (duration, codecs, streams)",
                "Thumbnail (frame as JPEG or PNG)",
                "Trim (clip between two times)",
                "Extract audio (MP3 or WAV)",
                "Image convert (resize, format, quality)",
                "EXIF dump (read metadata)",
                "EXIF scrub (remove metadata)"
              ]
            },
            "default": [
              "probe"
            ]
          },
          "mediaUrls": {
            "title": "Media URLs",
            "maxItems": 100,
            "type": "array",
            "description": "Public http or https URLs of the files, one per line. Up to 100 per run, 500 MB per file. URLs that resolve to private, loopback, link-local or cloud-metadata addresses are refused, including after redirects. Only ports 80, 443, 8080 and 8443 are used. You are responsible for having the rights to process these files.",
            "items": {
              "type": "string"
            }
          },
          "thumbnailTime": {
            "title": "Thumbnail time",
            "type": "string",
            "description": "Used by thumbnail. Where to take the frame: seconds (12.5), a clock time (00:01:30.5), or a percentage of the duration (25%).",
            "default": "10%"
          },
          "thumbnailFormat": {
            "title": "Thumbnail format",
            "enum": [
              "jpeg",
              "png"
            ],
            "type": "string",
            "description": "Used by thumbnail. JPEG is smaller; PNG is lossless.",
            "default": "jpeg"
          },
          "thumbnailWidth": {
            "title": "Thumbnail width (pixels)",
            "minimum": 16,
            "maximum": 4096,
            "type": "integer",
            "description": "Used by thumbnail. Optional. Scales the frame down to this width and keeps the aspect ratio. Never enlarges."
          },
          "startTime": {
            "title": "Start time",
            "type": "string",
            "description": "Used by trim and extract-audio. Start of the range in seconds (12.5) or as a clock time (00:01:30). Default 0. Trim copies the streams without re-encoding, so the cut snaps to the preceding keyframe."
          },
          "endTime": {
            "title": "End time",
            "type": "string",
            "description": "Used by trim and extract-audio. End of the range in seconds or as a clock time. Required for trim unless you set a clip duration. Use either End time or Clip duration."
          },
          "clipDuration": {
            "title": "Clip duration (seconds)",
            "minimum": 0.1,
            "maximum": 900,
            "type": "number",
            "description": "Used by trim and extract-audio. Length of the range in seconds, counted from the start time. Maximum 900."
          },
          "audioFormat": {
            "title": "Audio format",
            "enum": [
              "mp3",
              "wav"
            ],
            "type": "string",
            "description": "Used by extract-audio. MP3 is compressed (LAME encoder); WAV is uncompressed 16-bit PCM and large.",
            "default": "mp3"
          },
          "audioBitrateKbps": {
            "title": "MP3 bitrate (kbps)",
            "minimum": 64,
            "maximum": 320,
            "type": "integer",
            "description": "Used by extract-audio with MP3. One of 64, 96, 128, 160, 192, 256 or 320.",
            "default": 192
          },
          "audioSampleRate": {
            "title": "Audio sample rate (Hz)",
            "minimum": 8000,
            "maximum": 48000,
            "type": "integer",
            "description": "Used by extract-audio. Optional. One of 8000, 16000, 22050, 32000, 44100 or 48000. Leave empty to keep the source rate. 16000 suits speech-to-text."
          },
          "audioChannels": {
            "title": "Audio channels",
            "minimum": 1,
            "maximum": 2,
            "type": "integer",
            "description": "Used by extract-audio. Optional. 1 for mono or 2 for stereo. Leave empty to keep the source layout."
          },
          "audioTrack": {
            "title": "Audio track",
            "minimum": 0,
            "maximum": 15,
            "type": "integer",
            "description": "Used by extract-audio. Zero-based index of the audio track to extract when a file has several.",
            "default": 0
          },
          "imageFormat": {
            "title": "Output image format",
            "enum": [
              "jpeg",
              "png",
              "webp",
              "avif",
              "tiff",
              "gif"
            ],
            "type": "string",
            "description": "Used by image-convert. Inputs accepted: JPEG, PNG, GIF, WebP, TIFF, AVIF, JPEG 2000. SVG and HEIC are not accepted. Animated images keep only the first frame.",
            "default": "webp"
          },
          "width": {
            "title": "Width (pixels)",
            "minimum": 1,
            "maximum": 8192,
            "type": "integer",
            "description": "Used by image-convert. Optional target width, 1 to 8192. Set width, height or both."
          },
          "height": {
            "title": "Height (pixels)",
            "minimum": 1,
            "maximum": 8192,
            "type": "integer",
            "description": "Used by image-convert. Optional target height, 1 to 8192."
          },
          "fit": {
            "title": "Resize mode",
            "enum": [
              "inside",
              "cover",
              "contain",
              "fill",
              "outside"
            ],
            "type": "string",
            "description": "Used by image-convert with width and height. inside keeps the aspect ratio within the box; cover fills the box and crops; contain pads to the box; fill stretches; outside keeps the aspect ratio and covers the box.",
            "default": "inside"
          },
          "withoutEnlargement": {
            "title": "Never enlarge",
            "type": "boolean",
            "description": "Used by image-convert. When on, images smaller than the target are not scaled up.",
            "default": true
          },
          "background": {
            "title": "Background colour",
            "type": "string",
            "description": "Used by image-convert. Hex colour such as #ffffff. Fills padding for the contain mode and replaces transparency when saving as JPEG.",
            "default": "#ffffff"
          },
          "quality": {
            "title": "Quality (1 to 100)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Used by thumbnail (JPEG) and image-convert (JPEG, WebP, AVIF, TIFF). Higher is better and larger. PNG and GIF ignore it.",
            "default": 85
          },
          "autoOrient": {
            "title": "Apply EXIF rotation",
            "type": "boolean",
            "description": "Used by image-convert. Rotates the pixels to match the EXIF orientation so the result looks right without the tag.",
            "default": true
          },
          "keepMetadata": {
            "title": "Keep metadata",
            "type": "boolean",
            "description": "Used by image-convert. By default metadata (EXIF, GPS, XMP) is dropped from the converted image. Turn on to keep it.",
            "default": false
          },
          "exifNumeric": {
            "title": "Numeric EXIF values",
            "type": "boolean",
            "description": "Used by exif-dump. Return raw numeric values (for example GPS in decimal degrees and Orientation as a number) instead of print-formatted text.",
            "default": false
          },
          "scrubMode": {
            "title": "Scrub mode",
            "enum": [
              "all",
              "location"
            ],
            "type": "string",
            "description": "Used by exif-scrub. all removes all metadata; location removes GPS data only and keeps the rest.",
            "default": "all"
          },
          "keepOrientation": {
            "title": "Keep orientation tag",
            "type": "boolean",
            "description": "Used by exif-scrub in all mode. Keeps the Orientation tag so rotated photos still display upright.",
            "default": true
          },
          "keepColorProfile": {
            "title": "Keep colour profile",
            "type": "boolean",
            "description": "Used by exif-scrub in all mode. Keeps the embedded ICC colour profile so colours do not shift.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}