{
  "openapi": "3.1.0",
  "info": {
    "title": "Project",
    "description": "API service for App Factory reusable modules",
    "version": "1.0.0",
    "x-source-commit": "f33cc2b935f31b36240d724948dc8b9c765430cc"
  },
  "paths": {
    "/api/v1/project/projects": {
      "post": {
        "tags": [
          "project"
        ],
        "summary": "创建项目",
        "description": "创建新的项目 (支持 generic, image, video, tool)",
        "operationId": "create_project_api_v1_project_projects_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "project"
        ],
        "summary": "获取项目列表",
        "description": "获取当前用户的项目列表",
        "operationId": "list_projects_api_v1_project_projects_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "项目类型过滤",
              "title": "Project Type"
            },
            "description": "项目类型过滤"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "状态过滤",
              "title": "Status"
            },
            "description": "状态过滤"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "页码",
              "default": 1,
              "title": "Page"
            },
            "description": "页码"
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "description": "每页数量",
              "default": 20,
              "title": "Page Size"
            },
            "description": "每页数量"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/project/projects/{project_id}": {
      "get": {
        "tags": [
          "project"
        ],
        "summary": "获取项目详情",
        "description": "获取项目详情（含消息历史和业务数据）",
        "operationId": "get_project_api_v1_project_projects__project_id__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectDetailResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "project"
        ],
        "summary": "更新项目",
        "description": "更新项目基本信息和配置",
        "operationId": "update_project_api_v1_project_projects__project_id__put",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Project Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "project"
        ],
        "summary": "删除项目",
        "description": "删除项目",
        "operationId": "delete_project_api_v1_project_projects__project_id__delete",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/project/projects/{project_id}/chat": {
      "post": {
        "tags": [
          "project"
        ],
        "summary": "发送聊天消息",
        "description": "与 Agent 进行对话",
        "operationId": "chat_with_agent_api_v1_project_projects__project_id__chat_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Project Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentChatRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentChatResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/project/projects/{project_id}/generate": {
      "post": {
        "tags": [
          "project"
        ],
        "summary": "生成内容",
        "description": "触发内容生成",
        "operationId": "generate_content_api_v1_project_projects__project_id__generate_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Project Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentGenerateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentGenerateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/project/projects/{project_id}/assets": {
      "get": {
        "tags": [
          "project"
        ],
        "summary": "获取项目资产列表",
        "description": "获取项目的资产列表",
        "operationId": "get_project_assets_api_v1_project_projects__project_id__assets_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MediaAssetResponse"
                  },
                  "title": "Response Get Project Assets Api V1 Project Projects  Project Id  Assets Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "project"
        ],
        "summary": "添加资产",
        "description": "向项目添加资产",
        "operationId": "add_project_asset_api_v1_project_projects__project_id__assets_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Project Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddAssetRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaAssetResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/project/projects/{project_id}/assets/{asset_id}": {
      "delete": {
        "tags": [
          "project"
        ],
        "summary": "删除资产",
        "description": "从项目删除资产",
        "operationId": "delete_project_asset_api_v1_project_projects__project_id__assets__asset_id__delete",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Project Id"
            }
          },
          {
            "name": "asset_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Asset Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/project/projects/{project_id}/scripts": {
      "get": {
        "tags": [
          "project"
        ],
        "summary": "获取脚本列表",
        "description": "获取项目的脚本列表",
        "operationId": "get_project_scripts_api_v1_project_projects__project_id__scripts_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ScriptSegmentResponse"
                  },
                  "title": "Response Get Project Scripts Api V1 Project Projects  Project Id  Scripts Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "project"
        ],
        "summary": "更新脚本列表",
        "description": "更新项目的脚本列表",
        "operationId": "update_project_scripts_api_v1_project_projects__project_id__scripts_put",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Project Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateScriptsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ScriptSegmentResponse"
                  },
                  "title": "Response Update Project Scripts Api V1 Project Projects  Project Id  Scripts Put"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/project/projects/{project_id}/timeline": {
      "get": {
        "tags": [
          "project"
        ],
        "summary": "获取时间线",
        "description": "获取项目的时间线",
        "operationId": "get_project_timeline_api_v1_project_projects__project_id__timeline_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimelineResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "project"
        ],
        "summary": "更新时间线",
        "description": "更新项目的时间线",
        "operationId": "update_project_timeline_api_v1_project_projects__project_id__timeline_put",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Project Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTimelineRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimelineResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/project/projects/{project_id}/export": {
      "post": {
        "tags": [
          "project"
        ],
        "summary": "导出项目",
        "description": "导出项目 (支持视频导出、图片导出等)",
        "operationId": "export_project_api_v1_project_projects__project_id__export_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Project Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectExportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectExportResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AddAssetRequest": {
        "properties": {
          "asset": {
            "$ref": "#/components/schemas/MediaAssetCreate",
            "description": "资产信息"
          }
        },
        "type": "object",
        "required": [
          "asset"
        ],
        "title": "AddAssetRequest",
        "description": "添加资产请求"
      },
      "AgentChatRequest": {
        "properties": {
          "message": {
            "type": "string",
            "minLength": 1,
            "title": "Message",
            "description": "用户消息"
          },
          "attachments": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attachments",
            "description": "附件"
          }
        },
        "type": "object",
        "required": [
          "message"
        ],
        "title": "AgentChatRequest",
        "description": "Agent 聊天请求"
      },
      "AgentChatResponse": {
        "properties": {
          "message": {
            "$ref": "#/components/schemas/AgentMessageResponse",
            "description": "Agent 回复"
          },
          "project_status": {
            "type": "string",
            "title": "Project Status",
            "description": "项目状态"
          }
        },
        "type": "object",
        "required": [
          "message",
          "project_status"
        ],
        "title": "AgentChatResponse",
        "description": "Agent 聊天响应"
      },
      "AgentGenerateRequest": {
        "properties": {
          "prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt",
            "description": "生成提示词"
          },
          "config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config",
            "description": "生成配置"
          }
        },
        "type": "object",
        "title": "AgentGenerateRequest",
        "description": "Agent 生成请求"
      },
      "AgentGenerateResponse": {
        "properties": {
          "task_id": {
            "type": "string",
            "title": "Task Id",
            "description": "任务ID"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "状态: pending, processing, completed, failed"
          },
          "progress": {
            "type": "integer",
            "title": "Progress",
            "description": "进度百分比",
            "default": 0
          },
          "result": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result",
            "description": "生成结果"
          }
        },
        "type": "object",
        "required": [
          "task_id",
          "status"
        ],
        "title": "AgentGenerateResponse",
        "description": "Agent 生成响应"
      },
      "AgentMessageResponse": {
        "properties": {
          "role": {
            "type": "string",
            "title": "Role",
            "description": "角色: user, agent, system"
          },
          "content": {
            "type": "string",
            "title": "Content",
            "description": "消息内容"
          },
          "attachments": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attachments",
            "description": "附件列表"
          },
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "消息ID"
          },
          "project_id": {
            "type": "integer",
            "title": "Project Id",
            "description": "项目ID"
          },
          "tool_calls": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Calls",
            "description": "工具调用记录"
          },
          "tool_results": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Results",
            "description": "工具执行结果"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "状态",
            "default": "completed"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "创建时间"
          }
        },
        "type": "object",
        "required": [
          "role",
          "content",
          "id",
          "project_id",
          "created_at"
        ],
        "title": "AgentMessageResponse",
        "description": "Agent 消息响应"
      },
      "ClipCreate": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ClipType"
          },
          "start": {
            "type": "number",
            "title": "Start",
            "description": "开始时间(秒)"
          },
          "end": {
            "type": "number",
            "title": "End",
            "description": "结束时间(秒)"
          },
          "content": {
            "type": "string",
            "title": "Content",
            "description": "片段内容(文本或资产ID)"
          },
          "thumbnail_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thumbnail Url",
            "description": "缩略图"
          }
        },
        "type": "object",
        "required": [
          "type",
          "start",
          "end",
          "content"
        ],
        "title": "ClipCreate",
        "description": "创建片段"
      },
      "ClipResponse": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ClipType"
          },
          "start": {
            "type": "number",
            "title": "Start",
            "description": "开始时间(秒)"
          },
          "end": {
            "type": "number",
            "title": "End",
            "description": "结束时间(秒)"
          },
          "content": {
            "type": "string",
            "title": "Content",
            "description": "片段内容(文本或资产ID)"
          },
          "thumbnail_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thumbnail Url",
            "description": "缩略图"
          },
          "id": {
            "type": "string",
            "title": "Id",
            "description": "片段ID"
          }
        },
        "type": "object",
        "required": [
          "type",
          "start",
          "end",
          "content",
          "id"
        ],
        "title": "ClipResponse",
        "description": "片段响应"
      },
      "ClipType": {
        "type": "string",
        "enum": [
          "text",
          "video",
          "audio",
          "image"
        ],
        "title": "ClipType",
        "description": "片段类型"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "MediaAssetCreate": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/MediaType"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "资产名称"
          },
          "url": {
            "type": "string",
            "title": "Url",
            "description": "资产URL"
          },
          "thumbnail_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thumbnail Url",
            "description": "缩略图URL"
          },
          "duration": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration",
            "description": "时长(秒)"
          },
          "width": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Width",
            "description": "宽度"
          },
          "height": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Height",
            "description": "高度"
          }
        },
        "type": "object",
        "required": [
          "type",
          "name",
          "url"
        ],
        "title": "MediaAssetCreate",
        "description": "创建媒体资产"
      },
      "MediaAssetResponse": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/MediaType"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "资产名称"
          },
          "url": {
            "type": "string",
            "title": "Url",
            "description": "资产URL"
          },
          "thumbnail_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thumbnail Url",
            "description": "缩略图URL"
          },
          "duration": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration",
            "description": "时长(秒)"
          },
          "width": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Width",
            "description": "宽度"
          },
          "height": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Height",
            "description": "高度"
          },
          "id": {
            "type": "string",
            "title": "Id",
            "description": "资产ID"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "创建时间"
          }
        },
        "type": "object",
        "required": [
          "type",
          "name",
          "url",
          "id",
          "created_at"
        ],
        "title": "MediaAssetResponse",
        "description": "媒体资产响应"
      },
      "MediaType": {
        "type": "string",
        "enum": [
          "video",
          "image",
          "audio"
        ],
        "title": "MediaType",
        "description": "媒体类型"
      },
      "ProjectCreate": {
        "properties": {
          "project_type": {
            "type": "string",
            "title": "Project Type",
            "description": "项目类型: image, video"
          },
          "title": {
            "type": "string",
            "maxLength": 200,
            "title": "Title",
            "description": "项目标题"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "项目描述"
          },
          "config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config",
            "description": "项目配置"
          },
          "initial_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Initial Message",
            "description": "初始消息"
          },
          "aspect_ratio": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Aspect Ratio",
            "description": "画面比例 (视频项目)"
          }
        },
        "type": "object",
        "required": [
          "project_type",
          "title"
        ],
        "title": "ProjectCreate",
        "description": "创建项目"
      },
      "ProjectDetailResponse": {
        "properties": {
          "project_type": {
            "type": "string",
            "title": "Project Type",
            "description": "项目类型: image, video"
          },
          "title": {
            "type": "string",
            "maxLength": 200,
            "title": "Title",
            "description": "项目标题"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "项目描述"
          },
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "项目ID"
          },
          "user_id": {
            "type": "integer",
            "title": "User Id",
            "description": "用户ID"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "状态",
            "default": "draft"
          },
          "config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config",
            "description": "项目配置"
          },
          "result": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result",
            "description": "生成结果"
          },
          "thumbnail_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thumbnail Url",
            "description": "缩略图"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "创建时间"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At",
            "description": "更新时间"
          },
          "data": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Data",
            "description": "反序列化后的项目数据"
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/AgentMessageResponse"
            },
            "type": "array",
            "title": "Messages",
            "description": "消息列表"
          }
        },
        "type": "object",
        "required": [
          "project_type",
          "title",
          "id",
          "user_id",
          "created_at",
          "updated_at"
        ],
        "title": "ProjectDetailResponse",
        "description": "项目详情响应（含消息）"
      },
      "ProjectExportRequest": {
        "properties": {
          "format": {
            "type": "string",
            "title": "Format",
            "description": "导出格式: png, jpg, mp4, webm",
            "default": "mp4"
          },
          "quality": {
            "type": "string",
            "title": "Quality",
            "description": "质量: low, medium, high",
            "default": "high"
          },
          "variant_index": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Variant Index",
            "description": "变体索引"
          },
          "resolution": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolution",
            "description": "分辨率 (视频项目)"
          },
          "include_captions": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Include Captions",
            "description": "包含字幕"
          }
        },
        "type": "object",
        "title": "ProjectExportRequest",
        "description": "项目导出请求"
      },
      "ProjectExportResponse": {
        "properties": {
          "task_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Id",
            "description": "任务ID"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status",
            "description": "任务状态"
          },
          "progress": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Progress",
            "description": "任务进度"
          },
          "download_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Download Url",
            "description": "下载URL"
          },
          "file_size": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Size",
            "description": "文件大小"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At",
            "description": "过期时间"
          }
        },
        "type": "object",
        "title": "ProjectExportResponse",
        "description": "项目导出响应"
      },
      "ProjectListResponse": {
        "properties": {
          "projects": {
            "items": {
              "$ref": "#/components/schemas/ProjectResponse"
            },
            "type": "array",
            "title": "Projects",
            "description": "项目列表"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "总数"
          },
          "page": {
            "type": "integer",
            "title": "Page",
            "description": "当前页",
            "default": 1
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size",
            "description": "每页数量",
            "default": 20
          }
        },
        "type": "object",
        "required": [
          "projects",
          "total"
        ],
        "title": "ProjectListResponse",
        "description": "项目列表响应"
      },
      "ProjectResponse": {
        "properties": {
          "project_type": {
            "type": "string",
            "title": "Project Type",
            "description": "项目类型: image, video"
          },
          "title": {
            "type": "string",
            "maxLength": 200,
            "title": "Title",
            "description": "项目标题"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "项目描述"
          },
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "项目ID"
          },
          "user_id": {
            "type": "integer",
            "title": "User Id",
            "description": "用户ID"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "状态",
            "default": "draft"
          },
          "config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config",
            "description": "项目配置"
          },
          "result": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result",
            "description": "生成结果"
          },
          "thumbnail_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thumbnail Url",
            "description": "缩略图"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "创建时间"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At",
            "description": "更新时间"
          },
          "data": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Data",
            "description": "反序列化后的项目数据"
          }
        },
        "type": "object",
        "required": [
          "project_type",
          "title",
          "id",
          "user_id",
          "created_at",
          "updated_at"
        ],
        "title": "ProjectResponse",
        "description": "项目响应"
      },
      "ProjectUpdate": {
        "properties": {
          "title": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ],
            "title": "Title",
            "description": "项目标题"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "项目描述"
          },
          "config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config",
            "description": "项目配置"
          },
          "aspect_ratio": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Aspect Ratio",
            "description": "画面比例"
          },
          "caption_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Caption Enabled",
            "description": "是否显示字幕"
          }
        },
        "type": "object",
        "title": "ProjectUpdate",
        "description": "更新项目"
      },
      "ScriptSegmentCreate": {
        "properties": {
          "time_start": {
            "type": "number",
            "title": "Time Start",
            "description": "开始时间(秒)"
          },
          "time_end": {
            "type": "number",
            "title": "Time End",
            "description": "结束时间(秒)"
          },
          "text": {
            "type": "string",
            "title": "Text",
            "description": "脚本文本"
          },
          "voice_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Id",
            "description": "配音ID"
          }
        },
        "type": "object",
        "required": [
          "time_start",
          "time_end",
          "text"
        ],
        "title": "ScriptSegmentCreate",
        "description": "创建脚本片段"
      },
      "ScriptSegmentResponse": {
        "properties": {
          "time_start": {
            "type": "number",
            "title": "Time Start",
            "description": "开始时间(秒)"
          },
          "time_end": {
            "type": "number",
            "title": "Time End",
            "description": "结束时间(秒)"
          },
          "text": {
            "type": "string",
            "title": "Text",
            "description": "脚本文本"
          },
          "voice_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Id",
            "description": "配音ID"
          },
          "id": {
            "type": "string",
            "title": "Id",
            "description": "片段ID"
          }
        },
        "type": "object",
        "required": [
          "time_start",
          "time_end",
          "text",
          "id"
        ],
        "title": "ScriptSegmentResponse",
        "description": "脚本片段响应"
      },
      "TimelineCreate": {
        "properties": {
          "duration": {
            "type": "number",
            "title": "Duration",
            "description": "总时长(秒)",
            "default": 0
          },
          "playhead_position": {
            "type": "number",
            "title": "Playhead Position",
            "description": "播放头位置(秒)",
            "default": 0
          },
          "zoom_level": {
            "type": "number",
            "title": "Zoom Level",
            "description": "缩放级别",
            "default": 1.0
          },
          "tracks": {
            "items": {
              "$ref": "#/components/schemas/TrackCreate"
            },
            "type": "array",
            "title": "Tracks",
            "description": "轨道列表"
          }
        },
        "type": "object",
        "title": "TimelineCreate",
        "description": "创建时间线"
      },
      "TimelineResponse": {
        "properties": {
          "duration": {
            "type": "number",
            "title": "Duration",
            "description": "总时长(秒)",
            "default": 0
          },
          "playhead_position": {
            "type": "number",
            "title": "Playhead Position",
            "description": "播放头位置(秒)",
            "default": 0
          },
          "zoom_level": {
            "type": "number",
            "title": "Zoom Level",
            "description": "缩放级别",
            "default": 1.0
          },
          "tracks": {
            "items": {
              "$ref": "#/components/schemas/TrackResponse-Output"
            },
            "type": "array",
            "title": "Tracks",
            "description": "轨道列表"
          }
        },
        "type": "object",
        "title": "TimelineResponse",
        "description": "时间线响应"
      },
      "TrackCreate": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/TrackType"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "轨道名称"
          },
          "muted": {
            "type": "boolean",
            "title": "Muted",
            "description": "是否静音",
            "default": false
          },
          "locked": {
            "type": "boolean",
            "title": "Locked",
            "description": "是否锁定",
            "default": false
          },
          "clips": {
            "items": {
              "$ref": "#/components/schemas/ClipCreate"
            },
            "type": "array",
            "title": "Clips",
            "description": "片段列表"
          }
        },
        "type": "object",
        "required": [
          "type",
          "name"
        ],
        "title": "TrackCreate",
        "description": "创建轨道"
      },
      "TrackResponse-Output": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/TrackType"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "轨道名称"
          },
          "muted": {
            "type": "boolean",
            "title": "Muted",
            "description": "是否静音",
            "default": false
          },
          "locked": {
            "type": "boolean",
            "title": "Locked",
            "description": "是否锁定",
            "default": false
          },
          "id": {
            "type": "string",
            "title": "Id",
            "description": "轨道ID"
          },
          "clips": {
            "items": {
              "$ref": "#/components/schemas/ClipResponse"
            },
            "type": "array",
            "title": "Clips",
            "description": "片段列表"
          }
        },
        "type": "object",
        "required": [
          "type",
          "name",
          "id"
        ],
        "title": "TrackResponse",
        "description": "轨道响应"
      },
      "TrackType": {
        "type": "string",
        "enum": [
          "subtitle",
          "video",
          "voiceover",
          "music"
        ],
        "title": "TrackType",
        "description": "轨道类型"
      },
      "UpdateScriptsRequest": {
        "properties": {
          "scripts": {
            "items": {
              "$ref": "#/components/schemas/ScriptSegmentCreate"
            },
            "type": "array",
            "title": "Scripts",
            "description": "脚本列表"
          }
        },
        "type": "object",
        "required": [
          "scripts"
        ],
        "title": "UpdateScriptsRequest",
        "description": "更新脚本请求"
      },
      "UpdateTimelineRequest": {
        "properties": {
          "timeline": {
            "$ref": "#/components/schemas/TimelineCreate",
            "description": "时间线数据"
          }
        },
        "type": "object",
        "required": [
          "timeline"
        ],
        "title": "UpdateTimelineRequest",
        "description": "更新时间线请求"
      },
      "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": {
      "HTTPBearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "servers": [
    {
      "url": "https://api.sniphunter.com"
    }
  ]
}