{
  "openapi": "3.1.0",
  "info": {
    "title": "FFmpeg Command API",
    "description": "API for running FFmpeg in a cloud environment",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.rendi.dev",
      "description": "Rendi - FFmpeg API"
    }
  ],
  "paths": {
    "/v1/commands/{command_id}": {
      "get": {
        "tags": [
          "API",
          "FFmpeg Commands"
        ],
        "summary": "Get Command Status",
        "description": "Get the status of a previously submitted FFmpeg command. Works for regular commands and chained commands.",
        "operationId": "poll_command_v1_commands__command_id__get",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "command_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The UUID of the FFmpeg command to check status for",
              "title": "Command Id"
            },
            "description": "The UUID of the FFmpeg command to check status for"
          },
          {
            "name": "presigned_ttl_seconds",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "maximum": 604800
                },
                {
                  "type": "null"
                }
              ],
              "description": "If set, output files that are private AND already stored return `storage_url` as a presigned URL valid for this many seconds. For any other file (public, not yet stored, or deleted) the default `storage_url` is returned unchanged. See the [private files guide](https://docs.rendi.dev/private-files).",
              "gte": 0,
              "title": "Presigned Ttl Seconds"
            },
            "description": "If set, output files that are private AND already stored return `storage_url` as a presigned URL valid for this many seconds. For any other file (public, not yet stored, or deleted) the default `storage_url` is returned unchanged. See the [private files guide](https://docs.rendi.dev/private-files)."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommandStatusResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid API key",
            "content": {
              "application/json": {
                "example": {
                  "detail": "Invalid authorization key"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/commands": {
      "get": {
        "tags": [
          "API",
          "FFmpeg Commands"
        ],
        "summary": "Get list of commands sent",
        "description": "Get the statuses of a previously submitted FFmpeg commands, ordered by creation time - descending.",
        "operationId": "get_commands_v1_commands_get",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "exclusiveMinimum": 0,
              "description": "Maximum number of commands to return",
              "default": 1000,
              "title": "Limit"
            },
            "description": "Maximum number of commands to return"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Number of commands to skip before starting to collect the result set",
              "default": 0,
              "title": "Offset"
            },
            "description": "Number of commands to skip before starting to collect the result set"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CommandsListItemResponse"
                  },
                  "title": "Response Get Commands V1 Commands Get"
                }
              }
            }
          },
          "401": {
            "description": "Invalid API key",
            "content": {
              "application/json": {
                "example": {
                  "detail": "Invalid authorization key"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "422": {
            "description": "Invalid request"
          }
        }
      }
    },
    "/v1/run-ffmpeg-command": {
      "post": {
        "tags": [
          "API",
          "FFmpeg Commands"
        ],
        "summary": "Run FFmpeg Command",
        "description": "Submit an FFmpeg command for processing with input and output file specifications.",
        "operationId": "run_ffmpeg_command_v1_run_ffmpeg_command_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FFmpegCommandRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successfully submitted FFmpeg command",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunCommandResponse"
                },
                "example": {
                  "command_id": "123e4567-e89b-12d3-a456-426614174000"
                }
              }
            }
          },
          "403": {
            "description": "Account quota exceeded or plan does not support this command"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "401": {
            "description": "Invalid API key",
            "content": {
              "application/json": {
                "example": {
                  "detail": "Invalid authorization key"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/v1/run-chained-ffmpeg-commands": {
      "post": {
        "tags": [
          "API",
          "FFmpeg Commands"
        ],
        "summary": "Run Chained FFmpeg Commands which share input and output files",
        "description": "Submit multiple FFmpeg commands where following commands can depend on output of previous commands.         Running chained FFmpeg commands is faster than running each command separately because we re-use system         and network resources between the multiple ffmpeg commands. Processing quota is shared between the commands, and is more efficient than running each command separately.",
        "operationId": "run_chained_ffmpeg_commands_v1_run_chained_ffmpeg_commands_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FFmpegChainedCommandsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successfully submitted chained FFmpeg commands",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunCommandResponse"
                },
                "example": {
                  "command_id": "123e4567-e89b-12d3-a456-426614174000"
                }
              }
            }
          },
          "403": {
            "description": "Account quota exceeded or plan does not support chained commands"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "401": {
            "description": "Invalid API key",
            "content": {
              "application/json": {
                "example": {
                  "detail": "Invalid authorization key"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/v1/files/store-file": {
      "post": {
        "tags": [
          "API",
          "File Management"
        ],
        "summary": "FFprobe and store a file",
        "description": "Submit a file to be analyzed with FFprobe and stored in Rendi's storage. You can use this endpoint both to get metadata about a file and to store it. If you delete the file, you will still have access to its metadata. Get the file's storage url and metadata using the GET /files/{file_id} endpoint. If you require other data extracted from FFprobe - message us at support@rendi.dev.",
        "operationId": "store_file_v1_files_store_file_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FileStoreRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successfully submitted file for FFprobe and storage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RendiStoredFileId"
                },
                "example": {
                  "file_id": "123e4567-e89b-12d3-a456-426614174000"
                }
              }
            }
          },
          "403": {
            "description": "Account quota exceeded or plan does not support this command"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "401": {
            "description": "Invalid API key",
            "content": {
              "application/json": {
                "example": {
                  "detail": "Invalid authorization key"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/v1/files/init-upload": {
      "post": {
        "tags": [
          "API",
          "File Management"
        ],
        "summary": "Initiate a direct multipart upload",
        "description": "Start uploading a local file directly to Rendi's storage. Returns a per-part list of presigned PUT URLs that you upload chunks to. See the [direct upload guide](https://docs.rendi.dev/direct-upload) for the full flow and code samples.",
        "operationId": "init_upload_v1_files_init_upload_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitUploadRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Multipart upload session created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitUploadResponse"
                }
              }
            }
          },
          "403": {
            "description": "Account quota exceeded or plan does not support uploads"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "401": {
            "description": "Invalid API key",
            "content": {
              "application/json": {
                "example": {
                  "detail": "Invalid authorization key"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/v1/files/{file_id}/complete-upload": {
      "post": {
        "tags": [
          "API",
          "File Management"
        ],
        "summary": "Complete a multipart upload",
        "description": "Finalize a direct upload started via `POST /v1/files/init-upload`. The file then goes through FFprobe for media metadata; `status` changes as `UPLOADED` and becomes `STORED` when analysis completes. See the [direct upload guide](https://docs.rendi.dev/direct-upload) for the full flow.",
        "operationId": "complete_upload_v1_files__file_id__complete_upload_post",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "File Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompleteUploadRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Upload completed; file is being ffrpobed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RendiStoredFile"
                }
              }
            }
          },
          "404": {
            "description": "File not found"
          },
          "400": {
            "description": "File is not in an upload-in-progress state, or the upload session has expired"
          },
          "401": {
            "description": "Invalid API key",
            "content": {
              "application/json": {
                "example": {
                  "detail": "Invalid authorization key"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/abort-upload": {
      "post": {
        "tags": [
          "API",
          "File Management"
        ],
        "summary": "Abort a multipart upload",
        "description": "Cancel a direct upload started via `POST /v1/files/init-upload`. Discards any parts already uploaded to storage and marks the file as failed. See the [direct upload guide](https://docs.rendi.dev/direct-upload) for the full flow.",
        "operationId": "abort_upload_v1_files__file_id__abort_upload_post",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "File Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Upload aborted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "Response Abort Upload V1 Files  File Id  Abort Upload Post"
                }
              }
            }
          },
          "404": {
            "description": "File not found"
          },
          "400": {
            "description": "File is not in an upload-in-progress state"
          },
          "401": {
            "description": "Invalid API key",
            "content": {
              "application/json": {
                "example": {
                  "detail": "Invalid authorization key"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files": {
      "get": {
        "tags": [
          "API",
          "File Management"
        ],
        "summary": "Get list of all stored files",
        "description": "Get the list of all stored files for an account, ordered by creation time - descending. Can return command output files or stored files. Will not return deleted files or input files.",
        "operationId": "get_files_v1_files_get",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "exclusiveMinimum": 0,
              "description": "Maximum number of files to return",
              "default": 1000,
              "title": "Limit"
            },
            "description": "Maximum number of files to return"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Number of files to skip before starting to collect the result set",
              "default": 0,
              "title": "Offset"
            },
            "description": "Number of files to skip before starting to collect the result set"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RendiBaseStoredFile"
                  },
                  "title": "Response Get Files V1 Files Get"
                }
              }
            }
          },
          "401": {
            "description": "Invalid API key",
            "content": {
              "application/json": {
                "example": {
                  "detail": "Invalid authorization key"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "422": {
            "description": "Invalid request"
          }
        }
      }
    },
    "/v1/files/{file_id}": {
      "get": {
        "tags": [
          "API",
          "File Management"
        ],
        "summary": "Get Stored File",
        "description": "Get a stored file and its FFprobe metadata by its ID. Can return a command output file or a stored file. File can be deleted, in which case will still return its properties, \n        but storage_url will be null. Will not return input files.",
        "operationId": "get_file_v1_files__file_id__get",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The UUID of the file to get",
              "title": "File Id"
            },
            "description": "The UUID of the file to get"
          },
          {
            "name": "presigned_ttl_seconds",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "maximum": 604800
                },
                {
                  "type": "null"
                }
              ],
              "description": "If set, and the file is private AND already stored, `storage_url` is returned as a presigned URL valid for this many seconds. For any other file (public, not yet stored, or deleted) the default `storage_url` is returned unchanged. See the [private files guide](https://docs.rendi.dev/private-files).",
              "gte": 1,
              "title": "Presigned Ttl Seconds"
            },
            "description": "If set, and the file is private AND already stored, `storage_url` is returned as a presigned URL valid for this many seconds. For any other file (public, not yet stored, or deleted) the default `storage_url` is returned unchanged. See the [private files guide](https://docs.rendi.dev/private-files)."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RendiStoredFile"
                }
              }
            }
          },
          "401": {
            "description": "Invalid API key",
            "content": {
              "application/json": {
                "example": {
                  "detail": "Invalid authorization key"
                }
              }
            }
          },
          "404": {
            "description": "File not found"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "API",
          "File Management"
        ],
        "summary": "Delete Stored File in Rendi",
        "description": "Delete a stored file in Rendi",
        "operationId": "delete_stored_file_v1_files__file_id__delete",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The UUID of the file to delete",
              "title": "File Id"
            },
            "description": "The UUID of the file to delete"
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "description": "Invalid API key",
            "content": {
              "application/json": {
                "example": {
                  "detail": "Invalid authorization key"
                }
              }
            }
          },
          "404": {
            "description": "File not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/commands/{command_id}/files": {
      "delete": {
        "tags": [
          "API",
          "File Management"
        ],
        "summary": "Delete Command Files",
        "description": "Delete all stored output files associated with a command",
        "operationId": "delete_command_files_v1_commands__command_id__files_delete",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "command_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Command Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "description": "Invalid API key",
            "content": {
              "application/json": {
                "example": {
                  "detail": "Invalid authorization key"
                }
              }
            }
          },
          "404": {
            "description": "Command files not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/bulk-delete": {
      "post": {
        "tags": [
          "API",
          "File Management"
        ],
        "summary": "Bulk Delete Stored Files",
        "description": "Delete multiple stored files in a single request",
        "operationId": "bulk_delete_stored_files_v1_files_bulk_delete_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkDeleteFilesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkDeleteFilesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid API key",
            "content": {
              "application/json": {
                "example": {
                  "detail": "Invalid authorization key"
                }
              }
            }
          },
          "404": {
            "description": "One or more files not found"
          },
          "400": {
            "description": "Cannot delete output manifest files via this endpoint"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "BulkDeleteFilesRequest": {
        "properties": {
          "file_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 1000,
            "minItems": 1,
            "title": "File Ids",
            "description": "List of file UUIDs to delete",
            "examples": [
              [
                "987fcdeb-a89b-43d3-b456-789012345678",
                "123e4567-e89b-12d3-a456-426614174000"
              ]
            ]
          }
        },
        "type": "object",
        "required": [
          "file_ids"
        ],
        "title": "BulkDeleteFilesRequest"
      },
      "BulkDeleteFilesResponse": {
        "properties": {
          "deleted_file_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Deleted File Ids",
            "description": "List of file UUIDs that were successfully deleted",
            "examples": [
              [
                "987fcdeb-a89b-43d3-b456-789012345678",
                "123e4567-e89b-12d3-a456-426614174000"
              ]
            ]
          }
        },
        "type": "object",
        "required": [
          "deleted_file_ids"
        ],
        "title": "BulkDeleteFilesResponse"
      },
      "CommandProcessingStage": {
        "type": "string",
        "enum": [
          "DOWNLOADING",
          "PREPARING_INPUT_FILES",
          "FFMPEG_PROCESSING",
          "UPLOADING"
        ],
        "title": "CommandProcessingStage"
      },
      "CommandStatus": {
        "type": "string",
        "enum": [
          "QUEUED",
          "PROCESSING",
          "PREPARED_FFMPEG_COMMAND",
          "FAILED",
          "SUCCESS"
        ],
        "title": "CommandStatus"
      },
      "CommandStatusResponse": {
        "properties": {
          "command_id": {
            "type": "string",
            "title": "Command Id",
            "description": "Unique identifier for the submitted command",
            "examples": [
              "123e4567-e89b-12d3-a456-426614174000"
            ]
          },
          "environment_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment Name",
            "description": "The environment this command was created in (e.g., 'main', 'test', 'dev').",
            "examples": [
              "main"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/CommandStatus",
            "description": "Current status of the FFmpeg command",
            "examples": [
              "SUCCESS"
            ]
          },
          "processing_stage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CommandProcessingStage"
              },
              {
                "type": "null"
              }
            ],
            "description": "Current processing stage of the command",
            "examples": [
              "DOWNLOADING",
              "PREPARING_INPUT_FILES",
              "FFMPEG_PROCESSING",
              "UPLOADING"
            ]
          },
          "command_type": {
            "$ref": "#/components/schemas/CommandType",
            "description": "Type of command that was run",
            "examples": [
              "FFMPEG_COMMAND",
              "FFMPEG_CHAINED_COMMANDS"
            ]
          },
          "error_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Status",
            "description": "Status of any error that occurred during command execution",
            "examples": [
              "UNREACHABLE_INPUT_FILE"
            ]
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message",
            "description": "Error details if the command failed",
            "examples": [
              "Input file url https://rendi.dev/example does not have a valid file name in its' end."
            ]
          },
          "total_processing_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Processing Seconds",
            "description": "Processing time, in seconds, since receiving the command, this includes network times, parsing times, and FFMPEG command execution time"
          },
          "ffmpeg_command_run_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ffmpeg Command Run Seconds",
            "description": "The exact time the specific FFMPEG command took on our servers, in seconds"
          },
          "vcpu_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vcpu Count",
            "description": "Number of virtual CPUs used for the command"
          },
          "output_files": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/RendiStoredFile"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Files",
            "description": "Dictionary mapping file aliases to their output file storage, for output folder, the key is 'OUTPUT_FOLDER'",
            "examples": [
              {
                "out_1": {
                  "bitrate_audio_kb": 242.349609375,
                  "bitrate_video_kb": 370.5654296875,
                  "codec": "h264",
                  "duration": 30.0,
                  "file_format": "mp4",
                  "file_id": "f775b15d-67e9-4235-b89f-4bb33c0a5f57",
                  "file_type": "video",
                  "frame_rate": 24.0,
                  "height": 320,
                  "is_deleted": false,
                  "is_private": false,
                  "is_varying_frame_rate": false,
                  "mime_type": "video/mp4",
                  "pixel_format": "yuv420p",
                  "size_mbytes": 2.2677812576293945,
                  "storage_url": "https://storage.rendi.dev/files/224ea098-5c10-419b-8a77-707d89443c56/42c95292-d953-4b5a-8a58-cf1513363a33/output_320p.mp4",
                  "timebase": "1/25",
                  "width": 568
                },
                "out_2": {
                  "bitrate_audio_kb": 239.9833984375,
                  "bitrate_video_kb": 160.955078125,
                  "codec": "h264",
                  "duration": 596.459,
                  "file_format": "mp4",
                  "file_id": "9df00eca-3221-49c6-8a64-07850c9a5921",
                  "file_type": "video",
                  "frame_rate": 24.0,
                  "height": 180,
                  "is_deleted": false,
                  "is_private": false,
                  "is_varying_frame_rate": false,
                  "mime_type": "video/mp4",
                  "pixel_format": "yuv420p",
                  "size_mbytes": 29.620187759399414,
                  "storage_url": "https://storage.rendi.dev/files/224ea098-5c10-419b-8a77-707d89443c56/42c95292-d953-4b5a-8a58-cf1513363a33/output_180p.mp4",
                  "timebase": "1/25",
                  "width": 320
                }
              },
              {
                "OUTPUT_FOLDER": {
                  "file_count": 6,
                  "file_format": "zip",
                  "file_type": "zip",
                  "is_deleted": false,
                  "is_private": false,
                  "rendi_store_type": "OUTPUT",
                  "size_compressed_mbytes": 5.120238990783691,
                  "size_mbytes": 6.900238990783691,
                  "status": "STORED",
                  "storage_url": "https://storage.rendi.dev/files/.../41938bd7-3550-46d8-87c3-9d0b3200e7fb.zip"
                }
              }
            ]
          },
          "original_request": {
            "type": "object",
            "title": "Original Request",
            "description": "The original request that was sent to the server",
            "examples": [
              {
                "ffmpeg_command": "-i {{in_1}} -ss 00:00 -to 00:30 -filter_complex \"[0:v]split=2[vid1][vid2];[vid1]scale=trunc(oh*a/2)*2:320:force_original_aspect_ratio=decrease,pad=trunc(oh*a/2)*2:320:-1:-1[320p];[vid2]scale=trunc(oh*a/2)*2:180:force_original_aspect_ratio=decrease,pad=trunc(oh*a/2)*2:180:-1:-1[180p]\" -map [320p] -map 0:a -c:a copy -c:v libx264 -preset medium {{out_1}}  -map [180p] -map 0:a -c:a copy -c:v libx264 -preset medium {{out_2}}",
                "input_files": {
                  "in_1": "https://storage.rendi.dev/sample/sample.avi"
                },
                "max_command_run_seconds": 300.0,
                "output_files": {
                  "out_1": "output_320p.mp4",
                  "out_2": "output_180p.mp4"
                },
                "vcpu_count": 8
              }
            ]
          },
          "processing_quota_used": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Processing Quota Used",
            "description": "Amount of processing quota used in MB",
            "examples": [
              12.5
            ]
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "integer"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    }
                  ]
                },
                "type": "object",
                "maxProperties": 10,
                "minProperties": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata",
            "description": "Metadata stored with the command, used for custom tracking and reporting",
            "examples": [
              {
                "key": "value"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "command_id",
          "environment_name",
          "status",
          "command_type",
          "original_request"
        ],
        "title": "CommandStatusResponse",
        "description": "Response model for FFmpeg command status.\n\nContains information about the command execution status, any errors that occurred,\noutput files generated, and the original request details.",
        "example": {
          "command_id": "123e4567-e89b-12d3-a456-426614174000",
          "command_type": "FFMPEG_COMMAND",
          "environment_name": "main",
          "ffmpeg_command_run_seconds": 19.58051347732544,
          "metadata": {
            "key": "value"
          },
          "original_request": {
            "ffmpeg_command": "-i {{in_1}} -ss 00:00 -to 00:30 -filter_complex \"[0:v]split=2[vid1][vid2];[vid1]scale=trunc(oh*a/2)*2:320:force_original_aspect_ratio=decrease,pad=trunc(oh*a/2)*2:320:-1:-1[320p];[vid2]scale=trunc(oh*a/2)*2:180:force_original_aspect_ratio=decrease,pad=trunc(oh*a/2)*2:180:-1:-1[180p]\" -map [320p] -map 0:a -c:a copy -c:v libx264 -preset medium {{out_1}}  -map [180p] -map 0:a -c:a copy -c:v libx264 -preset medium {{out_2}}",
            "input_files": {
              "in_1": "https://storage.rendi.dev/sample/sample.avi"
            },
            "max_command_run_seconds": 300.0,
            "output_files": {
              "out_1": "output_320p.mp4",
              "out_2": "output_180p.mp4"
            },
            "vcpu_count": 8
          },
          "output_files": {
            "out_1": {
              "bitrate_audio_kb": 242.349609375,
              "bitrate_video_kb": 370.5654296875,
              "codec": "h264",
              "duration": 30.0,
              "file_format": "mp4",
              "file_id": "f775b15d-67e9-4235-b89f-4bb33c0a5f57",
              "file_type": "video",
              "frame_rate": 24.0,
              "height": 320,
              "is_varying_frame_rate": false,
              "mime_type": "video/mp4",
              "pixel_format": "yuv420p",
              "size_mbytes": 2.2677812576293945,
              "storage_url": "https://storage.rendi.dev/files/224ea098-5c10-419b-8a77-707d89443c56/42c95292-d953-4b5a-8a58-cf1513363a33/output_320p.mp4",
              "timebase": "1/25",
              "width": 568
            },
            "out_2": {
              "bitrate_audio_kb": 239.9833984375,
              "bitrate_video_kb": 160.955078125,
              "codec": "h264",
              "duration": 596.459,
              "file_format": "mp4",
              "file_id": "9df00eca-3221-49c6-8a64-07850c9a5921",
              "file_type": "video",
              "frame_rate": 24.0,
              "height": 180,
              "is_varying_frame_rate": false,
              "mime_type": "video/mp4",
              "pixel_format": "yuv420p",
              "size_mbytes": 29.620187759399414,
              "storage_url": "https://storage.rendi.dev/files/224ea098-5c10-419b-8a77-707d89443c56/42c95292-d953-4b5a-8a58-cf1513363a33/output_180p.mp4",
              "timebase": "1/25",
              "width": 320
            }
          },
          "processing_quota_used": 12.5,
          "status": "SUCCESS",
          "total_processing_seconds": 24.955581,
          "vcpu_count": 8
        }
      },
      "CommandType": {
        "type": "string",
        "enum": [
          "FFMPEG_COMMAND",
          "FFMPEG_CHAINED_COMMANDS"
        ],
        "title": "CommandType"
      },
      "CommandsListItemResponse": {
        "properties": {
          "command_id": {
            "type": "string",
            "title": "Command Id",
            "description": "Unique identifier for the submitted command",
            "examples": [
              "123e4567-e89b-12d3-a456-426614174000"
            ]
          },
          "environment_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment Name",
            "description": "The environment this command was created in (e.g., 'main', 'test', 'dev').",
            "examples": [
              "main"
            ]
          },
          "storage_quota_used": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Storage Quota Used",
            "description": "Amount of storage quota used in MB",
            "examples": [
              5.2
            ]
          },
          "processing_quota_used": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Processing Quota Used",
            "description": "Amount of processing quota used in MB",
            "examples": [
              12.5
            ]
          },
          "output_file_count": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Output File Count",
            "description": "Number of output files generated by the command",
            "examples": [
              72
            ]
          },
          "error_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Status",
            "description": "Status of any error that occurred during command execution",
            "examples": [
              "UNREACHABLE_INPUT_FILE"
            ]
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message",
            "description": "Error details if the command failed",
            "examples": [
              "Input file url https://rendi.dev/example does not have a valid file name in its' end."
            ]
          },
          "status": {
            "$ref": "#/components/schemas/CommandStatus",
            "description": "Current status of the FFmpeg command",
            "examples": [
              "SUCCESS"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Time when the command was created, in UTC",
            "examples": [
              "2024-01-01T00:00:00Z"
            ]
          },
          "ffmpeg_command_run_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ffmpeg Command Run Seconds",
            "description": "The exact time the specific FFMPEG command took on our servers, in seconds"
          },
          "processing_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Processing Seconds",
            "description": "Total processing time from queue to finish, in seconds (finished_at - queued_at)"
          }
        },
        "type": "object",
        "required": [
          "command_id",
          "status"
        ],
        "title": "CommandsListItemResponse",
        "description": "Response model for FFmpeg command list request.\n\nContains information about the commands sent to the server, execution status, any errors that occurred\nand the time when the command was created.",
        "example": {
          "command_id": "123e4567-e89b-12d3-a456-426614174000",
          "created_at": "2024-01-01T00:00:00Z",
          "environment_name": "main",
          "ffmpeg_command_run_seconds": 19.58,
          "output_file_count": 2,
          "processing_quota_used": 2.4,
          "processing_seconds": 24.96,
          "status": "SUCCESS",
          "storage_quota_used": 0.85
        }
      },
      "CompleteUploadRequest": {
        "properties": {
          "parts": {
            "items": {
              "$ref": "#/components/schemas/UploadPart"
            },
            "type": "array",
            "minItems": 1,
            "title": "Parts",
            "description": "One entry per uploaded part, in order. Every part_number from 1 to N must be present."
          }
        },
        "type": "object",
        "required": [
          "parts"
        ],
        "title": "CompleteUploadRequest"
      },
      "FFmpegChainedCommandsRequest": {
        "properties": {
          "input_files": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Input Files",
            "description": "Dictionary mapping file aliases to their publicly accessible paths, \n        file name should appear in the end of the url, keys are alphanumeric, with underscore allowed, must start with 'in_'. \n        You can use public file urls, google drive, dropbox, rendi stored files, s3 stored files, etc. as long as they are publicly accessible.",
            "examples": [
              {
                "in_1": "https://storage.rendi.dev/sample/big_buck_bunny_720p_5sec_intro.mp4",
                "in_2": "https://storage.rendi.dev/sample/big_buck_bunny_720p_5sec_outro.mp4"
              }
            ]
          },
          "output_files": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Output Files",
            "description": "Dictionary mapping file aliases to their desired output file names, keys are alphanumeric, with underscore allowed, must start with 'out_'",
            "examples": [
              {
                "out_1": "output_one.mp4",
                "out_2": "output_two.mp4"
              }
            ]
          },
          "max_command_run_seconds": {
            "type": "number",
            "exclusiveMinimum": 0.0,
            "title": "Max Command Run Seconds",
            "description": "Maximum allowed runtime in seconds for a single FFmpeg command, the default is 300 seconds",
            "examples": [
              300.0
            ]
          },
          "vcpu_count": {
            "type": "integer",
            "exclusiveMinimum": 0.0,
            "title": "Vcpu Count",
            "description": "Number of virtual CPUs to use for a single ffmpeg command, the default is 8, up to your account's maximum. Multiple commands can run in parallel as long as their total vCPU usage doesn't exceed your quota.",
            "examples": [
              8
            ]
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "integer"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    }
                  ]
                },
                "type": "object",
                "maxProperties": 10,
                "minProperties": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata",
            "description": "Metadata to be stored with the command, useful for webhooks and custom tracking and reporting. Up to 10 key-value pairs; each key and each string value must be at most 512 characters.",
            "examples": [
              {
                "key": "value"
              }
            ]
          },
          "is_private": {
            "type": "boolean",
            "title": "Is Private",
            "description": "If true, the command's output files are placed in private storage and can only be downloaded via a presigned URL (request one by passing `presigned_ttl_seconds` on the poll endpoint). Not available on free plans.",
            "default": false,
            "examples": [
              false
            ]
          },
          "ffmpeg_commands": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Ffmpeg Commands",
            "description": "FFmpeg command strings using {{alias}} placeholders for input and output files. Each string is a separate ffmpeg command. Can contain up to 10 commands. The output files will be stored in storage for later access.\nInput files can be used in all specified commands. Output files from previous commands can be used as input files in later commands. If you wish to use an output file from a previous command as input file in a later command, make sure to use `-i` right before the output file alias.\nInput file keys should start with 'in_' prefix, for example: in_video1. Output file keys should start with 'out_' prefix, for example: out_1.\nIf you're using an automation platform where curly brackets are used special as characters (like make.com, zapier, or other) add backslashes before the curly brackets, for example, replace {{in_1}} with backslashes and brackets \\\\{\\\\{in_1\\\\}\\\\}.",
            "examples": [
              [
                "-i {{in_1}} -i {{in_2}} -filter_complex \"[0:v][1:v]hstack=inputs=2[v]\" -map \"[v]\" {{out_1}}",
                "-i {{out_1}} -ss 00:17 -vframes 1 {{out_2}}"
              ]
            ]
          }
        },
        "type": "object",
        "required": [
          "input_files",
          "output_files",
          "ffmpeg_commands"
        ],
        "title": "FFmpegChainedCommandsRequest",
        "description": "Request model for submitting chained FFmpeg commands.\n\nThis model allows submitting multiple FFmpeg commands that run sequentially. Input files can be shared between commands. Output files from earlier commands\ncan be used as inputs to later commands.",
        "example": {
          "ffmpeg_commands": [
            "-i {{in_1}} -i {{in_2}} -filter_complex \"[0:v][1:v]hstack=inputs=2[v]\" -map [v] {{out_1}}",
            "-i {{out_1}} -vframes 1 {{out_2}}"
          ],
          "input_files": {
            "in_1": "https://storage.rendi.dev/sample/big_buck_bunny_720p_5sec_intro.mp4",
            "in_2": "https://storage.rendi.dev/sample/big_buck_bunny_720p_5sec_outro.mp4"
          },
          "max_command_run_seconds": 300.0,
          "metadata": {
            "key": "value"
          },
          "output_files": {
            "out_1": "output_concatenated.mp4",
            "out_2": "thumbnail.jpg"
          },
          "vcpu_count": 8
        }
      },
      "FFmpegCommandRequest": {
        "properties": {
          "input_files": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Files",
            "description": "Dictionary mapping file aliases to their publicly accessible paths, \n        file name should appear in the end of the url, keys are alphanumeric, with underscore allowed, must start with 'in_'. \n        You can use public file urls, google drive, dropbox, rendi stored files, s3 stored files, etc. as long as they are publicly accessible. \n        If not available, input_compressed_folder has to be provided",
            "examples": [
              {
                "in_1": "https://storage.rendi.dev/sample/big_buck_bunny_720p_5sec_intro.mp4",
                "in_2": "https://storage.rendi.dev/sample/big_buck_bunny_720p_5sec_outro.mp4"
              }
            ]
          },
          "output_files": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "string",
                "const": "OUTPUT_FOLDER"
              }
            ],
            "title": "Output Files",
            "description": "Dictionary mapping file aliases to their desired output file names, keys are alphanumeric, with underscore allowed, must start with 'out_'. Or, the literal string 'OUTPUT_FOLDER' indicating compressed folder output.",
            "examples": [
              {
                "out_1": "output_one.mp4",
                "out_2": "output_two.mp4"
              },
              "OUTPUT_FOLDER"
            ]
          },
          "max_command_run_seconds": {
            "type": "number",
            "exclusiveMinimum": 0.0,
            "title": "Max Command Run Seconds",
            "description": "Maximum allowed runtime in seconds for a single FFmpeg command, the default is 300 seconds",
            "examples": [
              300.0
            ]
          },
          "vcpu_count": {
            "type": "integer",
            "exclusiveMinimum": 0.0,
            "title": "Vcpu Count",
            "description": "Number of virtual CPUs to use for a single ffmpeg command, the default is 8, up to your account's maximum. Multiple commands can run in parallel as long as their total vCPU usage doesn't exceed your quota.",
            "examples": [
              8
            ]
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "integer"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    }
                  ]
                },
                "type": "object",
                "maxProperties": 10,
                "minProperties": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata",
            "description": "Metadata to be stored with the command, useful for webhooks and custom tracking and reporting. Up to 10 key-value pairs; each key and each string value must be at most 512 characters.",
            "examples": [
              {
                "key": "value"
              }
            ]
          },
          "is_private": {
            "type": "boolean",
            "title": "Is Private",
            "description": "If true, the command's output files are placed in private storage and can only be downloaded via a presigned URL (request one by passing `presigned_ttl_seconds` on the poll endpoint). Not available on free plans.",
            "default": false,
            "examples": [
              false
            ]
          },
          "input_compressed_folder": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Compressed Folder",
            "description": "A single compressed zip archive containing input media files. \n        Provide either this field or input_files, but not both. Value should be a publicly accessible URL or a rendi storage URL.\n        This field is only available for single FFmpeg commands, not chained commands.",
            "examples": [
              "https://storage.rendi.dev/sample/playlist_sample.zip"
            ]
          },
          "ffmpeg_command": {
            "type": "string",
            "title": "Ffmpeg Command",
            "description": "FFmpeg command string using {{alias}} placeholders for input and output files.\nInput file keys should start with 'in_' prefix, for example: in_video1. Output file keys should start with 'out_' prefix, for example: out_1.\nIf you're using an automation platform where curly brackets are used special as characters (like make.com, zapier, or other) add backslashes before the curly brackets, for example, replace {{in_1}} with backslashes and brackets \\\\{\\\\{in_1\\\\}\\\\}.",
            "examples": [
              "-i {{in_1}} -i {{in_2}} -filter_complex \"[0:v][1:v]hstack=inputs=2[v]\" -map [v] {{out_1}}"
            ]
          }
        },
        "type": "object",
        "required": [
          "output_files",
          "ffmpeg_command"
        ],
        "title": "FFmpegCommandRequest",
        "description": "Request model for submitting a single FFmpeg command.\n\nThis model allows submitting an FFmpeg command with input and output file specifications.\nInput file aliases must start with 'in_' and direct to a publicly accessible file, and\noutput file aliases must start with 'out_' and only name a file name to be created.\n\nIf you're using an automation platform where curly brackets are used special as characters\n(like make.com, zapier, or other) add backslashes before the curly brackets, for example, replace {{in_1}} with backslashes and brackets \\\\{\\\\{in_1\\\\}\\\\}.",
        "example": {
          "ffmpeg_command": "-i {{in_1}} -vf \"select='lte(t,60)*gt(trunc(t/10),trunc(prev_t/10))',setpts='PTS*0.025',scale=trunc(oh*a/2)*2:320:force_original_aspect_ratio=decrease,pad=trunc(oh*a/2)*2:320:-1:-1\" -an -vsync vfr {{out_1}}",
          "input_files": {
            "in_1": "https://storage.rendi.dev/sample/sample.avi"
          },
          "max_command_run_seconds": 300.0,
          "metadata": {
            "key": "value"
          },
          "output_files": {
            "out_1": "output1.gif"
          },
          "vcpu_count": 8
        }
      },
      "FileStatus": {
        "type": "string",
        "enum": [
          "QUEUED",
          "DOWNLOADING",
          "DOWNLOADED",
          "UPLOADED",
          "FAILED",
          "STORED"
        ],
        "title": "FileStatus"
      },
      "FileStoreRequest": {
        "properties": {
          "file_url": {
            "type": "string",
            "title": "File Url",
            "description": "URL to the publicly accessible file. You can use public file urls, google drive, dropbox, rendi stored files, s3 stored files,\n        etc. as long as they are publicly accessible.",
            "examples": [
              "https://storage.rendi.dev/sample/sample.avi"
            ]
          },
          "is_private": {
            "type": "boolean",
            "title": "Is Private",
            "description": "If true, the stored file is placed in private storage and can only be downloaded via a presigned URL (request one by passing `presigned_ttl_seconds` on the poll endpoint). Not available on trial plans.",
            "default": false,
            "examples": [
              false
            ]
          }
        },
        "type": "object",
        "required": [
          "file_url"
        ],
        "title": "FileStoreRequest"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "InitUploadRequest": {
        "properties": {
          "filename": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "pattern": "^[a-zA-Z0-9_.\\-]+$",
            "title": "Filename",
            "description": "The filename to store. Only alphanumeric characters, underscores, dashes, and dots are allowed.",
            "examples": [
              "my_video.mp4"
            ]
          },
          "size_bytes": {
            "type": "integer",
            "maximum": 5497558138880.0,
            "exclusiveMinimum": 0.0,
            "title": "Size Bytes",
            "description": "Total size of the file in bytes. Used to size the multipart chunks and verify quota up front. Maximum 5 TB.",
            "examples": [
              104857600
            ]
          },
          "is_private": {
            "type": "boolean",
            "title": "Is Private",
            "description": "If true, the uploaded file is placed in private storage and can only be downloaded via a presigned URL (request one by passing `presigned_ttl_seconds` on the files /get endpoint). Not available on trial plans.",
            "default": false,
            "examples": [
              false
            ]
          },
          "part_size": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Part Size",
            "description": "Requested per-part size in bytes. Optional. If not set, a sensible default is used. If the requested value is below 5 MB it's raised to 5 MB; if above 5 GB or too small for the file to fit in the allowed number of parts, it's clamped accordingly. The value actually used is returned in the response.",
            "examples": [
              10485760
            ]
          }
        },
        "type": "object",
        "required": [
          "filename",
          "size_bytes"
        ],
        "title": "InitUploadRequest"
      },
      "InitUploadResponse": {
        "properties": {
          "file_id": {
            "type": "string",
            "title": "File Id",
            "description": "Unique identifier for the uploaded file. Use it in `complete-upload` / `abort-upload` and to poll `GET /files/{file_id}`.",
            "examples": [
              "987fcdeb-a89b-43d3-b456-789012345678"
            ]
          },
          "part_size": {
            "type": "integer",
            "title": "Part Size",
            "description": "Byte size for every part except the last (which is the remainder). Split your file into chunks of exactly this size and PUT each chunk to the matching URL in `upload_urls`.",
            "examples": [
              10485760
            ]
          },
          "upload_urls": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Upload Urls",
            "description": "Presigned PUT URLs, one per part. Send part 1 to `upload_urls[0]`, part 2 to `upload_urls[1]`, and so on. Each response's `ETag` header must be sent back in `complete-upload`."
          }
        },
        "type": "object",
        "required": [
          "file_id",
          "part_size",
          "upload_urls"
        ],
        "title": "InitUploadResponse"
      },
      "RendiBaseStoredFile": {
        "properties": {
          "file_id": {
            "type": "string",
            "title": "File Id",
            "description": "Unique identifier for the stored file",
            "examples": [
              "987fcdeb-a89b-43d3-b456-789012345678"
            ]
          },
          "environment_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment Name",
            "description": "The environment this file was stored in (e.g., 'main', 'test', 'dev').",
            "examples": [
              "main"
            ]
          },
          "storage_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Storage Url",
            "description": "URL where the file is stored",
            "examples": [
              "https://storage.rendi.dev/123e4567-e89b-12d3-a456-426614174000/output.avi"
            ]
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FileStatus"
              },
              {
                "type": "null"
              }
            ],
            "description": "Status of the file",
            "examples": [
              "STORED"
            ]
          },
          "rendi_store_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RendiFileStoreType"
              },
              {
                "type": "null"
              }
            ],
            "description": "Type of storage of the file in rendi",
            "examples": [
              "STORED_FILE"
            ]
          },
          "error_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Status",
            "description": "Status of any error that occurred during file processing",
            "examples": [
              "UNREACHABLE_INPUT_FILE"
            ]
          },
          "external_error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Error Message",
            "description": "Error details if the file failed to be processed",
            "examples": [
              "Input file url https://rendi.dev/example is not reachable."
            ]
          },
          "is_deleted": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Deleted",
            "description": "Whether the file has been deleted",
            "examples": [
              false
            ]
          },
          "size_mbytes": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size Mbytes",
            "description": "Size of the output file or folder in megabytes",
            "examples": [
              15.2
            ]
          },
          "file_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Count",
            "description": "Number of files in the output folder/playlist",
            "examples": [
              5
            ]
          },
          "size_compressed_mbytes": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size Compressed Mbytes",
            "description": "Size of the output compressed folder in megabytes",
            "examples": [
              15.2
            ]
          },
          "is_private": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Private",
            "description": "Whether the file is stored privately. Private files are accessible via their `storage_url` only if you request a presigned URL by passing `presigned_ttl_seconds` on `GET /v1/files/{file_id}` (for a single file) or `GET /v1/commands/{command_id}` (for a command's output files) to receive a time-limited downloadable URL. Not available on free plans.",
            "examples": [
              false
            ]
          }
        },
        "type": "object",
        "required": [
          "file_id"
        ],
        "title": "RendiBaseStoredFile",
        "description": "Represents a file stored by rendi. Could either be an uploaded file or a file generated by running a command.\n\nBasic model containing file location size and id."
      },
      "RendiFileStoreType": {
        "type": "string",
        "enum": [
          "INPUT",
          "OUTPUT",
          "STORED_FILE"
        ],
        "title": "RendiFileStoreType"
      },
      "RendiStoredFile": {
        "properties": {
          "file_id": {
            "type": "string",
            "title": "File Id",
            "description": "Unique identifier for the stored file",
            "examples": [
              "987fcdeb-a89b-43d3-b456-789012345678"
            ]
          },
          "environment_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment Name",
            "description": "The environment this file was stored in (e.g., 'main', 'test', 'dev').",
            "examples": [
              "main"
            ]
          },
          "storage_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Storage Url",
            "description": "URL where the file is stored",
            "examples": [
              "https://storage.rendi.dev/123e4567-e89b-12d3-a456-426614174000/output.avi"
            ]
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FileStatus"
              },
              {
                "type": "null"
              }
            ],
            "description": "Status of the file",
            "examples": [
              "STORED"
            ]
          },
          "rendi_store_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RendiFileStoreType"
              },
              {
                "type": "null"
              }
            ],
            "description": "Type of storage of the file in rendi",
            "examples": [
              "STORED_FILE"
            ]
          },
          "error_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Status",
            "description": "Status of any error that occurred during file processing",
            "examples": [
              "UNREACHABLE_INPUT_FILE"
            ]
          },
          "external_error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Error Message",
            "description": "Error details if the file failed to be processed",
            "examples": [
              "Input file url https://rendi.dev/example is not reachable."
            ]
          },
          "is_deleted": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Deleted",
            "description": "Whether the file has been deleted",
            "examples": [
              false
            ]
          },
          "size_mbytes": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size Mbytes",
            "description": "Size of the output file or folder in megabytes",
            "examples": [
              15.2
            ]
          },
          "file_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Count",
            "description": "Number of files in the output folder/playlist",
            "examples": [
              5
            ]
          },
          "size_compressed_mbytes": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size Compressed Mbytes",
            "description": "Size of the output compressed folder in megabytes",
            "examples": [
              15.2
            ]
          },
          "is_private": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Private",
            "description": "Whether the file is stored privately. Private files are accessible via their `storage_url` only if you request a presigned URL by passing `presigned_ttl_seconds` on `GET /v1/files/{file_id}` (for a single file) or `GET /v1/commands/{command_id}` (for a command's output files) to receive a time-limited downloadable URL. Not available on free plans.",
            "examples": [
              false
            ]
          },
          "original_file_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Original File Url",
            "description": "URL of the original file (or just name in case of uploaded file)",
            "examples": [
              "https://somehwereonline.stored.com/file_to_store.mp4"
            ]
          },
          "duration": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration",
            "description": "Duration of the media file in seconds",
            "examples": [
              30.5
            ]
          },
          "file_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Type",
            "description": "Type of the media file (video, audio, image, subtitles, etc.)",
            "examples": [
              "video"
            ]
          },
          "file_format": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Format",
            "description": "Format/container of the media file",
            "examples": [
              "avi"
            ]
          },
          "width": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Width",
            "description": "Width of the video in pixels",
            "examples": [
              1920
            ]
          },
          "height": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Height",
            "description": "Height of the video in pixels",
            "examples": [
              1080
            ]
          },
          "codec": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Codec",
            "description": "Codec used for the media file",
            "examples": [
              "msmpeg4v2"
            ]
          },
          "timebase": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timebase",
            "description": "How time is represented in the media file",
            "examples": [
              "1/25"
            ]
          },
          "pixel_format": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pixel Format",
            "description": "How the pixel data is stored in the media file",
            "examples": [
              "yuv420p"
            ]
          },
          "mime_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mime Type",
            "description": "MIME type of the media file",
            "examples": [
              "video/mp4"
            ]
          },
          "frame_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Frame Rate",
            "description": "Frame rate of the video in frames per second",
            "examples": [
              30.0
            ]
          },
          "bitrate_video_kb": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bitrate Video Kb",
            "description": "Video bitrate in kilobits per second",
            "examples": [
              4000.0
            ]
          },
          "bitrate_audio_kb": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bitrate Audio Kb",
            "description": "Audio bitrate in kilobits per second",
            "examples": [
              128.0
            ]
          },
          "video_profile_level": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Video Profile Level",
            "description": "Video profile level",
            "examples": [
              "main"
            ]
          },
          "is_varying_frame_rate": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Varying Frame Rate",
            "description": "Whether the video has a variable frame rate",
            "examples": [
              false
            ]
          }
        },
        "type": "object",
        "required": [
          "file_id"
        ],
        "title": "RendiStoredFile",
        "description": "Represents a file stored by rendi. Could either be an uploaded file or a file generated by running a command.\n\nThis model contains metadata about files stored in rendi storage, including file details,\nmedia information, and storage location.",
        "example": {
          "bitrate_audio_kb": 128.0,
          "bitrate_video_kb": 4000.0,
          "codec": "h264",
          "duration": 30.0,
          "environment_name": "main",
          "file_format": "mp4",
          "file_id": "987fcdeb-a89b-43d3-b456-789012345678",
          "file_type": "video",
          "frame_rate": 30.0,
          "height": 1080,
          "is_deleted": false,
          "is_varying_frame_rate": false,
          "mime_type": "video/mp4",
          "original_file_url": "https://storage.rendi.dev/sample/big_buck_bunny_720p_5sec_intro.mp4",
          "pixel_format": "yuv420p",
          "rendi_store_type": "STORED_FILE",
          "size_mbytes": 2.27,
          "status": "STORED",
          "storage_url": "https://storage.rendi.dev/files/224ea098-5c10-419b-8a77-707d89443c56/987fcdeb-a89b-43d3-b456-789012345678/output.mp4",
          "timebase": "1/25",
          "video_profile_level": "main",
          "width": 1920
        }
      },
      "RendiStoredFileId": {
        "properties": {
          "file_id": {
            "type": "string",
            "title": "File Id",
            "description": "Unique identifier for the stored file",
            "examples": [
              "987fcdeb-a89b-43d3-b456-789012345678"
            ]
          }
        },
        "type": "object",
        "required": [
          "file_id"
        ],
        "title": "RendiStoredFileId"
      },
      "RunCommandResponse": {
        "properties": {
          "command_id": {
            "type": "string",
            "format": "uuid",
            "title": "Command Id",
            "description": "Unique identifier for the submitted command",
            "examples": [
              "123e4567-e89b-12d3-a456-426614174000"
            ]
          }
        },
        "type": "object",
        "required": [
          "command_id"
        ],
        "title": "RunCommandResponse",
        "description": "Response model for command submission.\n\nContains the unique identifier assigned to the submitted command that can be used\nto poll for status and retrieve results."
      },
      "UploadPart": {
        "properties": {
          "part_number": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Part Number",
            "description": "1-based part number, matching the index in `upload_urls`.",
            "examples": [
              1
            ]
          },
          "etag": {
            "type": "string",
            "title": "Etag",
            "description": "ETag returned by R2 in the response of the part's PUT request.",
            "examples": [
              "\"7d865e959b2466918c9863afca942d0f\""
            ]
          }
        },
        "type": "object",
        "required": [
          "part_number",
          "etag"
        ],
        "title": "UploadPart"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "APIKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY"
      }
    }
  }
}