返回 AiToEarn
relay.interface.ts
根目录 / project / aitoearn-backend / apps / aitoearn-ai / src / core / ai / libs / relay / relay.interface.ts
1 /**
2 * 提交给上游 relay 服务端的视频生成请求体。
3 * 透传 VideoGenerationRequestDto 的核心字段。
4 */
5 export interface RelayVideoGenerationRequest {
6 model: string
7 prompt: string
8 mode?: string
9 size?: string
10 resolution?: string
11 ratio?: string
12 duration?: number
13 seed?: number
14 watermark?: boolean
15 image?: string | string[]
16 image_tail?: string
17 video_url?: string
18 images?: string[]
19 videos?: string[]
20 audios?: string[]
21 tools?: Array<{ type: string }>
22 metadata?: Record<string, unknown>
23 groupId?: string
24 }
25
26 /**
27 * 上游 relay 服务端提交视频任务的响应体。
28 * 对应 VideoGenerationResponseVo { id, status }。
29 */
30 export interface RelayVideoSubmitResponse {
31 id: string
32 status: string
33 }
34
35 /**
36 * 轮询上游 relay 服务端视频任务状态返回的响应体。
37 * 对应 VideoTaskStatusResponseVo 的子集。
38 */
39 export interface RelayVideoCallbackDto {
40 id?: string
41 status?: string
42 videoUrl?: string
43 coverUrl?: string
44 error?: string | { message?: string, code?: string }
45 }
46
46 lines TYPESCRIPT