{
  "openapi": "3.0.1",
  "info": {
    "title": "CCTV Motion Clipper — Keep Only the Moments with Motion",
    "description": "Turn hours of security-camera footage into minutes: finds motion in CCTV/NVR videos, returns a timeline with thumbnails and a summary video of only the moving parts, with source time burned in. Ignores clock overlays and noise.",
    "version": "0.1",
    "x-build-id": "c1daRy8f22J64rvh4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/adorable_partial~cctv-motion-clipper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-adorable_partial-cctv-motion-clipper",
        "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/adorable_partial~cctv-motion-clipper/runs": {
      "post": {
        "operationId": "runs-sync-adorable_partial-cctv-motion-clipper",
        "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/adorable_partial~cctv-motion-clipper/run-sync": {
      "post": {
        "operationId": "run-sync-adorable_partial-cctv-motion-clipper",
        "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": "Security-camera / NVR exports (MP4, MKV, AVI, MOV, TS...), up to 4 GB each. Public Google Drive and Dropbox links work.",
            "items": {
              "type": "string"
            }
          },
          "sensitivity": {
            "title": "Sensitivity",
            "enum": [
              "high",
              "medium",
              "low"
            ],
            "type": "string",
            "description": "How big a moving object must be to count as motion.",
            "default": "medium"
          },
          "minMotionPercent": {
            "title": "Custom minimum object size (% of frame)",
            "type": "string",
            "description": "Overrides Sensitivity: smallest moving area that counts, as % of the picture (e.g. 0.1). Every event's peak value is in the output to help you tune it."
          },
          "ignoreRegions": {
            "title": "Ignore regions",
            "type": "array",
            "description": "Areas to ignore, in % of the picture: [{\"x\":0,\"y\":0,\"width\":40,\"height\":8}] for a clock overlay at the top-left, or trees, flags and busy streets. The on-screen clock is usually ignored automatically because it is small."
          },
          "minEventSeconds": {
            "title": "Minimum event length (s)",
            "type": "string",
            "description": "Ignore motion shorter than this (filters single-frame flicker).",
            "default": "0.6"
          },
          "mergeGapSeconds": {
            "title": "Merge events closer than (s)",
            "type": "string",
            "description": "Two motions separated by less than this become one event.",
            "default": "3"
          },
          "preRollSeconds": {
            "title": "Seconds before each event",
            "type": "string",
            "description": "Extra video kept before motion starts.",
            "default": "2"
          },
          "postRollSeconds": {
            "title": "Seconds after each event",
            "type": "string",
            "description": "Extra video kept after motion ends.",
            "default": "2"
          },
          "createSummaryVideo": {
            "title": "Create summary video",
            "type": "boolean",
            "description": "One MP4 with all motion events back to back.",
            "default": true
          },
          "createClips": {
            "title": "Create one clip per event",
            "type": "boolean",
            "description": "Also store each event as its own MP4.",
            "default": false
          },
          "createThumbnails": {
            "title": "Create thumbnails",
            "type": "boolean",
            "description": "A JPEG of the moment with most motion in each event.",
            "default": true
          },
          "burnTimestamp": {
            "title": "Show source time on video",
            "type": "boolean",
            "description": "Write the original position (hh:mm:ss) in the corner of exported videos, so every frame can be traced back.",
            "default": true
          },
          "maxHeight": {
            "title": "Export resolution (max height)",
            "minimum": 144,
            "maximum": 2160,
            "type": "integer",
            "description": "Exported clips are downscaled to this height (smaller files). Analysis is not affected.",
            "default": 720
          },
          "maxDurationMinutes": {
            "title": "Max minutes per video",
            "minimum": 1,
            "type": "integer",
            "description": "Only the first N minutes of each video are scanned and billed.",
            "default": 720
          },
          "maxEventsPerVideo": {
            "title": "Max events per video",
            "minimum": 1,
            "type": "integer",
            "description": "Stop exporting after this many events (very busy scenes).",
            "default": 300
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}