{
  "openapi": "3.0.1",
  "info": {
    "title": "Media Toolkit — Video Converter, Compressor, MP4 to MP3 & GIF",
    "description": "Convert, compress, trim and resize video and audio files in bulk with FFmpeg: MP4, WebM, MP3, M4A, WAV, GIF and thumbnails from direct links, Google Drive or Dropbox. No upload limits of online converters.",
    "version": "0.0",
    "x-build-id": "Y1a0kRXdKbrdfFZKZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/saliga~media-toolkit/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-saliga-media-toolkit",
        "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/saliga~media-toolkit/runs": {
      "post": {
        "operationId": "runs-sync-saliga-media-toolkit",
        "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/saliga~media-toolkit/run-sync": {
      "post": {
        "operationId": "run-sync-saliga-media-toolkit",
        "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": [
          "fileUrls"
        ],
        "properties": {
          "fileUrls": {
            "title": "Files",
            "type": "array",
            "description": "Direct links to video or audio files, or Google Drive / Dropbox share links (shared as \"Anyone with the link\"). Pages of YouTube, TikTok and other platforms are not supported.",
            "items": {
              "type": "string"
            }
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "mp4",
              "webm",
              "mov",
              "mkv",
              "mp3",
              "m4a",
              "wav",
              "ogg",
              "flac",
              "opus",
              "gif",
              "jpg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "What to make. Video: MP4 (H.264), WebM (VP9), MOV, MKV. Audio only: MP3, M4A (AAC), WAV, OGG, FLAC, Opus. Animated GIF. Still images: JPG, PNG, WebP (thumbnails).",
            "default": "mp4"
          },
          "start": {
            "title": "Start",
            "type": "string",
            "description": "Optional: cut from this time (seconds, 1:30 or 00:01:30.5)."
          },
          "end": {
            "title": "End",
            "type": "string",
            "description": "Optional: cut until this time."
          },
          "quality": {
            "title": "Quality",
            "enum": [
              "high",
              "medium",
              "small"
            ],
            "type": "string",
            "description": "Compression level for video and audio.",
            "default": "medium"
          },
          "targetSizeMb": {
            "title": "Target size (MB)",
            "minimum": 0.1,
            "type": "number",
            "description": "Optional: compress each output to about this size (sets the bitrate from the duration). Overrides quality."
          },
          "width": {
            "title": "Width (pixels)",
            "minimum": 16,
            "maximum": 7680,
            "type": "integer",
            "description": "Optional: resize to this width, keeping the aspect ratio (never upscales). For GIFs the default is 480."
          },
          "fps": {
            "title": "Frame rate",
            "minimum": 1,
            "maximum": 120,
            "type": "number",
            "description": "Optional: frames per second for video and GIF (GIF default 12)."
          },
          "removeAudio": {
            "title": "Remove audio",
            "type": "boolean",
            "description": "Video outputs without the sound track.",
            "default": false
          },
          "audioBitrateKbps": {
            "title": "Audio bitrate (kbit/s)",
            "minimum": 16,
            "maximum": 512,
            "type": "integer",
            "description": "Optional: audio bitrate for MP3, M4A, OGG, Opus and video sound."
          },
          "thumbnailCount": {
            "title": "Images per file",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "For JPG/PNG/WebP: how many frames, evenly spaced over the file (or the trimmed part).",
            "default": 1
          },
          "gifSeconds": {
            "title": "GIF length (seconds)",
            "minimum": 1,
            "maximum": 60,
            "type": "number",
            "description": "Longest GIF to make, from the start time.",
            "default": 10
          },
          "maxFileSizeMb": {
            "title": "Max input size (MB)",
            "minimum": 1,
            "maximum": 4000,
            "type": "integer",
            "description": "Files larger than this are skipped (free).",
            "default": 1000
          },
          "maxDurationMinutes": {
            "title": "Max input length (minutes)",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Longer files are skipped (free).",
            "default": 180
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}