{ "openapi": "3.1.0", "info": { "title": "陶泥儿外部编辑器 OpenAPI", "version": "1.0.0", "description": "外部系统调用陶泥儿图片画布项目、画布布局、素材库,以及图片、视频、音效、音乐等编辑器素材生成/编辑能力的 v1 契约。新建 projectId 使用 proj- 前缀,新建 taskId / operationId 使用 task- 前缀;历史 editor-project-*、aitask_*、extgen-* ID 仍可作为既有资源标识传入。" }, "servers": [ { "url": "/", "description": "当前部署环境" } ], "tags": [ { "name": "Editor Projects", "description": "图片画布项目" }, { "name": "Editor Canvas", "description": "图片画布布局" }, { "name": "Editor Assets", "description": "账号级编辑器素材库" }, { "name": "Asset Objects", "description": "素材对象上传、确认与签名读取" }, { "name": "Editor Images", "description": "编辑器美术生图" }, { "name": "Editor Videos", "description": "编辑器视频与角色动画生成" }, { "name": "Editor Audio", "description": "编辑器音效与音乐生成" } ], "paths": { "/api/external/v1/openapi.json": { "get": { "tags": [ "Editor Projects" ], "operationId": "getExternalOpenApiJson", "summary": "读取外部 API OpenAPI JSON", "security": [], "responses": { "200": { "description": "OpenAPI 3.1 JSON", "content": { "application/json": { "schema": { "type": "object" } } } } } } }, "/api/external/v1/assets/direct-upload-tickets": { "post": { "tags": [ "Asset Objects" ], "operationId": "createExternalDirectUploadTicket", "summary": "创建素材直传 OSS 凭证", "description": "为外部编辑器素材上传创建一次性 OSS 表单直传参数。上传完成后应调用 objects/confirm 确认 asset object,再创建素材记录。", "security": [ { "ExternalApiKey": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateDirectUploadTicketRequest" } } } }, "responses": { "200": { "description": "直传凭证", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateDirectUploadTicketResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" } } } }, "/api/external/v1/assets/objects/confirm": { "post": { "tags": [ "Asset Objects" ], "operationId": "confirmExternalAssetObject", "summary": "确认素材对象", "description": "确认已上传的 OSS 对象并写入 asset_object;ownerUserId 固定使用 API Key 所属账号,请求体中的 ownerUserId 会被忽略。", "security": [ { "ExternalApiKey": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConfirmAssetObjectRequest" } } } }, "responses": { "200": { "description": "素材对象记录", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConfirmAssetObjectResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" } } } }, "/api/external/v1/assets/read-url": { "get": { "tags": [ "Asset Objects" ], "operationId": "getExternalAssetReadUrl", "summary": "获取私有素材读取签名 URL", "security": [ { "ExternalApiKey": [] } ], "parameters": [ { "name": "objectKey", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "legacyPublicPath", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "expireSeconds", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1 } } ], "responses": { "200": { "description": "签名读取 URL", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetAssetReadUrlResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" } } } }, "/api/external/v1/editor/projects": { "get": { "tags": [ "Editor Projects" ], "operationId": "listEditorProjects", "summary": "列出当前账号图片画布项目", "security": [ { "ExternalApiKey": [] } ], "responses": { "200": { "description": "项目列表", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalEditorProjectListResponse" } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" } } }, "post": { "tags": [ "Editor Projects" ], "operationId": "createEditorProject", "summary": "创建图片画布项目", "security": [ { "ExternalApiKey": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalEditorProjectCreateRequest" } } } }, "responses": { "200": { "description": "已创建项目", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalEditorProjectResponse" } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" } } } }, "/api/external/v1/editor/projects/recent": { "get": { "tags": [ "Editor Projects" ], "operationId": "loadRecentEditorProject", "summary": "读取当前账号最近图片画布项目", "security": [ { "ExternalApiKey": [] } ], "responses": { "200": { "description": "最近项目;当前账号没有项目时 project 为 null", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalEditorProjectRecentResponse" } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" } } } }, "/api/external/v1/editor/projects/{projectId}": { "get": { "tags": [ "Editor Projects" ], "operationId": "getEditorProject", "summary": "读取图片画布项目", "security": [ { "ExternalApiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/ProjectId" } ], "responses": { "200": { "description": "项目快照", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalEditorProjectResponse" } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "delete": { "tags": [ "Editor Projects" ], "operationId": "deleteEditorProject", "summary": "删除图片画布项目", "description": "删除项目时级联清理默认画布与项目资源元数据。", "security": [ { "ExternalApiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/ProjectId" } ], "responses": { "200": { "description": "已删除项目", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalEditorProjectDeleteResponse" } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/api/external/v1/editor/projects/{projectId}/metadata": { "patch": { "tags": [ "Editor Projects" ], "operationId": "renameEditorProject", "summary": "更新图片画布项目标题", "security": [ { "ExternalApiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/ProjectId" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalEditorProjectRenameRequest" } } } }, "responses": { "200": { "description": "更新后的项目快照", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalEditorProjectResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/api/external/v1/editor/projects/{projectId}/canvas": { "patch": { "tags": [ "Editor Canvas" ], "operationId": "saveEditorProjectCanvas", "summary": "保存默认画布布局", "security": [ { "ExternalApiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/ProjectId" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalEditorCanvasSaveRequest" } } } }, "responses": { "200": { "description": "保存后的项目快照", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalEditorProjectResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } } } }, "/api/external/v1/editor/projects/{projectId}/resources": { "post": { "tags": [ "Editor Assets" ], "operationId": "createEditorProjectResource", "summary": "创建项目画布资源记录", "description": "把上传、生成或外部已有图片资源写入指定项目的画布资源表,供画布图层引用。", "security": [ { "ExternalApiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/ProjectId" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalEditorProjectResourceCreateRequest" } } } }, "responses": { "200": { "description": "已创建项目画布资源", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalEditorProjectResourceResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/api/external/v1/editor/assets/library": { "get": { "tags": [ "Editor Assets" ], "operationId": "getEditorAssetLibrary", "summary": "读取当前账号编辑器素材库", "security": [ { "ExternalApiKey": [] } ], "responses": { "200": { "description": "素材库快照", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalEditorAssetLibraryResponse" } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" } } } }, "/api/external/v1/editor/assets/folders": { "post": { "tags": [ "Editor Assets" ], "operationId": "createEditorAssetFolder", "summary": "创建素材文件夹", "security": [ { "ExternalApiKey": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalEditorAssetFolderCreateRequest" } } } }, "responses": { "200": { "description": "已创建素材文件夹", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalEditorAssetFolderResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" } } } }, "/api/external/v1/editor/assets/folders/{folderId}": { "patch": { "tags": [ "Editor Assets" ], "operationId": "updateEditorAssetFolder", "summary": "更新素材文件夹", "security": [ { "ExternalApiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/FolderId" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalEditorAssetFolderUpdateRequest" } } } }, "responses": { "200": { "description": "已更新素材文件夹", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalEditorAssetFolderResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "delete": { "tags": [ "Editor Assets" ], "operationId": "deleteEditorAssetFolder", "summary": "删除素材文件夹", "security": [ { "ExternalApiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/FolderId" } ], "responses": { "200": { "description": "删除后的素材库快照", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalEditorAssetFolderDeleteResponse" } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/api/external/v1/editor/assets": { "post": { "tags": [ "Editor Assets" ], "operationId": "createEditorAsset", "summary": "创建素材记录", "description": "创建账号级编辑器素材记录。图片二进制上传仍应先通过已有资产上传链路完成,随后在这里保存素材元数据。", "security": [ { "ExternalApiKey": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalEditorAssetCreateRequest" } } } }, "responses": { "200": { "description": "已创建素材", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalEditorAssetResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" } } } }, "/api/external/v1/editor/assets/{assetId}": { "patch": { "tags": [ "Editor Assets" ], "operationId": "updateEditorAsset", "summary": "更新素材名称或所在文件夹", "security": [ { "ExternalApiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/AssetId" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalEditorAssetUpdateRequest" } } } }, "responses": { "200": { "description": "已更新素材", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalEditorAssetResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "delete": { "tags": [ "Editor Assets" ], "operationId": "deleteEditorAsset", "summary": "删除素材记录", "security": [ { "ExternalApiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/AssetId" } ], "responses": { "200": { "description": "已删除素材", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalEditorAssetResponse" } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/api/external/v1/editor/images/generations": { "post": { "tags": [ "Editor Images" ], "operationId": "generateExternalEditorImage", "summary": "生成编辑器图片素材", "security": [ { "ExternalApiKey": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EditorImageGenerationRequest" } } } }, "responses": { "200": { "description": "生成结果与落库资源", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EditorImageGenerationResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "502": { "$ref": "#/components/responses/UpstreamError" } }, "description": "支持普通生图、规范图、角色图、快速编辑参考图、UI 设计图和宣发素材生成。kind 可取 spec、character、quick-edit、ui-design、publication-material。" } }, "/api/external/v1/editor/images/edits": { "post": { "tags": [ "Editor Images" ], "operationId": "editExternalEditorImage", "summary": "重绘/调整编辑器图片素材", "security": [ { "ExternalApiKey": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EditorImageEditRequest" } } } }, "responses": { "200": { "description": "重绘结果与落库资源", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EditorImageGenerationResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "502": { "$ref": "#/components/responses/UpstreamError" } } } }, "/api/external/v1/editor/icon-spritesheets/generations": { "post": { "tags": [ "Editor Images" ], "operationId": "generateExternalEditorIconSpritesheet", "summary": "按规范图生成图标 spritesheet 并尝试拆分", "security": [ { "ExternalApiKey": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EditorIconSpritesheetGenerationRequest" } } } }, "responses": { "200": { "description": "图标 spritesheet、实际切片结果、可选非阻断告警与落库资源", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EditorIconSpritesheetGenerationResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "502": { "$ref": "#/components/responses/UpstreamError" } } } }, "/api/external/v1/editor/ui-designs/assets/extractions": { "post": { "tags": [ "Editor Images" ], "operationId": "extractExternalEditorUiDesignAssets", "summary": "从 UI 设计图生成素材 spritesheet 并尝试拆分", "security": [ { "ExternalApiKey": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EditorUiDesignAssetExtractionRequest" } } } }, "responses": { "200": { "description": "UI 设计图素材 spritesheet、实际切片结果、可选非阻断告警与落库资源", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EditorIconSpritesheetGenerationResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "502": { "$ref": "#/components/responses/UpstreamError" } } } }, "/api/external/v1/editor/character-animations/generations": { "post": { "tags": [ "Editor Videos" ], "operationId": "generateExternalEditorCharacterAnimation", "summary": "生成编辑器角色动画帧", "security": [ { "ExternalApiKey": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EditorCharacterAnimationGenerationRequest" } } } }, "responses": { "200": { "description": "角色动画视频预览与抽帧结果", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EditorCharacterAnimationGenerationResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "502": { "$ref": "#/components/responses/UpstreamError" } } } }, "/api/external/v1/editor/videos/generations": { "post": { "tags": [ "Editor Videos" ], "operationId": "generateExternalEditorVideo", "summary": "生成编辑器视频素材", "security": [ { "ExternalApiKey": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EditorVideoGenerationRequest" } } } }, "responses": { "200": { "description": "视频生成结果", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EditorVideoGenerationResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "502": { "$ref": "#/components/responses/UpstreamError" } } } }, "/api/external/v1/editor/audios/sound-effects/generations": { "post": { "tags": [ "Editor Audio" ], "operationId": "generateExternalEditorSoundEffect", "summary": "生成编辑器音效素材", "security": [ { "ExternalApiKey": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EditorSoundEffectGenerationRequest" } } } }, "responses": { "200": { "description": "音效生成结果", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EditorAudioGenerationResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "502": { "$ref": "#/components/responses/UpstreamError" } } } }, "/api/external/v1/editor/audios/background-music/generations": { "post": { "tags": [ "Editor Audio" ], "operationId": "generateExternalEditorBackgroundMusic", "summary": "生成编辑器背景音乐素材", "security": [ { "ExternalApiKey": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EditorBackgroundMusicGenerationRequest" } } } }, "responses": { "200": { "description": "背景音乐生成结果", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EditorAudioGenerationResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "502": { "$ref": "#/components/responses/UpstreamError" } } } } }, "components": { "securitySchemes": { "ExternalApiKey": { "type": "http", "scheme": "bearer", "bearerFormat": "tnr_sk" } }, "parameters": { "ProjectId": { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, "FolderId": { "name": "folderId", "in": "path", "required": true, "schema": { "type": "string" } }, "AssetId": { "name": "assetId", "in": "path", "required": true, "schema": { "type": "string" } } }, "responses": { "BadRequest": { "description": "请求参数不合法", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "Unauthorized": { "description": "未授权访问", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "Forbidden": { "description": "禁止访问", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "NotFound": { "description": "资源不存在", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "Conflict": { "description": "画布 revision 冲突,需重新读取最新快照后合并或重试", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "UpstreamError": { "description": "上游生成服务失败", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "schemas": { "ExternalEditorProjectCreateRequest": { "type": "object", "properties": { "title": { "type": "string", "maxLength": 80 } }, "additionalProperties": false }, "CreateDirectUploadTicketRequest": { "type": "object", "required": [ "legacyPrefix", "fileName" ], "properties": { "legacyPrefix": { "type": "string", "description": "历史资源前缀,例如 generated-character-drafts。" }, "pathSegments": { "type": "array", "items": { "type": "string" } }, "fileName": { "type": "string" }, "contentType": { "type": [ "string", "null" ] }, "access": { "type": [ "string", "null" ], "enum": [ "public", "private", null ], "default": "private" }, "metadata": { "type": "object", "additionalProperties": { "type": "string" } }, "maxSizeBytes": { "type": [ "integer", "null" ], "minimum": 1 }, "expireSeconds": { "type": [ "integer", "null" ], "minimum": 1 }, "successActionStatus": { "type": [ "integer", "null" ], "enum": [ 200, 201, 204, null ] } }, "additionalProperties": false }, "CreateDirectUploadTicketResponse": { "type": "object", "required": [ "upload" ], "properties": { "upload": { "$ref": "#/components/schemas/DirectUploadTicket" } } }, "DirectUploadTicket": { "type": "object", "required": [ "signatureVersion", "provider", "bucket", "endpoint", "host", "objectKey", "legacyPublicPath", "access", "keyPrefix", "expiresAt", "maxSizeBytes", "successActionStatus", "formFields" ], "properties": { "signatureVersion": { "type": "string" }, "provider": { "type": "string" }, "bucket": { "type": "string" }, "endpoint": { "type": "string" }, "host": { "type": "string" }, "objectKey": { "type": "string" }, "legacyPublicPath": { "type": "string" }, "contentType": { "type": [ "string", "null" ] }, "access": { "type": "string", "enum": [ "public", "private" ] }, "keyPrefix": { "type": "string" }, "expiresAt": { "type": "string", "format": "date-time" }, "maxSizeBytes": { "type": "integer", "minimum": 1 }, "successActionStatus": { "type": "integer" }, "formFields": { "type": "object", "additionalProperties": { "type": [ "string", "null" ] } } } }, "ConfirmAssetObjectRequest": { "type": "object", "required": [ "objectKey", "assetKind" ], "properties": { "bucket": { "type": [ "string", "null" ] }, "objectKey": { "type": "string" }, "contentType": { "type": [ "string", "null" ] }, "contentLength": { "type": [ "integer", "null" ], "minimum": 0 }, "contentHash": { "type": [ "string", "null" ] }, "assetKind": { "type": "string" }, "accessPolicy": { "type": [ "string", "null" ], "enum": [ "private", "public_read", null ], "default": "private" }, "sourceJobId": { "type": [ "string", "null" ] }, "ownerUserId": { "type": [ "string", "null" ], "deprecated": true, "description": "外部接口会忽略该字段并使用 API Key 所属账号。" }, "profileId": { "type": [ "string", "null" ] }, "entityId": { "type": [ "string", "null" ] } }, "additionalProperties": false }, "ConfirmAssetObjectResponse": { "type": "object", "required": [ "assetObject" ], "properties": { "assetObject": { "$ref": "#/components/schemas/AssetObject" } } }, "AssetObject": { "type": "object", "required": [ "assetObjectId", "bucket", "objectKey", "accessPolicy", "contentLength", "version", "assetKind", "createdAt", "updatedAt" ], "properties": { "assetObjectId": { "type": "string" }, "bucket": { "type": "string" }, "objectKey": { "type": "string" }, "accessPolicy": { "type": "string" }, "contentType": { "type": [ "string", "null" ] }, "contentLength": { "type": "integer", "minimum": 0 }, "contentHash": { "type": [ "string", "null" ] }, "version": { "type": "integer", "minimum": 1 }, "sourceJobId": { "type": [ "string", "null" ] }, "ownerUserId": { "type": [ "string", "null" ] }, "profileId": { "type": [ "string", "null" ] }, "entityId": { "type": [ "string", "null" ] }, "assetKind": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } }, "GetAssetReadUrlResponse": { "type": "object", "required": [ "read" ], "properties": { "read": { "$ref": "#/components/schemas/AssetReadUrl" } } }, "AssetReadUrl": { "type": "object", "required": [ "provider", "bucket", "endpoint", "host", "objectKey", "expiresAt", "signedUrl" ], "properties": { "provider": { "type": "string" }, "bucket": { "type": "string" }, "endpoint": { "type": "string" }, "host": { "type": "string" }, "objectKey": { "type": "string" }, "expiresAt": { "type": "string", "format": "date-time" }, "signedUrl": { "type": "string" } } }, "ExternalEditorProjectRenameRequest": { "type": "object", "required": [ "title" ], "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 80 } }, "additionalProperties": false }, "ExternalEditorCanvasSaveRequest": { "type": "object", "required": [ "viewport", "layers" ], "properties": { "viewport": { "$ref": "#/components/schemas/EditorCanvasViewport" }, "layers": { "type": "array", "items": { "type": "object", "additionalProperties": true }, "description": "兼容画布布局 JSON,最大 2 MiB;服务端会拆分为结构化图层与生成对话框行。" }, "expectedRevision": { "type": "integer", "minimum": 0, "description": "可选的画布 revision CAS;不匹配时返回 409。" } }, "additionalProperties": false }, "ExternalEditorAssetFolderCreateRequest": { "type": "object", "required": [ "label" ], "properties": { "label": { "type": "string" }, "sortOrder": { "type": "integer", "minimum": 0, "default": 100 } }, "additionalProperties": false }, "ExternalEditorAssetFolderUpdateRequest": { "type": "object", "properties": { "label": { "type": "string" }, "collapsed": { "type": "boolean" } }, "additionalProperties": false }, "ExternalEditorAssetCreateRequest": { "type": "object", "required": [ "folderId", "label", "imageSrc", "width", "height", "sourceType" ], "properties": { "folderId": { "type": "string" }, "label": { "type": "string" }, "imageSrc": { "type": "string" }, "thumbnailSrc": { "type": [ "string", "null" ] }, "objectKey": { "type": [ "string", "null" ] }, "assetObjectId": { "type": [ "string", "null" ] }, "width": { "type": "integer", "minimum": 1 }, "height": { "type": "integer", "minimum": 1 }, "sourceType": { "type": "string" }, "prompt": { "type": [ "string", "null" ] }, "actualPrompt": { "type": [ "string", "null" ] }, "model": { "type": [ "string", "null" ] }, "provider": { "type": [ "string", "null" ] }, "taskId": { "type": [ "string", "null" ] }, "assetKind": { "type": [ "string", "null" ] }, "generationInputs": { "$ref": "#/components/schemas/JsonValue" } }, "additionalProperties": false }, "ExternalEditorProjectResourceCreateRequest": { "type": "object", "required": [ "imageSrc", "width", "height", "sourceType" ], "properties": { "imageSrc": { "type": "string" }, "objectKey": { "type": [ "string", "null" ] }, "assetObjectId": { "type": [ "string", "null" ] }, "width": { "type": "integer", "minimum": 1 }, "height": { "type": "integer", "minimum": 1 }, "sourceType": { "type": "string" }, "prompt": { "type": [ "string", "null" ] }, "actualPrompt": { "type": [ "string", "null" ] }, "model": { "type": [ "string", "null" ] }, "provider": { "type": [ "string", "null" ] }, "taskId": { "type": [ "string", "null" ] }, "sourceResourceId": { "type": [ "string", "null" ] }, "assetKind": { "type": [ "string", "null" ] }, "generationInputs": { "$ref": "#/components/schemas/JsonValue" } }, "additionalProperties": false }, "ExternalEditorAssetUpdateRequest": { "type": "object", "properties": { "label": { "type": "string" }, "folderId": { "type": "string" } }, "additionalProperties": false }, "ExternalEditorProjectResponse": { "type": "object", "required": [ "project" ], "properties": { "project": { "$ref": "#/components/schemas/EditorProject" } } }, "ExternalEditorProjectRecentResponse": { "type": "object", "required": [ "project" ], "properties": { "project": { "anyOf": [ { "$ref": "#/components/schemas/EditorProject" }, { "type": "null" } ] } } }, "ExternalEditorProjectListResponse": { "type": "object", "required": [ "projects" ], "properties": { "projects": { "type": "array", "items": { "$ref": "#/components/schemas/EditorProject" } } } }, "ExternalEditorProjectDeleteResponse": { "type": "object", "required": [ "deletedProjectId" ], "properties": { "deletedProjectId": { "type": "string" } } }, "ExternalEditorAssetLibraryResponse": { "type": "object", "required": [ "library" ], "properties": { "library": { "$ref": "#/components/schemas/EditorAssetLibrary" } } }, "ExternalEditorAssetFolderResponse": { "type": "object", "required": [ "folder" ], "properties": { "folder": { "$ref": "#/components/schemas/EditorAssetFolder" } } }, "ExternalEditorAssetFolderDeleteResponse": { "type": "object", "required": [ "library" ], "properties": { "library": { "$ref": "#/components/schemas/EditorAssetLibrary" } } }, "ExternalEditorAssetResponse": { "type": "object", "required": [ "asset" ], "properties": { "asset": { "$ref": "#/components/schemas/EditorAsset" } } }, "ExternalEditorProjectResourceResponse": { "type": "object", "required": [ "resource" ], "properties": { "resource": { "$ref": "#/components/schemas/EditorProjectResource" } } }, "EditorProject": { "type": "object", "required": [ "projectId", "title", "canvas", "viewport", "layers", "resources", "updatedAt" ], "properties": { "projectId": { "type": "string" }, "title": { "type": "string" }, "canvas": { "$ref": "#/components/schemas/EditorCanvas" }, "viewport": { "$ref": "#/components/schemas/EditorCanvasViewport" }, "layers": { "type": "array", "items": { "type": "object", "additionalProperties": true } }, "resources": { "type": "array", "items": { "$ref": "#/components/schemas/EditorProjectResource" } }, "updatedAt": { "type": "string", "format": "date-time" } } }, "EditorCanvas": { "type": "object", "required": [ "canvasId", "projectId", "title", "viewport", "layers", "revision", "layoutStorageVersion", "createdAt", "updatedAt" ], "properties": { "canvasId": { "type": "string" }, "projectId": { "type": "string" }, "title": { "type": "string" }, "viewport": { "$ref": "#/components/schemas/EditorCanvasViewport" }, "layers": { "type": "array", "items": { "type": "object", "additionalProperties": true } }, "revision": { "type": "integer", "minimum": 0 }, "layoutStorageVersion": { "type": "integer", "minimum": 0 }, "backgroundColor": { "type": [ "string", "null" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } }, "EditorCanvasViewport": { "type": "object", "required": [ "x", "y", "scale" ], "properties": { "x": { "type": "number" }, "y": { "type": "number" }, "scale": { "type": "number", "minimum": 0.01, "maximum": 8 } }, "additionalProperties": false }, "EditorProjectResource": { "type": "object", "required": [ "resourceId", "projectId", "imageSrc", "width", "height", "sourceType", "createdAt", "updatedAt" ], "properties": { "resourceId": { "type": "string" }, "projectId": { "type": "string" }, "imageSrc": { "type": "string" }, "objectKey": { "type": [ "string", "null" ] }, "assetObjectId": { "type": [ "string", "null" ] }, "width": { "type": "integer", "minimum": 1 }, "height": { "type": "integer", "minimum": 1 }, "sourceType": { "type": "string" }, "prompt": { "type": [ "string", "null" ] }, "actualPrompt": { "type": [ "string", "null" ] }, "model": { "type": [ "string", "null" ] }, "provider": { "type": [ "string", "null" ] }, "taskId": { "type": [ "string", "null" ] }, "sourceResourceId": { "type": [ "string", "null" ] }, "assetKind": { "type": [ "string", "null" ] }, "generationInputs": { "$ref": "#/components/schemas/JsonValue" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "ownerUserId": { "type": [ "string", "null" ] }, "authorDisplayName": { "type": [ "string", "null" ] }, "authorPublicUserCode": { "type": [ "string", "null" ] }, "publicShowcaseEnabled": { "type": "boolean" } } }, "EditorAssetLibrary": { "type": "object", "required": [ "folders", "assets" ], "properties": { "folders": { "type": "array", "items": { "$ref": "#/components/schemas/EditorAssetFolder" } }, "assets": { "type": "array", "items": { "$ref": "#/components/schemas/EditorAsset" } } } }, "EditorAssetFolder": { "type": "object", "required": [ "folderId", "label", "sortOrder", "collapsed", "systemDefault", "createdAt", "updatedAt" ], "properties": { "folderId": { "type": "string" }, "label": { "type": "string" }, "sortOrder": { "type": "integer" }, "collapsed": { "type": "boolean" }, "systemDefault": { "type": "boolean" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } }, "EditorAsset": { "type": "object", "required": [ "assetId", "folderId", "label", "imageSrc", "width", "height", "sourceType", "createdAt", "updatedAt" ], "properties": { "assetId": { "type": "string" }, "folderId": { "type": "string" }, "label": { "type": "string" }, "imageSrc": { "type": "string" }, "objectKey": { "type": [ "string", "null" ] }, "assetObjectId": { "type": [ "string", "null" ] }, "width": { "type": "integer", "minimum": 1 }, "height": { "type": "integer", "minimum": 1 }, "sourceType": { "type": "string" }, "prompt": { "type": [ "string", "null" ] }, "actualPrompt": { "type": [ "string", "null" ] }, "model": { "type": [ "string", "null" ] }, "provider": { "type": [ "string", "null" ] }, "taskId": { "type": [ "string", "null" ] }, "assetKind": { "type": [ "string", "null" ] }, "generationInputs": { "$ref": "#/components/schemas/JsonValue" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "thumbnailSrc": { "type": [ "string", "null" ] }, "sourceResourceId": { "type": [ "string", "null" ] }, "publicShowcaseEnabled": { "type": [ "boolean", "null" ] } } }, "JsonValue": { "description": "任意 JSON 值。" }, "ErrorResponse": { "type": "object", "properties": { "code": { "type": "string" }, "message": { "type": "string" }, "details": { "type": [ "object", "null" ] } } }, "EditorImageGenerationRequest": { "type": "object", "required": [ "prompt" ], "properties": { "prompt": { "type": "string", "minLength": 1 }, "screenColor": { "type": [ "string", "null" ], "description": "纯色抠像背景色。可传画布支持的纯色背景 hex(如 #CFEFFF)指定;传 \"auto\"、null 或省略则由服务端自动决策。" }, "size": { "type": "string", "description": "兼容旧 size 入参;未传 aspectRatio/imageSize 时生效。", "enum": [ "1024x1024", "1536x1024", "1024x1536", "2048x1152", "2048x2048", "2k-16:9", "1:1", "16:9", "9:16" ] }, "kind": { "type": "string", "enum": [ "spec", "character", "quick-edit", "ui-design", "publication-material" ], "default": "spec" }, "model": { "type": "string", "description": "支持 gpt-image-2、gemini-3.1-flash-image-preview、nanobanana2、nano-banana。未传时沿用编辑器默认。" }, "aspectRatio": { "type": "string", "enum": [ "1:1", "2:3", "3:2", "9:16", "16:9" ], "default": "1:1" }, "imageSize": { "type": "string", "enum": [ "0.5K", "1K", "2K" ], "default": "1K" }, "referenceImageSrcs": { "type": "array", "items": { "type": "string", "description": "当前账号的 objectKey、项目资源 ID 或素材 ID;本地临时图必须先上传 OSS 再提交。禁止 Data URL / Blob URL。普通生成最多使用前 5 张,数组上限为 9。" }, "maxItems": 9 }, "projectId": { "type": [ "string", "null" ] }, "assetKind": { "type": [ "string", "null" ] }, "generationInputs": { "$ref": "#/components/schemas/JsonValue" }, "assetFolderId": { "type": [ "string", "null" ], "description": "传 project 时写入默认项目素材文件夹;传具体 folderId 时写入该文件夹。" }, "assetLabel": { "type": [ "string", "null" ], "description": "写入素材库时使用的素材名称。" }, "sourceResourceId": { "type": [ "string", "null" ] }, "canvasCompletion": { "anyOf": [ { "$ref": "#/components/schemas/EditorCanvasGenerationCompletion" }, { "type": "null" } ], "description": "带项目上下文生成时,服务端据此直接写入画布完成态并返回最新项目快照。" } }, "additionalProperties": false }, "EditorCanvasGenerationCompletion": { "type": "object", "required": [ "title", "placeholder" ], "properties": { "dialogId": { "type": "string", "minLength": 1 }, "title": { "type": "string" }, "placeholder": { "$ref": "#/components/schemas/EditorCanvasGenerationPlaceholder" } }, "additionalProperties": false }, "EditorCanvasGenerationPlaceholder": { "type": "object", "required": [ "x", "y", "width", "height", "originalWidth", "originalHeight" ], "properties": { "x": { "type": "number" }, "y": { "type": "number" }, "width": { "type": "number", "minimum": 1 }, "height": { "type": "number", "minimum": 1 }, "originalWidth": { "type": "number", "minimum": 1 }, "originalHeight": { "type": "number", "minimum": 1 } }, "additionalProperties": false }, "EditorImageEditRequest": { "type": "object", "required": [ "prompt", "sourceImageSrc" ], "properties": { "prompt": { "type": "string", "minLength": 1 }, "sourceImageSrc": { "type": "string", "description": "待重绘/调整图片的稳定引用:当前账号的 objectKey、项目资源 ID 或素材 ID;本地临时图必须先上传 OSS。禁止 Data URL / Blob URL。" }, "projectId": { "type": [ "string", "null" ] }, "assetKind": { "type": [ "string", "null" ] }, "generationInputs": { "$ref": "#/components/schemas/JsonValue" }, "assetFolderId": { "type": [ "string", "null" ] }, "assetLabel": { "type": [ "string", "null" ] }, "sourceResourceId": { "type": [ "string", "null" ] }, "targetLayerId": { "type": [ "string", "null" ], "description": "带 projectId 且未提供 canvasCompletion 时,服务端用生成结果替换该画布图层。" }, "size": { "type": "string" }, "model": { "type": "string", "description": "支持 gpt-image-2、gemini-3.1-flash-image-preview、nanobanana2、nano-banana。" }, "aspectRatio": { "type": "string", "enum": [ "1:1", "4:3", "3:2", "2:3", "9:16", "16:9" ] }, "imageSize": { "type": "string", "enum": [ "0.5K", "1K", "2K" ] }, "referenceImageSrcs": { "type": "array", "items": { "type": "string", "description": "当前账号的 objectKey、项目资源 ID 或素材 ID;本地临时图必须先上传 OSS。禁止 Data URL / Blob URL。" }, "maxItems": 8 }, "canvasCompletion": { "anyOf": [ { "$ref": "#/components/schemas/EditorCanvasGenerationCompletion" }, { "type": "null" } ], "description": "带项目上下文生成时,服务端据此直接写入画布完成态并返回最新项目快照。" } }, "additionalProperties": false }, "EditorImageGenerationResponse": { "type": "object", "required": [ "imageSrc", "width", "height", "sourceType", "prompt", "model", "provider", "taskId" ], "properties": { "imageSrc": { "type": "string" }, "objectKey": { "type": [ "string", "null" ] }, "assetObjectId": { "type": [ "string", "null" ] }, "width": { "type": "integer", "minimum": 1 }, "height": { "type": "integer", "minimum": 1 }, "sourceType": { "type": "string", "const": "generated" }, "prompt": { "type": "string" }, "actualPrompt": { "type": [ "string", "null" ] }, "model": { "type": "string" }, "provider": { "type": "string" }, "taskId": { "type": "string" }, "resource": { "anyOf": [ { "$ref": "#/components/schemas/EditorProjectResource" }, { "type": "null" } ] }, "asset": { "anyOf": [ { "$ref": "#/components/schemas/EditorAsset" }, { "type": "null" } ] }, "project": { "anyOf": [ { "$ref": "#/components/schemas/EditorProject" }, { "type": "null" } ], "description": "当请求携带 canvasCompletion 且服务端成功写入画布布局时返回最新项目快照。" }, "warning": { "anyOf": [ { "$ref": "#/components/schemas/EditorGenerationWarning" }, { "type": "null" } ], "description": "生成成功但后处理降级时返回的非阻断告警。" } } }, "EditorIconSpritesheetGenerationRequest": { "type": "object", "required": [ "referenceImageSrc", "iconDescriptions" ], "properties": { "referenceImageSrc": { "type": "string", "description": "图标规范的稳定引用:当前账号的 objectKey、项目资源 ID 或素材 ID;本地临时图必须先上传 OSS。禁止 Data URL / Blob URL。" }, "referenceImageSrcs": { "type": "array", "items": { "type": "string", "description": "额外图标素材参考图的稳定引用:objectKey、项目资源 ID 或素材 ID;本地临时图必须先上传 OSS。禁止 Data URL / Blob URL。最多 8 张。" }, "maxItems": 8 }, "iconDescriptions": { "type": "array", "minItems": 1, "maxItems": 100, "items": { "type": "string" } }, "screenColor": { "type": [ "string", "null" ], "description": "纯色抠像背景色。可传画布支持的纯色背景 hex(如 #CFEFFF)指定;传 \"auto\"、null 或省略则由服务端自动决策。" }, "model": { "type": "string", "default": "gemini-3.1-flash-image-preview" }, "aspectRatio": { "type": "string", "enum": [ "1:1", "2:3", "3:2", "9:16", "16:9" ], "default": "1:1" }, "imageSize": { "type": "string", "enum": [ "0.5K", "1K", "2K" ], "default": "1K" }, "projectId": { "type": [ "string", "null" ] }, "generationInputs": { "$ref": "#/components/schemas/JsonValue" }, "assetFolderId": { "type": [ "string", "null" ] }, "assetLabel": { "type": [ "string", "null" ], "maxLength": 80, "description": "写入素材库时使用的图标图集名称;空白或省略时使用自动名称。" }, "canvasCompletion": { "anyOf": [ { "$ref": "#/components/schemas/EditorCanvasGenerationCompletion" }, { "type": "null" } ], "description": "带项目上下文生成时,服务端据此直接写入画布完成态并返回最新项目快照。" } }, "additionalProperties": false }, "EditorUiDesignAssetExtractionRequest": { "type": "object", "required": [ "sourceImageSrc", "aspectRatio", "imageSize" ], "properties": { "sourceImageSrc": { "type": "string", "description": "带红框标注的 UI 设计图稳定引用:当前账号的 objectKey、项目资源 ID 或素材 ID;浏览器内合成后必须先上传 OSS 再提交。禁止 Data URL / Blob URL。" }, "screenColor": { "type": [ "string", "null" ], "description": "纯色抠像背景色。可传画布支持的纯色背景 hex(如 #CFEFFF)指定;传 \"auto\"、null 或省略则由服务端自动决策。" }, "model": { "type": "string", "default": "gemini-3.1-flash-image-preview", "description": "支持 gpt-image-2、gemini-3.1-flash-image-preview、nanobanana2、nano-banana。未传时默认使用 nanobanana。" }, "referenceImageSrcs": { "type": "array", "items": { "type": "string", "description": "额外 UI 素材参考图的稳定引用:objectKey、项目资源 ID 或素材 ID;本地临时图必须先上传 OSS。禁止 Data URL / Blob URL。最多 5 张。" }, "maxItems": 5 }, "aspectRatio": { "type": "string", "const": "1:1", "description": "UI 素材提取固定使用 1:1。" }, "imageSize": { "type": "string", "enum": [ "1K", "2K" ], "description": "框选数量少时使用 1K,超过阈值时使用 2K。" }, "projectId": { "type": [ "string", "null" ] }, "generationInputs": { "$ref": "#/components/schemas/JsonValue" }, "assetFolderId": { "type": [ "string", "null" ] }, "spritesheetLabel": { "type": [ "string", "null" ] }, "canvasCompletion": { "anyOf": [ { "$ref": "#/components/schemas/EditorCanvasGenerationCompletion" }, { "type": "null" } ], "description": "带项目上下文生成时,服务端据此直接写入画布完成态并返回最新项目快照。" } }, "additionalProperties": false }, "EditorIconSpritesheetIconResult": { "type": "object", "required": [ "name", "imageSrc", "width", "height" ], "properties": { "name": { "type": "string" }, "imageSrc": { "type": "string" }, "width": { "type": "integer", "minimum": 1 }, "height": { "type": "integer", "minimum": 1 }, "resource": { "anyOf": [ { "$ref": "#/components/schemas/EditorProjectResource" }, { "type": "null" } ] }, "asset": { "anyOf": [ { "$ref": "#/components/schemas/EditorAsset" }, { "type": "null" } ] } } }, "EditorIconSpritesheetSliceWarning": { "type": "object", "required": [ "code", "reason" ], "properties": { "code": { "type": "string", "description": "自动拆分未完成的稳定原因码。" }, "reason": { "type": "string", "description": "自动拆分未完成的可诊断原因。" } }, "additionalProperties": false }, "EditorGenerationWarning": { "type": "object", "required": [ "code", "reason" ], "properties": { "code": { "type": "string", "const": "postprocess-failed-source-preserved", "description": "透明背景处理最终失败并保留 provider 原图时的稳定原因码。" }, "reason": { "type": "string", "description": "可直接展示给调用方的非阻断告警原因。" } }, "additionalProperties": false }, "EditorIconSpritesheetGenerationResponse": { "type": "object", "required": [ "spritesheetImageSrc", "spritesheetWidth", "spritesheetHeight", "prompt", "model", "provider", "taskId", "priceMudPoints" ], "properties": { "spritesheetImageSrc": { "type": "string" }, "spritesheetWidth": { "type": "integer", "minimum": 1 }, "spritesheetHeight": { "type": "integer", "minimum": 1 }, "iconImageSrcs": { "type": "array", "description": "按图集 alpha 连通域拆分并持久化的独立素材列表。", "items": { "$ref": "#/components/schemas/EditorIconSpritesheetIconResult" } }, "sliceWarning": { "anyOf": [ { "$ref": "#/components/schemas/EditorIconSpritesheetSliceWarning" }, { "type": "null" } ], "description": "图集已成功持久化,但自动拆分未完成时返回;此时 iconImageSrcs 为空,调用方仍应使用整张图集。与通用 warning 互斥。" }, "prompt": { "type": "string" }, "actualPrompt": { "type": [ "string", "null" ] }, "model": { "type": "string" }, "provider": { "type": "string" }, "taskId": { "type": "string" }, "priceMudPoints": { "type": "integer", "minimum": 0 }, "spritesheetResource": { "anyOf": [ { "$ref": "#/components/schemas/EditorProjectResource" }, { "type": "null" } ] }, "spritesheetAsset": { "anyOf": [ { "$ref": "#/components/schemas/EditorAsset" }, { "type": "null" } ] }, "project": { "anyOf": [ { "$ref": "#/components/schemas/EditorProject" }, { "type": "null" } ], "description": "当请求携带 canvasCompletion 且服务端成功写入画布布局时返回最新项目快照。" }, "warning": { "anyOf": [ { "$ref": "#/components/schemas/EditorGenerationWarning" }, { "type": "null" } ], "description": "透明背景处理最终失败、provider 原图作为主结果时返回的非阻断告警。与 sliceWarning 互斥。" } }, "not": { "required": [ "warning", "sliceWarning" ] } }, "EditorCharacterAnimationGenerationRequest": { "type": "object", "required": [ "sourceLayerId", "sourceImageSrc", "sourceWidth", "sourceHeight", "promptText", "resolution", "ratio", "frameCount", "durationSeconds", "model" ], "properties": { "sourceLayerId": { "type": "string" }, "sourceImageSrc": { "type": "string", "description": "角色源图的稳定引用:当前账号的 objectKey、项目资源 ID 或素材 ID;本地临时图必须先上传 OSS。禁止 Data URL / Blob URL。" }, "sourceWidth": { "type": "integer", "minimum": 1 }, "sourceHeight": { "type": "integer", "minimum": 1 }, "promptText": { "type": "string", "minLength": 1, "maxLength": 4000 }, "screenColor": { "type": [ "string", "null" ], "description": "纯色抠像背景色。可传画布支持的纯色背景 hex(如 #CFEFFF)指定;传 \"auto\"、null 或省略则由服务端自动决策。" }, "resolution": { "type": "string", "enum": [ "480p", "720p" ], "default": "480p" }, "ratio": { "type": "string", "enum": [ "same", "1:1", "4:3", "16:9", "9:16", "3:4" ], "default": "same" }, "frameCount": { "type": "integer", "enum": [ 32, 40, 48 ] }, "durationSeconds": { "type": "integer", "enum": [ 4, 5, 6 ] }, "model": { "type": "string", "const": "seedance2.0-fast" }, "projectId": { "type": [ "string", "null" ] }, "canvasCompletion": { "anyOf": [ { "$ref": "#/components/schemas/EditorCanvasGenerationCompletion" }, { "type": "null" } ], "description": "带项目上下文生成时,服务端据此直接写入画布完成态并返回最新项目快照。" }, "generationInputs": { "$ref": "#/components/schemas/JsonValue" }, "sourceResourceId": { "type": [ "string", "null" ] }, "assetFolderId": { "type": [ "string", "null" ], "description": "角色动作绿幕预览视频写入账号素材库的文件夹;省略时写入默认项目素材文件夹。" }, "assetLabel": { "type": [ "string", "null" ], "maxLength": 80, "description": "角色动作素材名称;空白或省略时使用自动名称。原始预览视频以该名称追加(原始视频)保存。" } }, "additionalProperties": false }, "EditorCharacterAnimationFrame": { "type": "object", "required": [ "frameIndex", "imageSrc", "width", "height" ], "properties": { "frameIndex": { "type": "integer", "minimum": 0 }, "imageSrc": { "type": "string" }, "width": { "type": "integer", "minimum": 1 }, "height": { "type": "integer", "minimum": 1 } } }, "EditorCharacterAnimationGenerationResponse": { "type": "object", "required": [ "ok", "taskId", "model", "prompt", "previewVideoPath", "frames", "frameCount", "durationSeconds", "frameWidth", "frameHeight", "fps", "priceMudPoints" ], "properties": { "ok": { "type": "boolean" }, "taskId": { "type": "string" }, "model": { "type": "string" }, "prompt": { "type": "string" }, "previewVideoPath": { "type": "string" }, "frames": { "type": "array", "items": { "$ref": "#/components/schemas/EditorCharacterAnimationFrame" } }, "frameCount": { "type": "integer", "minimum": 1 }, "durationSeconds": { "type": "integer", "minimum": 1 }, "frameWidth": { "type": "integer", "minimum": 1 }, "frameHeight": { "type": "integer", "minimum": 1 }, "fps": { "type": "integer", "minimum": 1 }, "priceMudPoints": { "type": "integer", "minimum": 0 }, "project": { "anyOf": [ { "$ref": "#/components/schemas/EditorProject" }, { "type": "null" } ], "description": "当请求携带 canvasCompletion 且服务端成功写入画布布局时返回最新项目快照。" }, "queueState": { "anyOf": [ { "$ref": "#/components/schemas/ExternalGenerationJobStatusRecord" }, { "type": "null" } ] } } }, "EditorVideoGenerationRequest": { "type": "object", "required": [ "prompt", "model", "aspectRatio", "durationSeconds", "resolution", "mode", "sound" ], "properties": { "prompt": { "type": "string", "minLength": 1, "maxLength": 4000 }, "model": { "type": "string", "enum": [ "seedance2.0", "seedance2.0-fast", "kling3.0", "kling3.0-omni", "veo3.1", "veo3.1-fast" ] }, "aspectRatio": { "type": "string", "enum": [ "16:9", "9:16", "1:1", "4:3", "3:4", "21:9" ] }, "durationSeconds": { "type": "integer", "minimum": 4, "maximum": 15 }, "resolution": { "type": "string", "enum": [ "480p", "720p", "1080p" ] }, "mode": { "type": "string", "const": "std" }, "sound": { "type": "string", "enum": [ "on", "off" ] }, "referenceImageSrcs": { "type": "array", "items": { "type": "string", "description": "公网 URL、asset://、当前账号的 objectKey、项目资源 ID 或素材 ID。本地临时图必须先上传 OSS。禁止 Data URL / Blob URL。仅 Seedance 2.0 系列支持。" }, "maxItems": 9 }, "referenceVideoSrcs": { "type": "array", "items": { "type": "string", "description": "公网 URL、asset://、当前账号的 objectKey、项目资源 ID 或素材 ID。本地临时视频必须先上传 OSS。禁止 Data URL / Blob URL。仅 Seedance 2.0 系列支持。" }, "maxItems": 3 }, "referenceAudioSrcs": { "type": "array", "items": { "type": "string", "description": "公网 URL、asset://、当前账号的 objectKey、项目资源 ID 或素材 ID。本地临时音频必须先上传 OSS。禁止 Data URL / Blob URL。仅 Seedance 2.0 系列支持。" }, "maxItems": 3 }, "webSearchEnabled": { "type": "boolean", "default": true, "description": "是否允许视频模型联网增强提示;未传时默认开启。" }, "projectId": { "type": [ "string", "null" ] }, "canvasCompletion": { "anyOf": [ { "$ref": "#/components/schemas/EditorCanvasGenerationCompletion" }, { "type": "null" } ], "description": "带项目上下文生成时,服务端据此直接写入画布完成态并返回最新项目快照。" }, "generationInputs": { "$ref": "#/components/schemas/JsonValue" }, "sourceResourceId": { "type": [ "string", "null" ] }, "assetKind": { "type": [ "string", "null" ] }, "assetFolderId": { "type": [ "string", "null" ] }, "assetLabel": { "type": [ "string", "null" ], "description": "写入素材库时使用的素材名称。" } }, "additionalProperties": false }, "EditorVideoGenerationResponse": { "type": "object", "required": [ "ok", "videoSrc", "width", "height", "sourceType", "prompt", "model", "provider", "taskId", "durationSeconds", "resolution", "priceMudPoints" ], "properties": { "ok": { "type": "boolean" }, "videoSrc": { "type": "string" }, "objectKey": { "type": [ "string", "null" ] }, "assetObjectId": { "type": [ "string", "null" ] }, "width": { "type": "integer", "minimum": 1 }, "height": { "type": "integer", "minimum": 1 }, "sourceType": { "type": "string", "const": "generated" }, "prompt": { "type": "string" }, "actualPrompt": { "type": [ "string", "null" ] }, "model": { "type": "string" }, "provider": { "type": "string" }, "taskId": { "type": "string" }, "durationSeconds": { "type": "integer", "minimum": 1 }, "resolution": { "type": "string" }, "priceMudPoints": { "type": "integer", "minimum": 0 }, "thumbnailSrc": { "type": [ "string", "null" ] }, "resource": { "anyOf": [ { "$ref": "#/components/schemas/EditorProjectResource" }, { "type": "null" } ] }, "asset": { "anyOf": [ { "$ref": "#/components/schemas/EditorAsset" }, { "type": "null" } ] }, "project": { "anyOf": [ { "$ref": "#/components/schemas/EditorProject" }, { "type": "null" } ], "description": "当请求携带 canvasCompletion 且服务端成功写入画布布局时返回最新项目快照。" }, "queueState": { "anyOf": [ { "$ref": "#/components/schemas/ExternalGenerationJobStatusRecord" }, { "type": "null" } ] } } }, "EditorSoundEffectGenerationRequest": { "type": "object", "required": [ "prompt", "duration" ], "properties": { "prompt": { "type": "string", "minLength": 1 }, "model": { "type": [ "string", "null" ], "default": "audio1.0" }, "duration": { "type": "integer", "minimum": 2, "maximum": 10 }, "projectId": { "type": [ "string", "null" ] }, "canvasCompletion": { "anyOf": [ { "$ref": "#/components/schemas/EditorCanvasGenerationCompletion" }, { "type": "null" } ], "description": "带项目上下文生成时,服务端据此直接写入画布完成态并返回最新项目快照。" }, "generationInputs": { "$ref": "#/components/schemas/JsonValue" }, "assetFolderId": { "type": [ "string", "null" ], "description": "传 project 时写入默认项目素材文件夹;传具体 folderId 时写入该文件夹。" }, "assetLabel": { "type": [ "string", "null" ], "description": "写入素材库时使用的素材名称。" } }, "additionalProperties": false }, "EditorBackgroundMusicGenerationRequest": { "type": "object", "required": [ "gptDescriptionPrompt", "makeInstrumental" ], "properties": { "gptDescriptionPrompt": { "type": "string", "minLength": 1 }, "makeInstrumental": { "type": "boolean", "const": true }, "projectId": { "type": [ "string", "null" ] }, "canvasCompletion": { "anyOf": [ { "$ref": "#/components/schemas/EditorCanvasGenerationCompletion" }, { "type": "null" } ], "description": "带项目上下文生成时,服务端据此直接写入画布完成态并返回最新项目快照。" }, "generationInputs": { "$ref": "#/components/schemas/JsonValue" }, "assetFolderId": { "type": [ "string", "null" ], "description": "传 project 时写入默认项目素材文件夹;传具体 folderId 时写入该文件夹。" }, "assetLabel": { "type": [ "string", "null" ], "description": "写入素材库时使用的素材名称。" } }, "additionalProperties": false }, "EditorAudioGenerationResponse": { "type": "object", "required": [ "ok", "audioSrc", "width", "height", "sourceType", "prompt", "model", "provider", "taskId", "priceMudPoints", "audioKind" ], "properties": { "ok": { "type": "boolean" }, "audioSrc": { "type": "string" }, "objectKey": { "type": [ "string", "null" ] }, "assetObjectId": { "type": [ "string", "null" ] }, "width": { "type": "integer", "minimum": 1 }, "height": { "type": "integer", "minimum": 1 }, "sourceType": { "type": "string", "const": "generated" }, "prompt": { "type": "string" }, "actualPrompt": { "type": [ "string", "null" ] }, "model": { "type": "string" }, "provider": { "type": "string" }, "taskId": { "type": "string" }, "priceMudPoints": { "type": "integer", "minimum": 0 }, "audioKind": { "type": "string", "enum": [ "sound-effect", "background-music" ] }, "project": { "anyOf": [ { "$ref": "#/components/schemas/EditorProject" }, { "type": "null" } ], "description": "当请求携带 canvasCompletion 且服务端成功写入画布布局时返回最新项目快照。" }, "resource": { "anyOf": [ { "$ref": "#/components/schemas/EditorProjectResource" }, { "type": "null" } ], "description": "请求携带 projectId 时返回写入的画布资源快照。" }, "asset": { "anyOf": [ { "$ref": "#/components/schemas/EditorAsset" }, { "type": "null" } ], "description": "请求携带 assetFolderId 时返回写入的账号素材快照。" }, "queueState": { "anyOf": [ { "$ref": "#/components/schemas/ExternalGenerationJobStatusRecord" }, { "type": "null" } ] } } }, "ExternalGenerationJobStatusRecord": { "type": "object", "required": [ "operationId", "status", "phaseLabel", "phaseDetail", "progress", "updatedAtMicros" ], "properties": { "operationId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "completed", "failed" ] }, "phaseLabel": { "type": "string" }, "phaseDetail": { "type": "string" }, "progress": { "type": "integer", "minimum": 0, "maximum": 100 }, "error": { "type": [ "string", "null" ] }, "updatedAtMicros": { "type": "integer" } }, "additionalProperties": false } } } }