{
  "openapi": "3.0.1",
  "info": {
    "title": "KinoPipe – Video Editing for AI Agents",
    "description": "Run 22 typed video tools for trimming, resizing, compression, subtitles, audio, composition, GIF, and metadata. KinoPipe processes public media URLs, enforces a per-run compute cap, and returns signed download links for AI agents and automation workflows.",
    "version": "0.1",
    "x-build-id": "jExVUfygvgoezorgg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/benign_dogfish~kinopipe-video-editor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-benign_dogfish-kinopipe-video-editor",
        "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/benign_dogfish~kinopipe-video-editor/runs": {
      "post": {
        "operationId": "runs-sync-benign_dogfish-kinopipe-video-editor",
        "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/benign_dogfish~kinopipe-video-editor/run-sync": {
      "post": {
        "operationId": "run-sync-benign_dogfish-kinopipe-video-editor",
        "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": [
          "tool",
          "inputs"
        ],
        "properties": {
          "tool": {
            "title": "Video tool",
            "enum": [
              "video-metadata",
              "video-to-vertical",
              "change-video-speed",
              "normalize-audio",
              "remove-silence-from-audio",
              "compress-video",
              "video-to-mp4",
              "resize-video",
              "extract-audio",
              "video-thumbnail-generator",
              "add-subtitles-to-video",
              "trim-video",
              "optimize-video-for-web",
              "merge-videos",
              "add-watermark-to-video",
              "picture-in-picture-video",
              "create-social-video-clip",
              "add-music-to-video",
              "convert-video-to-gif",
              "crop-video",
              "remove-audio-from-video",
              "split-video"
            ],
            "type": "string",
            "description": "The typed KinoPipe operation to run.",
            "default": "compress-video"
          },
          "inputs": {
            "title": "Media inputs",
            "minItems": 1,
            "maxItems": 6,
            "type": "array",
            "description": "One to six public HTTP(S) media URLs. The first input must have the ID main. Some tools also require captions, watermark, pip, or music.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "id": {
                  "title": "Input ID",
                  "type": "string",
                  "description": "Use main for the first media item. Additional IDs depend on the tool.",
                  "editor": "textfield",
                  "pattern": "^[a-z][a-z0-9_-]*$",
                  "maxLength": 40
                },
                "url": {
                  "title": "Public media URL",
                  "type": "string",
                  "description": "A public or signed HTTP(S) URL that KinoPipe can download.",
                  "editor": "textfield",
                  "pattern": "^https?://.+",
                  "maxLength": 4096
                },
                "filename": {
                  "title": "Filename",
                  "type": "string",
                  "description": "Optional filename hint including the extension.",
                  "editor": "textfield",
                  "minLength": 1,
                  "maxLength": 180
                }
              },
              "required": [
                "id",
                "url"
              ]
            }
          },
          "options": {
            "title": "Tool options",
            "type": "object",
            "description": "Tool-specific JSON options. Examples: {\"quality\":\"balanced\"}, {\"start\":2.5,\"end\":17}, or {\"aspect_ratio\":\"9:16\",\"fit\":\"cover\"}.",
            "default": {}
          },
          "maxCredits": {
            "title": "Maximum video credits",
            "minimum": 1,
            "maximum": 720,
            "type": "integer",
            "description": "Hard ceiling for billable KinoPipe credits across worker time and output size. The Actor verifies that the run budget can cover this ceiling before processing; unused capacity is not charged.",
            "default": 50
          },
          "timeoutSeconds": {
            "title": "Completion timeout",
            "minimum": 30,
            "maximum": 3600,
            "type": "integer",
            "description": "Maximum time to wait for KinoPipe to finish before failing this Actor run.",
            "default": 900
          },
          "pollIntervalSeconds": {
            "title": "Polling interval",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "Delay between KinoPipe status checks.",
            "default": 2
          },
          "idempotencyKey": {
            "title": "Idempotency key",
            "minLength": 1,
            "maxLength": 160,
            "type": "string",
            "description": "Optional stable key for safely retrying the same edit. The Apify run ID is used when omitted."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}