{
  "openapi": "3.0.1",
  "info": {
    "title": "Cut Video: Video Trimmer, Clip Cutter & Video to GIF",
    "description": "Cut video clips from video file URLs: trim by start/end or duration, split into equal segments, or make a GIF or MP3. Fast stream copy or frame-accurate re-encode, mp4/webm/gif/mp3 out, signed download links. Direct files only, no YouTube.",
    "version": "0.1",
    "x-build-id": "92jRXdkeP64OadiqW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data-done-right~video-trimmer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data-done-right-video-trimmer",
        "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-trimmer/runs": {
      "post": {
        "operationId": "runs-sync-data-done-right-video-trimmer",
        "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-trimmer/run-sync": {
      "post": {
        "operationId": "run-sync-data-done-right-video-trimmer",
        "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": {
          "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 gets the clips listed under 'Clips' (or equal segments if you set 'Segment length'). YouTube, Vimeo, TikTok and other streaming-site page links are rejected, with no charge.",
            "items": {
              "type": "string"
            }
          },
          "clips": {
            "title": "Clips to cut from every video",
            "type": "array",
            "description": "List of clips, each {\"start\": ..., \"end\": ...} or {\"start\": ..., \"duration\": ...}. Times are seconds (12.5) or HH:MM:SS.mmm (\"00:01:05.250\"). Omit end and duration to cut to the end of the video. Optional \"name\" labels the clip. Example: [{\"start\": 0, \"end\": 2}, {\"start\": \"00:00:03\", \"duration\": 1.5, \"name\": \"intro\"}]"
          },
          "videos": {
            "title": "Videos with their own clips",
            "type": "array",
            "description": "Different clips per video: [{\"url\": \"https://example.com/a.mp4\", \"clips\": [{\"start\": 5, \"end\": 12}]}, ...]. Used in addition to 'Video URLs'. A URL listed in both uses the clips given here."
          },
          "cutListDatasetId": {
            "title": "Cut list from a dataset",
            "type": "string",
            "description": "Optional dataset with one row per clip: url (or videoUrl / sourceUrl), start, end or duration, and optional name. Rows of the same URL are cut from one download."
          },
          "segmentSeconds": {
            "title": "Segment length (seconds)",
            "minimum": 0,
            "maximum": 3600,
            "type": "number",
            "description": "Split each video that has no explicit clips into equal parts of this length, for example 30 for 30-second segments. 0 = off. Each segment is one charged clip. Capped by 'Max clips per run'.",
            "default": 0
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "mp4",
              "webm",
              "gif",
              "mp3"
            ],
            "type": "string",
            "description": "File type of each clip. GIF clips can be at most 60 s long. MP3 needs a video with an audio track.",
            "default": "mp4"
          },
          "mode": {
            "title": "Cut mode",
            "enum": [
              "accurate",
              "copy"
            ],
            "type": "string",
            "description": "Accurate re-encodes and cuts exactly at your start and end. Copy does not re-encode (very fast, no quality loss) but starts at the keyframe at or before 'start', so a clip can begin up to a few seconds early. GIF and MP3 are always re-encoded.",
            "default": "accurate"
          },
          "crf": {
            "title": "Video quality (CRF)",
            "minimum": 16,
            "maximum": 35,
            "type": "integer",
            "description": "Accurate mode, MP4/WebM. Lower = better quality and bigger files: 18 is near-lossless, 23 is the default, 28 is small. WebM uses a matching VP9 scale.",
            "default": 23
          },
          "width": {
            "title": "Max width (px)",
            "minimum": 0,
            "maximum": 7680,
            "type": "integer",
            "description": "Accurate mode, MP4/WebM: shrink clips to this width, keeping the aspect ratio. 0 = original size. Never upscales. Example: 1280.",
            "default": 0
          },
          "gifFps": {
            "title": "GIF frames per second",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "GIF output only. 10 to 15 is a good balance of smoothness and file size.",
            "default": 12
          },
          "gifWidth": {
            "title": "GIF width (px)",
            "minimum": 16,
            "maximum": 1280,
            "type": "integer",
            "description": "GIF output only: clips wider than this are shrunk to it, keeping the aspect ratio. Example: 480.",
            "default": 480
          },
          "audioBitrateKbps": {
            "title": "MP3 bitrate (kbps)",
            "minimum": 64,
            "maximum": 320,
            "type": "integer",
            "description": "MP3 output only. 128 is fine for speech, 192 to 320 for music.",
            "default": 192
          },
          "maxClipSeconds": {
            "title": "Max clip length (seconds)",
            "minimum": 1,
            "maximum": 3600,
            "type": "number",
            "description": "Longer clips are rejected with an error row and no charge. Example: 600 = 10 minutes.",
            "default": 600
          },
          "maxClipsPerRun": {
            "title": "Max clips per run",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Hard cap on clips cut in one run (and so on what you can be charged). Clips past the cap are listed as skipped.",
            "default": 100
          },
          "maxVideoSizeMb": {
            "title": "Max video file size (MB)",
            "minimum": 1,
            "maximum": 2048,
            "type": "integer",
            "description": "Source files above this size are rejected before the download finishes.",
            "default": 500
          },
          "maxDurationMinutes": {
            "title": "Max video duration (minutes)",
            "minimum": 0.1,
            "type": "number",
            "description": "Longer source videos are rejected without charge. Example: 240 = 4 hours.",
            "default": 240
          },
          "videoTimeoutSecs": {
            "title": "Timeout (seconds)",
            "minimum": 10,
            "maximum": 7200,
            "type": "integer",
            "description": "Applies separately to each download and to the cutting of each clip.",
            "default": 600
          },
          "outputStoreName": {
            "title": "Save clips in a named store",
            "type": "string",
            "description": "Optional key-value store name. Named stores are kept until you delete them, while a run's own store expires after your plan's retention period. Example: my-clips."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}