{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Converter & Compressor – MP4, MP3, WebM, GIF (FFmpeg)",
    "description": "Video converter, video compressor and audio converter for media file URLs: MP4/WebM/MOV, compress to a target size or 1080p/720p/480p, MP4 to MP3, WAV/FLAC/M4A/OGG/Opus, video to GIF, trim, mute, normalize loudness. Public download links. From $0.03 per video minute.",
    "version": "0.1",
    "x-build-id": "jmoGQ7YWoBZZnpww4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gazidev~media-converter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gazidev-media-converter",
        "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~media-converter/runs": {
      "post": {
        "operationId": "runs-sync-gazidev-media-converter",
        "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~media-converter/run-sync": {
      "post": {
        "operationId": "run-sync-gazidev-media-converter",
        "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": {
          "mediaUrls": {
            "title": "Media file URLs (direct links)",
            "type": "array",
            "description": "Direct links to video or audio FILES: MP4, MOV, WebM, MKV, AVI, MP3, WAV, M4A, FLAC, OGG, or HLS `.m3u8` playlists (your CDN, S3/R2/GCS bucket, Dropbox direct link…). Pages of YouTube, TikTok, Instagram, Vimeo, SoundCloud etc. are refused: this is a converter, 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 media file URLs."
          },
          "datasetField": {
            "title": "Dataset field with the URL",
            "type": "string",
            "description": "Field name in that dataset.",
            "default": "url"
          },
          "operation": {
            "title": "Operation",
            "enum": [
              "compress-video",
              "convert-video",
              "extract-audio",
              "convert-audio",
              "video-to-gif"
            ],
            "type": "string",
            "description": "What to do with every file. Trim (`startTime`/`endTime`), `maxResolution`, `fps`, `mute` and `normalizeAudio` work with every operation where they make sense.",
            "default": "compress-video"
          },
          "videoFormat": {
            "title": "Video output format",
            "enum": [
              "mp4",
              "webm",
              "mov"
            ],
            "type": "string",
            "description": "For `compress-video` and `convert-video`.",
            "default": "mp4"
          },
          "compressionLevel": {
            "title": "Compression level",
            "enum": [
              "small",
              "balanced",
              "high"
            ],
            "type": "string",
            "description": "Quality preset for video encoding. `convert-video` uses `high` unless you choose otherwise. Ignored when `targetSizeMb` is set.",
            "default": "balanced"
          },
          "targetSizeMb": {
            "title": "Target file size (MB)",
            "minimum": 0.5,
            "type": "number",
            "description": "Optional, `compress-video` only: hit this size (two-pass bitrate encoding), e.g. 8 for Discord or 16 for WhatsApp. The result is usually within ±5%."
          },
          "maxResolution": {
            "title": "Max resolution",
            "enum": [
              "original",
              "2160",
              "1440",
              "1080",
              "720",
              "480",
              "360"
            ],
            "type": "string",
            "description": "Downscale so the short side is at most this (works for landscape and portrait). Never upscales. Default 720p for `compress-video`; `convert-video` keeps the original unless you choose. Billing depends on the output resolution.",
            "default": "720"
          },
          "fps": {
            "title": "Frame rate (fps)",
            "minimum": 0,
            "maximum": 120,
            "type": "integer",
            "description": "0 = keep the source frame rate. E.g. 30 or 24 to reduce size.",
            "default": 0
          },
          "mute": {
            "title": "Remove audio (mute)",
            "type": "boolean",
            "description": "Drop the audio track from video output.",
            "default": false
          },
          "normalizeAudio": {
            "title": "Normalize loudness (EBU R128, -16 LUFS)",
            "type": "boolean",
            "description": "Even out loudness with ffmpeg `loudnorm` (podcast/social standard). Adds 3 audio-minutes ($0.015) per output minute.",
            "default": false
          },
          "audioFormat": {
            "title": "Audio output format",
            "enum": [
              "mp3",
              "m4a",
              "wav",
              "flac",
              "ogg",
              "opus"
            ],
            "type": "string",
            "description": "For `extract-audio` and `convert-audio`.",
            "default": "mp3"
          },
          "audioBitrateKbps": {
            "title": "Audio bitrate (kbps)",
            "minimum": 32,
            "maximum": 320,
            "type": "integer",
            "description": "For MP3, M4A, OGG and Opus (WAV/FLAC are lossless). 128 = podcasts/voice, 192 = good music, 320 = maximum MP3.",
            "default": 192
          },
          "gifFps": {
            "title": "GIF frames per second",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "10–15 looks smooth; lower = smaller file.",
            "default": 10
          },
          "gifWidth": {
            "title": "GIF width (px)",
            "minimum": 64,
            "maximum": 1280,
            "type": "integer",
            "description": "Height follows the aspect ratio. Uses a per-clip color palette for good quality.",
            "default": 480
          },
          "gifMaxSeconds": {
            "title": "GIF max length (seconds)",
            "minimum": 1,
            "maximum": 60,
            "type": "number",
            "description": "The GIF starts at `startTime` and lasts until `endTime` or this many seconds, whichever is shorter.",
            "default": 10
          },
          "startTime": {
            "title": "Trim: start at",
            "type": "string",
            "description": "Optional, any operation: seconds (`12.5`) or `HH:MM:SS` / `MM:SS`."
          },
          "endTime": {
            "title": "Trim: end at",
            "type": "string",
            "description": "Optional, any operation, e.g. `00:01:30`."
          },
          "maxFileSizeMb": {
            "title": "Max input file size (MB)",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Larger files are skipped with an error row (not charged). Above ~1,000 MB give the run more memory.",
            "default": 500
          },
          "maxDurationMinutes": {
            "title": "Max output length (minutes)",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Cost cap: longer media are skipped (not charged) - trim them or raise the limit.",
            "default": 60
          },
          "maxConcurrency": {
            "title": "Files 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}