{
  "openapi": "3.0.1",
  "info": {
    "title": "Media Converter: WebM, MKV, MP3, WAV, FLAC, Opus and GIF",
    "description": "Converts video and audio files you link or upload with ffmpeg: MP4, WebM, MOV, MKV, GIF, MP3, WAV, AAC, M4A, FLAC and Opus. Sets resolution, frame rate, quality or bitrate, trims, normalizes loudness, and returns a download link for each file.",
    "version": "0.1",
    "x-build-id": "6CVEccCKt8LegqXSo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/examsens.ai~media-converter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-examsens.ai-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/examsens.ai~media-converter/runs": {
      "post": {
        "operationId": "runs-sync-examsens.ai-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/examsens.ai~media-converter/run-sync": {
      "post": {
        "operationId": "run-sync-examsens.ai-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 URLs",
            "type": "array",
            "description": "Direct links to video or audio files in WebM, MKV, Ogg, WAV, FLAC or MP3, with AV1, VP8, VP9 or Theora video and Opus, Vorbis, FLAC, MP3 or PCM audio. Other files get an error item naming their format. Pages of video sites are not supported.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "inputStore": {
            "title": "Files in a key value store",
            "type": "string",
            "description": "To use video and audio files from your computer, upload them to one of your key value stores, then pick that store here. Every record whose key ends in .webm, .mkv, .mka, .ogg, .oga, .ogv, .opus, .wav, .flac or .mp3 is processed, or only the keys you list below."
          },
          "inputKeys": {
            "title": "Record keys",
            "type": "array",
            "description": "Only process these records from the store above, one key per line. Empty processes every record with a known file extension.",
            "items": {
              "type": "string"
            }
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "webm",
              "mkv",
              "gif",
              "mp3",
              "wav",
              "flac",
              "opus"
            ],
            "type": "string",
            "description": "Video: WebM or MKV, with VP9 video and Opus audio by default. Animated: GIF. Audio only: MP3, WAV (16 bit PCM), FLAC (lossless) or Opus.",
            "default": "webm"
          },
          "videoCodec": {
            "title": "Video codec",
            "enum": [
              "auto",
              "vp8",
              "vp9",
              "av1",
              "copy"
            ],
            "type": "string",
            "description": "Auto picks VP9. AV1 gives smaller files than VP9 at the same quality and takes longer. VP8 is the older WebM codec. Copy keeps the video stream as it is: fastest and no quality loss, but resolution, frame rate and quality settings are ignored, and a trim starts at the nearest keyframe.",
            "default": "auto"
          },
          "quality": {
            "title": "Video quality",
            "enum": [
              "high",
              "medium",
              "low",
              "smallest"
            ],
            "type": "string",
            "description": "Constant quality level for the encoder. High keeps the most detail, smallest gives the smallest files. Ignored when you set a video bitrate.",
            "default": "medium"
          },
          "videoBitrateKbps": {
            "title": "Video bitrate (kbps)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Target video bitrate, such as 2500 for 2.5 Mbps. 0 uses the quality level.",
            "default": 0
          },
          "width": {
            "title": "Width (px)",
            "minimum": 0,
            "maximum": 7680,
            "type": "integer",
            "description": "Target width. With only a width, the height follows the aspect ratio. With both, the video fits inside the box with the aspect ratio kept. 0 keeps the size. GIF defaults to 480 wide at most.",
            "default": 0
          },
          "height": {
            "title": "Height (px)",
            "minimum": 0,
            "maximum": 4320,
            "type": "integer",
            "description": "Target height, such as 720 or 1080. 0 keeps the size.",
            "default": 0
          },
          "withoutEnlargement": {
            "title": "Never enlarge",
            "type": "boolean",
            "description": "Leave videos that already fit inside the width and height at their own size.",
            "default": true
          },
          "fps": {
            "title": "Frame rate",
            "minimum": 0,
            "maximum": 240,
            "type": "number",
            "description": "Output frames per second, such as 24, 30 or 60. 0 keeps the source rate.",
            "default": 0
          },
          "startTime": {
            "title": "Trim start",
            "type": "string",
            "description": "Where the output starts: seconds such as 12.5, or a timecode such as 00:01:30. Empty starts at the beginning."
          },
          "endTime": {
            "title": "Trim end",
            "type": "string",
            "description": "Where the output ends, measured from the start of the source file. Empty runs to the end."
          },
          "removeAudio": {
            "title": "Remove audio",
            "type": "boolean",
            "description": "Write a silent video.",
            "default": false
          },
          "audioBitrateKbps": {
            "title": "Audio bitrate (kbps)",
            "minimum": 8,
            "maximum": 512,
            "type": "integer",
            "description": "For MP3, Opus and the audio track of videos. 128 is fine for speech, 192 to 320 for music. WAV and FLAC ignore it.",
            "default": 192
          },
          "sampleRate": {
            "title": "Sample rate",
            "enum": [
              "keep",
              "22050",
              "44100",
              "48000"
            ],
            "type": "string",
            "description": "Audio sample rate in Hz. Opus always uses 48000.",
            "default": "keep"
          },
          "audioChannels": {
            "title": "Channels",
            "enum": [
              "keep",
              "mono",
              "stereo"
            ],
            "type": "string",
            "description": "Mix the audio down to mono or stereo, or keep the source layout.",
            "default": "keep"
          },
          "normalizeLoudness": {
            "title": "Normalize loudness",
            "type": "boolean",
            "description": "Even out the volume to -16 LUFS with the ffmpeg loudnorm filter (EBU R128), so quiet and loud files play at a similar level.",
            "default": false
          },
          "gifFps": {
            "title": "GIF frame rate",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Frames per second for GIF output. 10 to 15 keeps files small.",
            "default": 10
          },
          "gifLoop": {
            "title": "Loop the GIF",
            "type": "boolean",
            "description": "Loop forever, or play once.",
            "default": true
          },
          "stripMetadata": {
            "title": "Strip metadata",
            "type": "boolean",
            "description": "Remove title, artist, creation time and the other tags. When off, the tags are copied to the new file.",
            "default": false
          },
          "maxFileSizeMb": {
            "title": "Maximum file size (MB)",
            "minimum": 1,
            "maximum": 4000,
            "type": "integer",
            "description": "Larger source files are skipped with an error item and are not charged.",
            "default": 1000
          },
          "timeoutSecondsPerFile": {
            "title": "Time limit per file (seconds)",
            "minimum": 60,
            "maximum": 14400,
            "type": "integer",
            "description": "Stops a conversion that runs longer than this and reports an error for that file.",
            "default": 1800
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}