seacloud-sdk 0.11.6 → 0.11.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -9923,6 +9923,8 @@ declare function viduQ2(params: ViduQ2Params): Promise<ViduQ2Resource[]>;
9923
9923
  interface ViduQ2ReferenceSubject {
9924
9924
  /**
9925
9925
  * 主体id,在提示词中可以通过 @主体id 的方式使用
9926
+ * 可以使用任意字符串,建议使用有意义的名称(如 'person', 'dog', 'car' 等)
9927
+ * 例如:id: 'girl' 可以在 prompt 中使用 '@girl 在跳舞'
9926
9928
  */
9927
9929
  id: string;
9928
9930
  /**
@@ -9933,21 +9935,34 @@ interface ViduQ2ReferenceSubject {
9933
9935
  interface ViduQ2I2vReferenceParams {
9934
9936
  /**
9935
9937
  * 文本提示词,必填
9936
- * 可以通过@主体id 来表示主体内容
9937
- * 例如:"@1 和 @2 在一起吃火锅,并且旁白音说火锅大家都爱吃。"
9938
+ * 使用 subjects 时,可以通过 @主体id 来引用主体内容
9939
+ * 例如:"@1 和 @2 在公园里一起玩耍"
9938
9940
  * 注:字符长度不能超过 2000 个字符
9939
9941
  */
9940
9942
  prompt: string;
9941
9943
  /**
9942
- * 参考图像列表(URL或Base64),与subjects参数互斥
9943
- * 支持1-7张参考图片
9944
+ * 主体列表(推荐使用),与 images 参数互斥
9945
+ * 每个主体包含:
9946
+ * - id: 主体ID,在 prompt 中通过 @id 引用
9947
+ * - images: 该主体的图片URL列表(每个主体最多3张图片)
9948
+ *
9949
+ * 推荐使用 subjects 而非 images,支持多主体精确控制
9950
+ *
9951
+ * @example
9952
+ * subjects: [
9953
+ * { id: '1', images: ['https://example.com/person1.jpg'] },
9954
+ * { id: '2', images: ['https://example.com/dog.jpg'] }
9955
+ * ]
9956
+ * prompt: '@1 和 @2 在公园里一起玩耍'
9944
9957
  */
9945
- images?: string[];
9958
+ subjects?: ViduQ2ReferenceSubject[];
9946
9959
  /**
9947
- * 主体列表,与images参数互斥
9948
- * 每个主体可以有多张图片(最多3张),并在prompt中通过@主体id引用
9960
+ * 参考图像列表(已废弃,推荐使用 subjects),与 subjects 参数互斥
9961
+ * 支持1-7张参考图片
9962
+ *
9963
+ * @deprecated 建议使用 subjects 参数以获得更好的主体控制
9949
9964
  */
9950
- subjects?: ViduQ2ReferenceSubject[];
9965
+ images?: string[];
9951
9966
  /**
9952
9967
  * 音色ID,使用预设音色或复刻音色
9953
9968
  * 为空时系统会自动推荐音色并使用
@@ -10022,18 +10037,24 @@ interface ViduQ2I2vReferenceResource {
10022
10037
  [key: string]: any;
10023
10038
  }
10024
10039
  /**
10025
- * viduq2_i2v_reference
10040
+ * viduQ2I2vReference
10026
10041
  *
10027
- * Vidu Q2 Reference-to-Video generation implementation.
10042
+ * Vidu Q2 参考图生视频(升级版 - 推荐使用 subjects)
10028
10043
  *
10029
- * Model: viduq2 (最新模型)
10030
- * Features: 最新模型,支持参考图生视频,高质量输出,支持主体一致性
10031
- * Duration: 1-8秒 (可选)
10032
- * Resolution: 根据时长动态调整
10033
- * Images: 1-7张参考图片,或使用subjects定义多个主体
10044
+ * Model: viduq2_i2v_reference (最新升级模型)
10045
+ * Features:
10046
+ * - 支持多主体精确控制(通过 subjects 参数)
10047
+ * - 高质量视频输出,支持主体一致性
10048
+ * - 支持音视频直出能力(audio=true)
10049
+ * - 每个主体最多支持3张参考图片
10050
+ * Duration: 1-8秒
10051
+ * Resolution: 540p | 720p | 1080p
10052
+ *
10053
+ * 重要升级:
10054
+ * - ✅ 推荐使用 subjects 参数(支持多主体和 @id 引用)
10055
+ * - ⚠️ images 参数已废弃,建议迁移到 subjects
10034
10056
  *
10035
10057
  * API Documentation: https://platform.vidu.cn/docs/reference-to-video
10036
- * Status API: https://platform.vidu.cn/docs/get-generation
10037
10058
  *
10038
10059
  * @example
10039
10060
  * ```typescript
@@ -10041,27 +10062,42 @@ interface ViduQ2I2vReferenceResource {
10041
10062
  *
10042
10063
  * initSeacloud('your-api-key');
10043
10064
  *
10044
- * // 方式1: 使用普通参考图片列表
10045
- * const result1 = await viduQ2I2vReference({
10046
- * prompt: '一只可爱的小猫在花园里玩耍',
10047
- * images: ['https://example.com/cat.jpg'],
10048
- * duration: 5,
10065
+ * // 推荐方式:使用 subjects(支持多主体精确控制)
10066
+ * // id 可以使用任意字符串,建议使用有意义的名称
10067
+ * const result = await viduQ2I2vReference({
10068
+ * prompt: '@person 和 @dog 在公园里一起玩耍',
10069
+ * subjects: [
10070
+ * {
10071
+ * id: 'person', // 使用有意义的 id
10072
+ * images: ['https://example.com/person.jpg']
10073
+ * },
10074
+ * {
10075
+ * id: 'dog', // 使用有意义的 id
10076
+ * images: ['https://example.com/dog.jpg']
10077
+ * }
10078
+ * ],
10079
+ * duration: 4,
10049
10080
  * resolution: '720p',
10081
+ * audio: true, // 启用音视频直出
10050
10082
  * });
10051
10083
  *
10052
- * // 方式2: 使用主体列表(支持多主体和主体引用)
10084
+ * // 多图参考(每个主体最多3张图片)
10053
10085
  * const result2 = await viduQ2I2vReference({
10054
- * prompt: '@1 和 @2 在一起吃火锅,并且旁白音说火锅大家都爱吃。',
10086
+ * prompt: '@girl 在跳舞',
10055
10087
  * subjects: [
10056
- * { id: '1', images: ['https://example.com/person1.jpg'] },
10057
- * { id: '2', images: ['https://example.com/person2.jpg'] }
10088
+ * {
10089
+ * id: 'girl', // id 可以是任意字符串
10090
+ * images: [
10091
+ * 'https://example.com/person1.jpg',
10092
+ * 'https://example.com/person2.jpg',
10093
+ * 'https://example.com/person3.jpg'
10094
+ * ]
10095
+ * }
10058
10096
  * ],
10059
- * audio: true,
10060
- * voice_id: 'voice_123',
10061
10097
  * duration: 8,
10062
10098
  * });
10063
10099
  *
10064
- * console.log(result); // 返回生成的资源列表
10100
+ * console.log(result[0].url); // 返回生成的视频URL
10065
10101
  * ```
10066
10102
  *
10067
10103
  * @param params 请求参数,详见 ViduQ2I2vReferenceParams 接口定义