{
  "openapi": "3.0.1",
  "info": {
    "title": "Media Converter — Convert, Compress & Trim Video and Audio",
    "description": "Convert video and audio files by link with FFmpeg: MP4, WebM, MKV, MOV, GIF, MP3, M4A, WAV, OGG, FLAC. Compress to a target size, trim, resize, watermark, extract or remove audio. Saved with download links. Billed per minute. Part of NexGen Signal — data tools and official-source data products",
    "version": "0.1",
    "x-build-id": "lObCQmdLHA7gnhS7e"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nexgensignal~media-converter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nexgensignal-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/nexgensignal~media-converter/runs": {
      "post": {
        "operationId": "runs-sync-nexgensignal-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/nexgensignal~media-converter/run-sync": {
      "post": {
        "operationId": "run-sync-nexgensignal-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": "Audio or video file links",
            "type": "array",
            "description": "Direct links to media files (not YouTube or social media pages). Up to 500 per run.",
            "items": {
              "type": "string"
            }
          },
          "outputFormat": {
            "title": "Convert to",
            "enum": [
              "mp4",
              "webm",
              "mkv",
              "mov",
              "gif",
              "mp3",
              "m4a",
              "wav",
              "ogg",
              "flac"
            ],
            "type": "string",
            "description": "Audio formats extract the sound track from a video.",
            "default": "mp4"
          },
          "videoQuality": {
            "title": "Video quality",
            "enum": [
              "high",
              "balanced",
              "small"
            ],
            "type": "string",
            "description": "Use 'small' to compress videos. Ignored for audio and GIF.",
            "default": "balanced"
          },
          "startSeconds": {
            "title": "Start at (s)",
            "minimum": 0,
            "maximum": 86400,
            "type": "number",
            "description": "Trim: keep from this time on.",
            "default": 0
          },
          "endSeconds": {
            "title": "End at (s)",
            "minimum": 0,
            "maximum": 86400,
            "type": "number",
            "description": "Trim: keep until this time. 0 = to the end.",
            "default": 0
          },
          "maxWidth": {
            "title": "Maximum width (px)",
            "minimum": 0,
            "maximum": 7680,
            "type": "integer",
            "description": "Shrink wider videos to this width, keeping the shape. 0 = keep (GIF defaults to 480).",
            "default": 0
          },
          "maxHeight": {
            "title": "Maximum height (px)",
            "minimum": 0,
            "maximum": 4320,
            "type": "integer",
            "description": "Shrink taller videos to this height, keeping the shape. 0 = keep.",
            "default": 0
          },
          "fps": {
            "title": "Frame rate",
            "minimum": 0,
            "maximum": 120,
            "type": "number",
            "description": "Frames per second of the result. 0 = keep (GIF defaults to 10).",
            "default": 0
          },
          "targetSizeMb": {
            "title": "Target file size (MB)",
            "minimum": 0,
            "maximum": 10000,
            "type": "number",
            "description": "Video formats only: encode in two passes to land at or under this size (e.g. 25 for an e-mail or chat upload). 0 = use videoQuality instead.",
            "default": 0
          },
          "watermarkText": {
            "title": "Text watermark",
            "type": "string",
            "description": "Text drawn on the video (up to 120 characters). Empty = none.",
            "default": ""
          },
          "watermarkImageUrl": {
            "title": "Image watermark (link)",
            "type": "string",
            "description": "Link to a PNG (transparency kept) or other image, drawn at about a fifth of the video's width. Empty = none.",
            "default": ""
          },
          "watermarkPosition": {
            "title": "Watermark position",
            "enum": [
              "bottom-right",
              "bottom-left",
              "top-right",
              "top-left",
              "center"
            ],
            "type": "string",
            "description": "Where the watermark sits.",
            "default": "bottom-right"
          },
          "watermarkOpacity": {
            "title": "Watermark opacity",
            "minimum": 0.05,
            "maximum": 1,
            "type": "number",
            "description": "1 = solid, 0.3 = faint.",
            "default": 0.6
          },
          "audioBitrateKbps": {
            "title": "Audio bitrate (kbps)",
            "minimum": 32,
            "maximum": 320,
            "type": "integer",
            "description": "For MP3, M4A, OGG and the sound in MP4/WebM/MKV/MOV.",
            "default": 128
          },
          "removeAudio": {
            "title": "Remove audio",
            "type": "boolean",
            "description": "Make a silent video.",
            "default": false
          },
          "maxInputMb": {
            "title": "Largest input file (MB)",
            "minimum": 1,
            "maximum": 4000,
            "type": "integer",
            "description": "Skip files bigger than this.",
            "default": 1000
          },
          "maxMinutesPerFile": {
            "title": "Longest output per file (minutes)",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Skip files whose result would be longer than this (after trimming).",
            "default": 60
          },
          "maxFiles": {
            "title": "Maximum files",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many files are converted.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}