{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Converter — MP4 to MP3, Trim, GIF and Audio Extraction",
    "description": "The active Apify pricing record determines your bill: `audio-minute-processed` previous/requested $0.001; `video-minute-processed` previous $0.015 / requested $0.026; `hd-video-minute` previous/requested $0.045; platform usage included; failed results free.",
    "version": "1.0",
    "x-build-id": "iImBKopNNChssiPeM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hermeskd~audio-video-convert/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hermeskd-audio-video-convert",
        "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/hermeskd~audio-video-convert/runs": {
      "post": {
        "operationId": "runs-sync-hermeskd-audio-video-convert",
        "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/hermeskd~audio-video-convert/run-sync": {
      "post": {
        "operationId": "run-sync-hermeskd-audio-video-convert",
        "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": {
          "url": {
            "title": "Media file URL",
            "pattern": "^https?://[^\\s/@]+([/?#]\\S*)?$",
            "type": "string",
            "description": "One media URL, or use urls for a batch (never both). HTTP(S), up to 1 GB per file; single-file media only, no playlists."
          },
          "urls": {
            "title": "Media file URLs (batch)",
            "minItems": 1,
            "maxItems": 20,
            "type": "array",
            "description": "1–20 media URLs instead of url. One operation and settings apply to all; ordered sequential processing, one record per URL, failures free. Duplicate URLs are separate inputs.",
            "items": {
              "type": "string",
              "pattern": "^https?://[^\\s/@]+([/?#]\\S*)?$"
            }
          },
          "operation": {
            "title": "Operation",
            "enum": [
              "extract_audio",
              "convert_audio",
              "transcode_video",
              "trim",
              "compress_video",
              "gif"
            ],
            "type": "string",
            "description": "extract_audio: the audio track as audioFormat. convert_audio: an audio file to audioFormat. transcode_video: to videoFormat (MP4/MOV/MKV = H.264 + AAC, WebM = VP9 + Opus). trim: the start–end range, re-encoded frame-accurately. compress_video: to targetSizeMb. gif: an animated GIF of the start–end range."
          },
          "audioFormat": {
            "title": "Audio format",
            "enum": [
              "mp3",
              "wav",
              "m4a",
              "ogg",
              "flac",
              "opus"
            ],
            "type": "string",
            "description": "Audio outputs: mp3 (VBR), wav (16-bit PCM), m4a (AAC 160 kbps), ogg (Vorbis), flac (lossless), opus (Ogg Opus 96 kbps). audioBitrateKbps overrides lossy formats.",
            "default": "mp3"
          },
          "sampleRate": {
            "title": "Sample rate (Hz)",
            "minimum": 8000,
            "maximum": 48000,
            "type": "integer",
            "description": "Resample audio outputs to this rate, e.g. 16000 for speech models: 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100 or 48000. Empty keeps the source rate. Opus supports only 8000, 12000, 16000, 24000 and 48000."
          },
          "channels": {
            "title": "Channels",
            "minimum": 1,
            "maximum": 2,
            "type": "integer",
            "description": "Audio channels of the output: 1 (mono, e.g. for speech models) or 2 (stereo). Empty keeps the source's, with more than two mixed down to stereo."
          },
          "videoFormat": {
            "title": "Video format",
            "enum": [
              "mp4",
              "webm",
              "mov",
              "mkv"
            ],
            "type": "string",
            "description": "Video outputs: mp4, mov, mkv (H.264 + AAC) or webm (VP9 + Opus).",
            "default": "mp4"
          },
          "start": {
            "title": "Start (s)",
            "minimum": 0,
            "maximum": 86400,
            "type": "integer",
            "description": "For trim and gif only: where the range starts, in whole seconds from the beginning (0–86,400). Default 0."
          },
          "end": {
            "title": "End (s)",
            "minimum": 1,
            "maximum": 86400,
            "type": "integer",
            "description": "For trim and gif only: where the range ends, in whole seconds (1–86,400); after start, inside the media. Empty means the end of the media. A GIF covers at most 60 seconds."
          },
          "targetSizeMb": {
            "title": "Target size (MB)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "For compress_video (required there): the largest output size in megabytes of 1,000,000 bytes (1–1,000). The bitrate is set from it and the file's duration."
          },
          "maxWidth": {
            "title": "Maximum width (px)",
            "minimum": 16,
            "maximum": 7680,
            "type": "integer",
            "description": "Scale video and GIF outputs down to this width, keeping the aspect ratio (16–7,680). Empty keeps the source width; a GIF defaults to 480 px when the source is wider."
          },
          "audioBitrateKbps": {
            "title": "Audio bitrate (kbps)",
            "minimum": 32,
            "maximum": 320,
            "type": "integer",
            "description": "Target 32–320 kbps for lossy audio or a video audio track. Subject to codec/sample-rate/channel limits: incompatible combinations return invalid_input; the encoder may round supported rates. Not WAV/FLAC or GIF. compress_video uses its size budget."
          },
          "resolution": {
            "title": "Video resolution",
            "enum": [
              "source",
              "1080p",
              "720p",
              "480p",
              "360p"
            ],
            "type": "string",
            "description": "Fit video into this box, in either orientation, without upscaling. source preserves the source within the 1080p cap. maxWidth can reduce it further. GIF keeps its own cap. HD source decoding is still charged as HD.",
            "default": "source"
          },
          "compressionPreset": {
            "title": "Compression quality preset",
            "enum": [
              "small",
              "balanced",
              "high"
            ],
            "type": "string",
            "description": "For video: small reduces file size/quality, balanced keeps existing quality, high increases quality/size. H.264 CRF 28/23/18; VP9 CRF 37/32/27. compress_video uses targetSizeMb instead. Does not change encoder speed.",
            "default": "balanced"
          },
          "removeAudio": {
            "title": "Remove audio",
            "type": "boolean",
            "description": "Mute video outputs. Not audio-only outputs or GIF. Cannot combine with normalizeAudio.",
            "default": false
          },
          "normalizeAudio": {
            "title": "Normalise audio loudness",
            "type": "boolean",
            "description": "One-pass EBU R128 loudnorm targeting −16 LUFS, −1.5 dBTP and LRA 11. Requires an audio track; not GIF or removeAudio. The target is not guaranteed for silence or very short clips.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}