feat(gateway): 补齐桌面端高级媒体直连接口
ci / verify (pull_request) Successful in 15m34s
ci / verify (pull_request) Successful in 15m34s
新增图片矢量化、视频超分、每日用量、计价与任务隔离能力,并通过环境变量解析平台凭据。 已通过 Go 全量门禁、迁移检查、镜像构建以及 Vectorizer 五格式和 Topaz 3 秒视频真实 DEV 验收。
This commit is contained in:
+467
-4
@@ -4710,6 +4710,15 @@
|
||||
"volces-compatible"
|
||||
],
|
||||
"summary": "查询 server-main 兼容视频结果",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "任务 ID",
|
||||
"name": "taskID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
@@ -5568,6 +5577,15 @@
|
||||
"volces-compatible"
|
||||
],
|
||||
"summary": "查询火山内容生成任务",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "任务 ID",
|
||||
"name": "taskID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
@@ -5592,6 +5610,15 @@
|
||||
"volces-compatible"
|
||||
],
|
||||
"summary": "取消火山内容生成任务",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "任务 ID",
|
||||
"name": "taskID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
@@ -6094,6 +6121,87 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/images/vectorize": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "将 URL 位图转换为 SVG、EPS、PDF、DXF 或 PNG;设置 X-Async=true 时返回统一异步任务结构。可使用同一所有者历史任务的 vectorizerTaskId 复用上游 image token。",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"images"
|
||||
],
|
||||
"summary": "图片矢量化",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "boolean",
|
||||
"description": "true 时异步创建任务并返回 202",
|
||||
"name": "X-Async",
|
||||
"in": "header"
|
||||
},
|
||||
{
|
||||
"description": "图片矢量化请求",
|
||||
"name": "input",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.ImageVectorizeRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.CompatibleResponse"
|
||||
}
|
||||
},
|
||||
"202": {
|
||||
"description": "Accepted",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.TaskAcceptedResponse"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||||
}
|
||||
},
|
||||
"502": {
|
||||
"description": "Bad Gateway",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/kling/v1/videos/omni-video": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -8167,6 +8275,87 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/videos/upscales": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "原生执行 Topaz 视频增强流程;设置 X-Async=true 时返回统一异步任务结构,结果在任务完成前持久化到 Gateway 文件存储。",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"videos"
|
||||
],
|
||||
"summary": "视频超分",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "boolean",
|
||||
"description": "true 时异步创建任务并返回 202",
|
||||
"name": "X-Async",
|
||||
"in": "header"
|
||||
},
|
||||
{
|
||||
"description": "视频超分请求",
|
||||
"name": "input",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.VideoUpscaleRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.CompatibleResponse"
|
||||
}
|
||||
},
|
||||
"202": {
|
||||
"description": "Accepted",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.TaskAcceptedResponse"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||||
}
|
||||
},
|
||||
"502": {
|
||||
"description": "Bad Gateway",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/voice_clone": {
|
||||
"post": {
|
||||
"security": [
|
||||
@@ -8709,6 +8898,72 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/workspace/token-usage/daily": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "按 IANA 时区返回连续自然日用量;API Key 仅统计当前 Key,JWT 统计当前用户。",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"workspace"
|
||||
],
|
||||
"summary": "查询每日 Token 与资源点用量",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "开始日期 YYYY-MM-DD",
|
||||
"name": "from",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "结束日期 YYYY-MM-DD",
|
||||
"name": "to",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"default": "UTC",
|
||||
"description": "IANA 时区",
|
||||
"name": "timezone",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.DailyTokenUsageResponse"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/workspace/user-groups": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -9498,6 +9753,32 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"httpapi.DailyTokenUsageResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/store.DailyTokenUsage"
|
||||
}
|
||||
},
|
||||
"range": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"summary": {
|
||||
"$ref": "#/definitions/httpapi.dailyTokenUsageSummary"
|
||||
},
|
||||
"tokenDays": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/store.DailyTokenUsage"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"httpapi.ErrorEnvelope": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -9589,6 +9870,63 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"httpapi.ImageVectorizeRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"cleanupLevel": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"low",
|
||||
"standard",
|
||||
"strong"
|
||||
],
|
||||
"example": "standard"
|
||||
},
|
||||
"format": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"svg",
|
||||
"eps",
|
||||
"pdf",
|
||||
"dxf",
|
||||
"png"
|
||||
],
|
||||
"example": "svg"
|
||||
},
|
||||
"maxColors": {
|
||||
"type": "integer",
|
||||
"enum": [
|
||||
0,
|
||||
2,
|
||||
4,
|
||||
8,
|
||||
16,
|
||||
32
|
||||
],
|
||||
"example": 16
|
||||
},
|
||||
"model": {
|
||||
"type": "string",
|
||||
"example": "easy-image-vectorizer-1"
|
||||
},
|
||||
"source": {
|
||||
"$ref": "#/definitions/httpapi.ImageVectorizeSource"
|
||||
}
|
||||
}
|
||||
},
|
||||
"httpapi.ImageVectorizeSource": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"url": {
|
||||
"type": "string",
|
||||
"example": "https://example.com/source.png"
|
||||
},
|
||||
"vectorizerTaskId": {
|
||||
"type": "string",
|
||||
"example": "9f4d8f3d-5f5f-4bb7-a4be-344a9f930e25"
|
||||
}
|
||||
}
|
||||
},
|
||||
"httpapi.KelingCompatibleEnvelope": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -10528,10 +10866,24 @@
|
||||
"type": "number",
|
||||
"example": 0.65
|
||||
},
|
||||
"audio_url": {
|
||||
"type": "string",
|
||||
"example": "https://example.com/source-voice.mp3"
|
||||
},
|
||||
"customMode": {
|
||||
"type": "boolean",
|
||||
"example": false
|
||||
},
|
||||
"display_name": {
|
||||
"type": "string",
|
||||
"example": "EasyAI DEV acceptance"
|
||||
},
|
||||
"documents": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"duration": {
|
||||
"type": "integer",
|
||||
"example": 5
|
||||
@@ -10576,10 +10928,26 @@
|
||||
"type": "number",
|
||||
"example": 0
|
||||
},
|
||||
"preview_model": {
|
||||
"type": "string",
|
||||
"example": "speech-2.8-hd"
|
||||
},
|
||||
"prompt": {
|
||||
"type": "string",
|
||||
"example": "A watercolor robot reading a book"
|
||||
},
|
||||
"prompt_audio_url": {
|
||||
"type": "string",
|
||||
"example": "https://example.com/prompt-voice.mp3"
|
||||
},
|
||||
"prompt_text": {
|
||||
"type": "string",
|
||||
"example": "EasyAI voice clone prompt."
|
||||
},
|
||||
"query": {
|
||||
"type": "string",
|
||||
"example": "Which document mentions EasyAI Gateway?"
|
||||
},
|
||||
"reasoning_effort": {
|
||||
"description": "ReasoningEffort 推理强度,OpenAI-compatible 请求字段;支持 none、minimal、low、medium、high、xhigh、max。供应商自定义取值由网关按平台适配。",
|
||||
"type": "string",
|
||||
@@ -10693,6 +11061,62 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"httpapi.VideoUpscaleRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"duration": {
|
||||
"type": "number",
|
||||
"example": 3
|
||||
},
|
||||
"model": {
|
||||
"type": "string",
|
||||
"example": "easy-proteus-standard-4"
|
||||
},
|
||||
"operation": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"upscale"
|
||||
],
|
||||
"example": "upscale"
|
||||
},
|
||||
"output_height": {
|
||||
"type": "integer",
|
||||
"example": 1080
|
||||
},
|
||||
"output_width": {
|
||||
"type": "integer",
|
||||
"example": 1920
|
||||
},
|
||||
"preserve_audio": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
},
|
||||
"slow_motion_rate": {
|
||||
"type": "number",
|
||||
"example": 1
|
||||
},
|
||||
"source_frame_rate": {
|
||||
"type": "number",
|
||||
"example": 24
|
||||
},
|
||||
"source_resolution": {
|
||||
"type": "string",
|
||||
"example": "480p"
|
||||
},
|
||||
"target_frame_rate": {
|
||||
"type": "number",
|
||||
"example": 24
|
||||
},
|
||||
"target_resolution": {
|
||||
"type": "string",
|
||||
"example": "1080p"
|
||||
},
|
||||
"video_url": {
|
||||
"type": "string",
|
||||
"example": "https://example.com/source.mp4"
|
||||
}
|
||||
}
|
||||
},
|
||||
"httpapi.WalletAdjustmentResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -10733,6 +11157,23 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"httpapi.dailyTokenUsageSummary": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"cumulativeTokens": {
|
||||
"type": "integer"
|
||||
},
|
||||
"currentStreakDays": {
|
||||
"type": "integer"
|
||||
},
|
||||
"longestStreakDays": {
|
||||
"type": "integer"
|
||||
},
|
||||
"peakDailyTokens": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"httpapi.desktopBillingConfigResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -11997,6 +12438,32 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"store.DailyTokenUsage": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"cachedInputTokens": {
|
||||
"type": "integer"
|
||||
},
|
||||
"date": {
|
||||
"type": "string"
|
||||
},
|
||||
"inputTokens": {
|
||||
"type": "integer"
|
||||
},
|
||||
"outputTokens": {
|
||||
"type": "integer"
|
||||
},
|
||||
"resourcePoints": {
|
||||
"type": "number"
|
||||
},
|
||||
"taskCount": {
|
||||
"type": "integer"
|
||||
},
|
||||
"totalTokens": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"store.FileStorageChannel": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -12224,10 +12691,6 @@
|
||||
"remoteTaskId": {
|
||||
"type": "string"
|
||||
},
|
||||
"remoteTaskPayload": {
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"request": {
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
|
||||
Reference in New Issue
Block a user