{
  "openapi": "3.0.1",
  "info": {
    "title": "Audio & Video Converter: MP4, WebM, MP3, GIF, Compress",
    "description": "Convert, compress, resize and trim your own audio and video files with ffmpeg: MP4, WebM, MOV, GIF, MP3, M4A, WAV, FLAC. Target file size, loudness normalisation, download links. From $6 per 1,000 video minutes.",
    "version": "0.1",
    "x-build-id": "KDhEaVabRr0a4oEk1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/plotpointtech~audio-video-converter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-plotpointtech-audio-video-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/plotpointtech~audio-video-converter/runs": {
      "post": {
        "operationId": "runs-sync-plotpointtech-audio-video-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/plotpointtech~audio-video-converter/run-sync": {
      "post": {
        "operationId": "run-sync-plotpointtech-audio-video-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",
            "type": "array",
            "description": "Direct links to audio or video files (MP4, MOV, WebM, MKV, AVI, MP3, WAV, M4A, FLAC, ...). Platform pages such as YouTube, TikTok, Instagram or Vimeo are refused. Leave empty and add nothing else to convert the first 10 seconds of a public-domain NASA sample clip.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "keyValueStoreId": {
            "title": "Apify key-value store with files",
            "type": "string",
            "description": "Optional. Convert every file in one of your key-value stores (for example uploads from another run)."
          },
          "keyPrefix": {
            "title": "Key prefix filter",
            "type": "string",
            "description": "Only convert keys in the store that start with this text."
          },
          "outputFormats": {
            "title": "Convert to",
            "type": "array",
            "description": "One or more output formats. Each input file is converted to every format you pick. Video: mp4, webm, mov, mkv, gif. Audio only: mp3, m4a (AAC), wav, ogg (Opus), flac.",
            "items": {
              "type": "string",
              "enum": [
                "mp4",
                "webm",
                "mov",
                "mkv",
                "gif",
                "mp3",
                "m4a",
                "wav",
                "ogg",
                "flac"
              ],
              "enumTitles": [
                "MP4 (H.264/H.265)",
                "WebM (VP9)",
                "MOV",
                "MKV",
                "Animated GIF",
                "MP3",
                "M4A (AAC)",
                "WAV",
                "OGG (Opus)",
                "FLAC"
              ]
            },
            "default": [
              "webm",
              "mp3"
            ]
          },
          "videoCodec": {
            "title": "Video codec",
            "enum": [
              "auto",
              "h264",
              "h265",
              "vp9",
              "copy"
            ],
            "type": "string",
            "description": "Auto picks H.264 for MP4/MOV/MKV and VP9 for WebM. Copy changes the container or trims without re-encoding.",
            "default": "auto"
          },
          "preset": {
            "title": "Speed preset",
            "enum": [
              "ultrafast",
              "superfast",
              "veryfast",
              "faster",
              "fast",
              "medium",
              "slow"
            ],
            "type": "string",
            "description": "Slower presets make slightly smaller files and take longer.",
            "default": "veryfast"
          },
          "crf": {
            "title": "Quality (CRF)",
            "minimum": 0,
            "maximum": 63,
            "type": "integer",
            "description": "Constant quality. Lower is better and bigger. Typical: 23 for H.264, 28 for H.265, 32 for VP9. Leave empty for sensible defaults."
          },
          "targetSizeMB": {
            "title": "Target file size (MB)",
            "minimum": 1,
            "type": "integer",
            "description": "Compress each video to about this size (two-pass bitrate). Overrides CRF."
          },
          "maxWidth": {
            "title": "Maximum width (px)",
            "minimum": 16,
            "maximum": 7680,
            "type": "integer",
            "description": "Shrink larger videos to this width (aspect ratio kept). Never enlarges."
          },
          "maxHeight": {
            "title": "Maximum height (px)",
            "minimum": 16,
            "maximum": 4320,
            "type": "integer",
            "description": "Shrink larger videos to this height (aspect ratio kept). Never enlarges."
          },
          "fps": {
            "title": "Frame rate",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Leave empty to keep the original."
          },
          "trimStart": {
            "title": "Trim start",
            "type": "string",
            "description": "Seconds or hh:mm:ss, for example 0:30."
          },
          "trimEnd": {
            "title": "Trim end",
            "type": "string",
            "description": "Seconds or hh:mm:ss, for example 1:45."
          },
          "mute": {
            "title": "Remove audio",
            "type": "boolean",
            "description": "Drop the audio track from video outputs.",
            "default": false
          },
          "normalizeLoudness": {
            "title": "Normalise loudness (EBU R128, -16 LUFS)",
            "type": "boolean",
            "description": "Even out volume to the streaming standard (EBU R128, -16 LUFS).",
            "default": false
          },
          "audioBitrateKbps": {
            "title": "Audio bitrate (kbps)",
            "minimum": 32,
            "maximum": 320,
            "type": "integer",
            "description": "For MP3, M4A, OGG and the audio track of videos.",
            "default": 128
          },
          "audioChannels": {
            "title": "Audio channels",
            "enum": [
              "original",
              "mono",
              "stereo"
            ],
            "type": "string",
            "description": "Keep, or mix down to mono or stereo.",
            "default": "original"
          },
          "audioSampleRate": {
            "title": "Audio sample rate",
            "enum": [
              "original",
              "16000",
              "22050",
              "44100",
              "48000"
            ],
            "type": "string",
            "description": "Keep, or resample (16000 is common for speech-to-text).",
            "default": "original"
          },
          "gifFps": {
            "title": "GIF frames per second",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Frames per second for animated GIF output.",
            "default": 12
          },
          "gifWidth": {
            "title": "GIF width (px)",
            "minimum": 64,
            "maximum": 1280,
            "type": "integer",
            "description": "Width of animated GIF output; height follows the aspect ratio.",
            "default": 480
          },
          "maxFileSizeMB": {
            "title": "Maximum input file size (MB)",
            "minimum": 1,
            "maximum": 4096,
            "type": "integer",
            "description": "Files larger than this are skipped (not charged).",
            "default": 1024
          },
          "maxDurationMinutes": {
            "title": "Maximum input duration (minutes)",
            "minimum": 1,
            "maximum": 240,
            "type": "integer",
            "description": "Longer files are skipped (not charged).",
            "default": 60
          },
          "maxFiles": {
            "title": "Maximum files (0 = all)",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many input files.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}