{
  "openapi": "3.0.1",
  "info": {
    "title": "Video to GIF Converter: MP4 to GIF & Animated WebP (Bulk)",
    "description": "Convert video file URLs to animated GIF or animated WebP in bulk: set start, duration, fps and width, plus an optional max file size (it re-encodes smaller to fit). Palette-optimised ffmpeg, signed download links. Direct files only, no YouTube.",
    "version": "0.1",
    "x-build-id": "qzanLOyDcYg7CKMMH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data-done-right~video-to-gif-converter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data-done-right-video-to-gif-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/data-done-right~video-to-gif-converter/runs": {
      "post": {
        "operationId": "runs-sync-data-done-right-video-to-gif-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/data-done-right~video-to-gif-converter/run-sync": {
      "post": {
        "operationId": "run-sync-data-done-right-video-to-gif-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",
        "required": [
          "videoUrls"
        ],
        "properties": {
          "videoUrls": {
            "title": "Video URLs",
            "type": "array",
            "description": "Direct links to video files (mp4, mov, webm, mkv, avi). Example: https://example.com/clip.mp4. Each video becomes one GIF or WebP from the start time and duration below. YouTube, Vimeo, TikTok and other streaming-site page links are rejected with no charge.",
            "items": {
              "type": "string"
            }
          },
          "videos": {
            "title": "Videos with their own start and duration (optional)",
            "type": "array",
            "description": "Per-video windows, for example [{\"url\": \"https://example.com/a.mp4\", \"start\": \"00:00:12\", \"duration\": 4, \"name\": \"intro\"}]. Times are seconds (12.5) or HH:MM:SS. The same URL may appear several times with different windows and is downloaded once. Entries without start or duration use the values below."
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "gif",
              "webp",
              "both"
            ],
            "type": "string",
            "description": "GIF works everywhere but is larger. Animated WebP is much smaller at the same quality and plays in all current browsers, but some chat and email apps still show only a still image. 'Both' creates and charges two outputs per window.",
            "default": "gif"
          },
          "startSeconds": {
            "title": "Start (seconds or HH:MM:SS)",
            "type": "string",
            "description": "Where the animation starts. Examples: 0, 12.5, 00:01:30. If it is past the end of the video that output is an error row (free).",
            "default": "0"
          },
          "durationSeconds": {
            "title": "Duration (seconds)",
            "minimum": 0.2,
            "maximum": 60,
            "type": "number",
            "description": "Length of the animation in seconds, 0.2 to 60. If the video ends sooner the output is shortened and the row says so.",
            "default": 3
          },
          "fps": {
            "title": "Frames per second",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Frame rate of the animation. 10 to 15 is typical for GIFs; lower is smaller. Duration times fps may not exceed 1,800 frames.",
            "default": 12
          },
          "width": {
            "title": "Width (pixels)",
            "minimum": 16,
            "maximum": 1920,
            "type": "integer",
            "description": "Maximum width in pixels; the height follows the aspect ratio. Never upscales: a 320 px video stays 320 px. Example: 480.",
            "default": 480
          },
          "maxFileSizeKb": {
            "title": "Max file size (KB, 0 = no cap)",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Try to keep each file under this size (1 KB = 1,024 bytes), for example 8192 for 8 MB chat limits. If the first attempt is too big the Actor re-encodes with fewer frames per second, a smaller width and fewer colors or lower quality, up to 7 attempts in total. If it still does not fit, that output is an error row and is free.",
            "default": 0
          },
          "loop": {
            "title": "Loop forever",
            "type": "boolean",
            "description": "On: the animation repeats forever. Off: it plays once.",
            "default": true
          },
          "colors": {
            "title": "GIF colors",
            "minimum": 16,
            "maximum": 256,
            "type": "integer",
            "description": "Size of the GIF palette, 16 to 256. Fewer colors give a smaller file. Ignored for WebP.",
            "default": 256
          },
          "dither": {
            "title": "GIF dithering",
            "enum": [
              "bayer",
              "floyd_steinberg",
              "sierra2_4",
              "none"
            ],
            "type": "string",
            "description": "How GIF colors are blended. Ignored for WebP.",
            "default": "bayer"
          },
          "webpQuality": {
            "title": "WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Lossy WebP quality, 1 to 100. 75 is a good balance. Ignored for GIF.",
            "default": 75
          },
          "maxOutputsPerRun": {
            "title": "Max outputs per run",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Hard cap on GIF/WebP files created in one run. Also caps your cost: 100 outputs cost about $1.20.",
            "default": 100
          },
          "maxVideoSizeMb": {
            "title": "Max source video size (MB)",
            "minimum": 1,
            "maximum": 2048,
            "type": "integer",
            "description": "Source files larger than this are rejected (free). The whole file is downloaded once per video. Example: 500.",
            "default": 500
          },
          "maxDurationMinutes": {
            "title": "Max source video length (minutes)",
            "minimum": 0.1,
            "maximum": 100000,
            "type": "number",
            "description": "Longer source videos are rejected with an error row (free). Example: 120 = 2 hours.",
            "default": 120
          },
          "videoTimeoutSecs": {
            "title": "Timeout per video (seconds)",
            "minimum": 10,
            "maximum": 7200,
            "type": "integer",
            "description": "Time allowed for each download and for each output, including size-cap retries. Example: 300.",
            "default": 300
          },
          "outputStoreName": {
            "title": "Save files in a named store",
            "type": "string",
            "description": "Optional name of a key-value store that keeps the files until you delete it. Example: my-gifs. Empty = the run's default store, which expires with your plan's retention."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}