mirror of
https://git.openapi.site/https://github.com/desirecore/config-center.git
synced 2026-12-05 20:40:43 +08:00
feat: 定义 V2 媒体生成 Profile / Validate V2 media generation profiles
This commit is contained in:
1 parent
d7034f14df
commit
51e51406e5
2 files changed
+291
No files matched your search
@@ -1417,6 +1417,281 @@
|
||||
"constraints": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"mediaGeneration": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"kind"
|
||||
],
|
||||
"if": {
|
||||
"properties": {
|
||||
"kind": {
|
||||
"const": "image"
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"kind",
|
||||
"protocol",
|
||||
"protocolVersion",
|
||||
"modes"
|
||||
],
|
||||
"properties": {
|
||||
"protocol": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
||||
"description": "稳定的媒体请求与响应协议族。型号小版本、渠道名称和凭据变化不改变协议标识。"
|
||||
},
|
||||
"protocolVersion": {
|
||||
"type": "string",
|
||||
"pattern": "^[1-9][0-9]*$",
|
||||
"description": "协议的不兼容版本号。请求结构、响应或作业状态合同发生不兼容变更时递增。"
|
||||
},
|
||||
"kind": {
|
||||
"const": "image",
|
||||
"description": "同步图像生成服务。"
|
||||
},
|
||||
"modes": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"text-to-image",
|
||||
"image-to-image"
|
||||
]
|
||||
},
|
||||
"description": "已确认支持的图像生成模式。多图融合属于 image-to-image。"
|
||||
},
|
||||
"capabilities": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"nativeTransparentBackground": {
|
||||
"type": "boolean",
|
||||
"description": "此协议与型号可接收原生透明背景请求。交付前仍需检查实际 alpha。"
|
||||
},
|
||||
"maxForwardedReferenceImages": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"description": "适配器向上游转发的参考图数量上限。0 表示不转发。工具的本地输入上限由工具契约决定。"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"description": "该媒体协议与型号已验证的图像能力。未声明的能力没有确认事实。"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"else": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"kind",
|
||||
"protocol",
|
||||
"protocolVersion",
|
||||
"modes"
|
||||
],
|
||||
"properties": {
|
||||
"protocol": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
||||
"description": "稳定的媒体请求与响应协议族。型号小版本、渠道名称和凭据变化不改变协议标识。"
|
||||
},
|
||||
"protocolVersion": {
|
||||
"type": "string",
|
||||
"pattern": "^[1-9][0-9]*$",
|
||||
"description": "协议的不兼容版本号。请求结构、响应或作业状态合同发生不兼容变更时递增。"
|
||||
},
|
||||
"kind": {
|
||||
"const": "video",
|
||||
"description": "异步视频生成服务。"
|
||||
},
|
||||
"modes": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"text-to-video",
|
||||
"image-to-video",
|
||||
"reference-to-video"
|
||||
]
|
||||
},
|
||||
"description": "已确认支持的文生视频、首尾帧生视频或多素材参考生视频模式。"
|
||||
},
|
||||
"capabilities": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"allowMediaOnly": {
|
||||
"type": "boolean",
|
||||
"description": "至少提供一种受支持的有效素材时是否允许省略 prompt。"
|
||||
},
|
||||
"lastFrame": {
|
||||
"type": "boolean",
|
||||
"description": "该协议与型号是否接受尾帧输入。"
|
||||
},
|
||||
"maxReferenceImages": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"description": "本地接受的参考图数量上限。0 表示拒绝该类素材。"
|
||||
},
|
||||
"maxReferenceVideos": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"description": "本地接受的参考视频数量上限。0 表示拒绝该类素材。"
|
||||
},
|
||||
"maxReferenceAudios": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"description": "本地接受的参考音频数量上限。0 表示拒绝该类素材。"
|
||||
},
|
||||
"referenceFileSchemes": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"http",
|
||||
"https",
|
||||
"oss"
|
||||
]
|
||||
},
|
||||
"description": "参考文件接受的 URL scheme。省略表示未声明参考文件能力。"
|
||||
},
|
||||
"referenceLinkSchemes": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"http",
|
||||
"https"
|
||||
]
|
||||
},
|
||||
"description": "参考网页接受的 URL scheme。省略表示未声明参考网页能力。"
|
||||
},
|
||||
"incompatibleInputs": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"left",
|
||||
"right"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"left": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"first_frame",
|
||||
"last_frame",
|
||||
"images",
|
||||
"reference_videos",
|
||||
"reference_audios",
|
||||
"reference_file",
|
||||
"reference_link"
|
||||
]
|
||||
},
|
||||
"description": "第一组素材参数。组内任何一项存在就参与互斥判断。"
|
||||
},
|
||||
"right": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"first_frame",
|
||||
"last_frame",
|
||||
"images",
|
||||
"reference_videos",
|
||||
"reference_audios",
|
||||
"reference_file",
|
||||
"reference_link"
|
||||
]
|
||||
},
|
||||
"description": "与第一组互斥的素材参数。"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "素材互斥规则。规则两侧各有至少一项素材时拒绝,组内素材仍可混用。"
|
||||
},
|
||||
"duration": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"minimum",
|
||||
"maximum"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"minimum": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"description": "以秒为单位的最短普通时长,含边界。"
|
||||
},
|
||||
"maximum": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"description": "以秒为单位的最长普通时长,含边界。"
|
||||
},
|
||||
"automaticValues": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"maximum": -1
|
||||
},
|
||||
"description": "可选的自动时长取值,例如 -1 由上游决定时长。"
|
||||
}
|
||||
},
|
||||
"description": "本地支持的整数时长规则。未声明时沿用该调用路径的现有时长处理。"
|
||||
},
|
||||
"seed": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"minimum",
|
||||
"maximum"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"minimum": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"description": "随机种子的最小值,含边界。"
|
||||
},
|
||||
"maximum": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"description": "随机种子的最大值,含边界。"
|
||||
}
|
||||
},
|
||||
"description": "模型原生接受的整数种子范围。"
|
||||
},
|
||||
"queryOriginalJob": {
|
||||
"type": "boolean",
|
||||
"description": "该接入的协议是否声明原视频作业查询能力。仅在本地适配器支持且原授权仍有效时可用。"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"description": "该媒体协议与型号已验证的本地视频规则。未声明的规则不构成对上游能力的承诺。"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"description": "媒体生成的实际请求协议与型号能力。协议、版本和服务种类共同识别本地适配器。"
|
||||
},
|
||||
"thinkingOnly": {
|
||||
"type": "boolean"
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user