tencentcloud-sdk-aiart 3.0.956 → 3.0.958

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 874c5ecc8a6ce951fafb8a82b4c05395b31a5247
4
- data.tar.gz: f192e94d9ef1d1745b0dbbed8b5376f9910dfa75
3
+ metadata.gz: 388ecee7416f4588e2a168aa7b487408cae96b49
4
+ data.tar.gz: 3f181f5833020b3e044063e73d1c025fe4e434b7
5
5
  SHA512:
6
- metadata.gz: 68664d194fdc7a707eede42949c52598ec5aca6ba33781f25389dfb2b5a5edd2203a5487fb5ae929a875284e0f7ce829f1c25d48e31eb93119516dbfd6fd1973
7
- data.tar.gz: 9ee0d90ba2f869f913eff5bbd43ab7479e96966387abb56442f90536c45d46e34b2a2922e02afdcf6d2068cfa759f20d38fb3a04c92cc52dda45b6bf1a1c70bf
6
+ metadata.gz: 571ef75330bfc377aae9fd5c1a0a9f7d2cc3944a32634afa4ab9164577e883037869f5df4284075e7376a8047cfd5e69e078080096af976c39ea6da5e5953ff7
7
+ data.tar.gz: a7285e1fb4c47b38721bcb76e808b1bcb123534ec208be5880cd6cbd4de8b0d04b4e34b568b4d8e4148ca91071a905b330760ed90ec72f98d3ccf050a9c66b17
data/lib/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.956
1
+ 3.0.958
@@ -80,6 +80,56 @@ module TencentCloud
80
80
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
81
81
  end
82
82
 
83
+ # 消除补全接口通过图像 mask 指定需要消除的人、物、文字等区域,在选定区域对图像内容进行消除与重绘补全。
84
+ # 默认提供1个并发,代表最多能同时处理1个已提交的任务。
85
+
86
+ # @param request: Request instance for ImageInpaintingRemoval.
87
+ # @type request: :class:`Tencentcloud::aiart::V20221229::ImageInpaintingRemovalRequest`
88
+ # @rtype: :class:`Tencentcloud::aiart::V20221229::ImageInpaintingRemovalResponse`
89
+ def ImageInpaintingRemoval(request)
90
+ body = send_request('ImageInpaintingRemoval', request.serialize)
91
+ response = JSON.parse(body)
92
+ if response['Response'].key?('Error') == false
93
+ model = ImageInpaintingRemovalResponse.new
94
+ model.deserialize(response['Response'])
95
+ model
96
+ else
97
+ code = response['Response']['Error']['Code']
98
+ message = response['Response']['Error']['Message']
99
+ reqid = response['Response']['RequestId']
100
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
101
+ end
102
+ rescue TencentCloud::Common::TencentCloudSDKException => e
103
+ raise e
104
+ rescue StandardError => e
105
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
106
+ end
107
+
108
+ # 扩图接口支持对输入图像按指定宽高比实现智能扩图。
109
+ # 默认提供1个并发,代表最多能同时处理1个已提交的任务。
110
+
111
+ # @param request: Request instance for ImageOutpainting.
112
+ # @type request: :class:`Tencentcloud::aiart::V20221229::ImageOutpaintingRequest`
113
+ # @rtype: :class:`Tencentcloud::aiart::V20221229::ImageOutpaintingResponse`
114
+ def ImageOutpainting(request)
115
+ body = send_request('ImageOutpainting', request.serialize)
116
+ response = JSON.parse(body)
117
+ if response['Response'].key?('Error') == false
118
+ model = ImageOutpaintingResponse.new
119
+ model.deserialize(response['Response'])
120
+ model
121
+ else
122
+ code = response['Response']['Error']['Code']
123
+ message = response['Response']['Error']['Message']
124
+ reqid = response['Response']['RequestId']
125
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
126
+ end
127
+ rescue TencentCloud::Common::TencentCloudSDKException => e
128
+ raise e
129
+ rescue StandardError => e
130
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
131
+ end
132
+
83
133
  # 图像风格化(图生图)接口提供生成式的图生图风格转化能力,将根据输入的图像及文本描述,智能生成风格转化后的图像。建议避免输入人像过小、姿势复杂、人数较多的人像图片。
84
134
  # 图像风格化(图生图)默认提供3个并发任务数,代表最多能同时处理3个已提交的任务,上一个任务处理完毕后才能开始处理下一个任务。
85
135
 
@@ -135,8 +135,12 @@ module TencentCloud
135
135
 
136
136
  # GenerateAvatar请求参数结构体
137
137
  class GenerateAvatarRequest < TencentCloud::Common::AbstractModel
138
+ # @param Type: 图像类型,默认为人像。
139
+ # human:人像头像,仅支持人像图片输入,建议避免上传无人、多人、人像过小的图片。
140
+ # pet:萌宠贴纸,仅支持动物图片输入,建议避免上传无动物、多动物、动物过小的图片。
141
+ # @type Type: String
138
142
  # @param Style: 头像风格,仅在人像模式下生效。
139
- # 请在 [百变头像风格列表](https://cloud.tencent.com/document/product/1668/107741) 中选择期望的风格,传入风格编号,不传默认使用 flower 风格。
143
+ # 若使用人像模式,请在 [百变头像风格列表](https://cloud.tencent.com/document/product/1668/107741) 中选择期望的风格,传入风格编号,不传默认使用 flower 风格。
140
144
  # 若使用萌宠贴纸模式,无需选择风格,该参数不生效。
141
145
  # @type Style: String
142
146
  # @param InputImage: 输入图 Base64 数据。
@@ -147,10 +151,6 @@ module TencentCloud
147
151
  # Base64 和 Url 必须提供一个,如果都提供以 Url 为准。
148
152
  # 图片限制:单边分辨率小于5000,转成 Base64 字符串后小于 6MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。
149
153
  # @type InputUrl: String
150
- # @param Type: 图像类型,默认为人像。
151
- # human:人像头像,仅支持人像图片输入,建议避免上传无人、多人、人像过小的图片。
152
- # pet:萌宠贴纸,仅支持动物图片输入,建议避免上传无动物、多动物、动物过小的图片。
153
- # @type Type: String
154
154
  # @param Filter: 输入人像图的质量检测开关,默认开启,仅在人像模式下生效。
155
155
  # 1:开启
156
156
  # 0:关闭
@@ -170,13 +170,13 @@ module TencentCloud
170
170
  # @param RspImgType: 返回图像方式(base64 或 url) ,二选一,默认为 base64。url 有效期为1小时。
171
171
  # @type RspImgType: String
172
172
 
173
- attr_accessor :Style, :InputImage, :InputUrl, :Type, :Filter, :LogoAdd, :LogoParam, :RspImgType
173
+ attr_accessor :Type, :Style, :InputImage, :InputUrl, :Filter, :LogoAdd, :LogoParam, :RspImgType
174
174
 
175
- def initialize(style=nil, inputimage=nil, inputurl=nil, type=nil, filter=nil, logoadd=nil, logoparam=nil, rspimgtype=nil)
175
+ def initialize(type=nil, style=nil, inputimage=nil, inputurl=nil, filter=nil, logoadd=nil, logoparam=nil, rspimgtype=nil)
176
+ @Type = type
176
177
  @Style = style
177
178
  @InputImage = inputimage
178
179
  @InputUrl = inputurl
179
- @Type = type
180
180
  @Filter = filter
181
181
  @LogoAdd = logoadd
182
182
  @LogoParam = logoparam
@@ -184,10 +184,10 @@ module TencentCloud
184
184
  end
185
185
 
186
186
  def deserialize(params)
187
+ @Type = params['Type']
187
188
  @Style = params['Style']
188
189
  @InputImage = params['InputImage']
189
190
  @InputUrl = params['InputUrl']
190
- @Type = params['Type']
191
191
  @Filter = params['Filter']
192
192
  @LogoAdd = params['LogoAdd']
193
193
  unless params['LogoParam'].nil?
@@ -220,6 +220,155 @@ module TencentCloud
220
220
  end
221
221
  end
222
222
 
223
+ # ImageInpaintingRemoval请求参数结构体
224
+ class ImageInpaintingRemovalRequest < TencentCloud::Common::AbstractModel
225
+ # @param InputImage: 输入图 Base64 数据。
226
+ # Base64 和 Url 必须提供一个,如果都提供以 Url 为准。
227
+ # 图片限制:单边分辨率小于5000,转成 Base64 字符串后小于 6MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。
228
+ # @type InputImage: String
229
+ # @param InputUrl: 输入图 Url。
230
+ # Base64 和 Url 必须提供一个,如果都提供以 Url 为准。
231
+ # 图片限制:单边分辨率小于5000,转成 Base64 字符串后小于 6MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。
232
+ # @type InputUrl: String
233
+ # @param Mask: 消除区域 Mask 图 Base64 数据。
234
+ # Mask 为单通道灰度图,待消除部分呈白色区域,原图保持部分呈黑色区域。
235
+ # Mask 的 Base64 和 Url 必须提供一个,如果都提供以 Url 为准。
236
+ # 图片限制:Mask 分辨率需要和输入原图保持一致,转成 Base64 字符串后小于 6MB。
237
+ # @type Mask: String
238
+ # @param MaskUrl: 消除区域 Mask 图 Url。
239
+ # Mask 为单通道灰度图,待消除部分呈白色区域,原图保持部分呈黑色区域。
240
+ # Mask 的 Base64 和 Url 必须提供一个,如果都提供以 Url 为准。
241
+ # 图片限制:Mask 分辨率需要和输入原图保持一致,转成 Base64 字符串后小于 6MB。
242
+ # @type MaskUrl: String
243
+ # @param RspImgType: 返回图像方式(base64 或 url) ,二选一,默认为 base64。url 有效期为1小时。
244
+ # @type RspImgType: String
245
+ # @param LogoAdd: 为生成结果图添加标识的开关,默认为1。
246
+ # 1:添加标识。
247
+ # 0:不添加标识。
248
+ # 其他数值:默认按1处理。
249
+ # 建议您使用显著标识来提示结果图使用了 AI 绘画技术,是 AI 生成的图片。
250
+ # @type LogoAdd: Integer
251
+ # @param LogoParam: 标识内容设置。
252
+ # 默认在生成结果图右下角添加“图片由 AI 生成”字样,您可根据自身需要替换为其他的标识图片。
253
+ # @type LogoParam: :class:`Tencentcloud::Aiart.v20221229.models.LogoParam`
254
+
255
+ attr_accessor :InputImage, :InputUrl, :Mask, :MaskUrl, :RspImgType, :LogoAdd, :LogoParam
256
+
257
+ def initialize(inputimage=nil, inputurl=nil, mask=nil, maskurl=nil, rspimgtype=nil, logoadd=nil, logoparam=nil)
258
+ @InputImage = inputimage
259
+ @InputUrl = inputurl
260
+ @Mask = mask
261
+ @MaskUrl = maskurl
262
+ @RspImgType = rspimgtype
263
+ @LogoAdd = logoadd
264
+ @LogoParam = logoparam
265
+ end
266
+
267
+ def deserialize(params)
268
+ @InputImage = params['InputImage']
269
+ @InputUrl = params['InputUrl']
270
+ @Mask = params['Mask']
271
+ @MaskUrl = params['MaskUrl']
272
+ @RspImgType = params['RspImgType']
273
+ @LogoAdd = params['LogoAdd']
274
+ unless params['LogoParam'].nil?
275
+ @LogoParam = LogoParam.new
276
+ @LogoParam.deserialize(params['LogoParam'])
277
+ end
278
+ end
279
+ end
280
+
281
+ # ImageInpaintingRemoval返回参数结构体
282
+ class ImageInpaintingRemovalResponse < TencentCloud::Common::AbstractModel
283
+ # @param ResultImage: 根据入参 RspImgType 填入不同,返回不同的内容。 如果传入 base64 则返回生成图 Base64 编码。 如果传入 url 则返回的生成图 URL , 有效期1小时,请及时保存。
284
+ # @type ResultImage: String
285
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
286
+ # @type RequestId: String
287
+
288
+ attr_accessor :ResultImage, :RequestId
289
+
290
+ def initialize(resultimage=nil, requestid=nil)
291
+ @ResultImage = resultimage
292
+ @RequestId = requestid
293
+ end
294
+
295
+ def deserialize(params)
296
+ @ResultImage = params['ResultImage']
297
+ @RequestId = params['RequestId']
298
+ end
299
+ end
300
+
301
+ # ImageOutpainting请求参数结构体
302
+ class ImageOutpaintingRequest < TencentCloud::Common::AbstractModel
303
+ # @param Ratio: 扩展后的比例(宽:高),需要不等于原图比例。
304
+ # 支持:1:1、4:3、3:4、16:9、9:16
305
+ # @type Ratio: String
306
+ # @param InputImage: 输入图 Base64 数据。
307
+ # Base64 和 Url 必须提供一个,如果都提供以 Url 为准。
308
+ # 图片限制:单边分辨率小于5000,转成 Base64 字符串后小于 6MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。
309
+ # @type InputImage: String
310
+ # @param InputUrl: 输入图 Url。
311
+ # Base64 和 Url 必须提供一个,如果都提供以 Url 为准。
312
+ # 图片限制:单边分辨率小于5000,转成 Base64 字符串后小于 6MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。
313
+ # @type InputUrl: String
314
+ # @param RspImgType: 返回图像方式(base64 或 url) ,二选一,默认为 base64。url 有效期为1小时。
315
+ # @type RspImgType: String
316
+ # @param LogoAdd: 为生成结果图添加标识的开关,默认为1。
317
+ # 1:添加标识。
318
+ # 0:不添加标识。
319
+ # 其他数值:默认按1处理。
320
+ # 建议您使用显著标识来提示结果图使用了 AI 绘画技术,是 AI 生成的图片。
321
+ # @type LogoAdd: Integer
322
+ # @param LogoParam: 标识内容设置。
323
+ # 默认在生成结果图右下角添加“图片由 AI 生成”字样,您可根据自身需要替换为其他的标识图片。
324
+ # @type LogoParam: :class:`Tencentcloud::Aiart.v20221229.models.LogoParam`
325
+
326
+ attr_accessor :Ratio, :InputImage, :InputUrl, :RspImgType, :LogoAdd, :LogoParam
327
+
328
+ def initialize(ratio=nil, inputimage=nil, inputurl=nil, rspimgtype=nil, logoadd=nil, logoparam=nil)
329
+ @Ratio = ratio
330
+ @InputImage = inputimage
331
+ @InputUrl = inputurl
332
+ @RspImgType = rspimgtype
333
+ @LogoAdd = logoadd
334
+ @LogoParam = logoparam
335
+ end
336
+
337
+ def deserialize(params)
338
+ @Ratio = params['Ratio']
339
+ @InputImage = params['InputImage']
340
+ @InputUrl = params['InputUrl']
341
+ @RspImgType = params['RspImgType']
342
+ @LogoAdd = params['LogoAdd']
343
+ unless params['LogoParam'].nil?
344
+ @LogoParam = LogoParam.new
345
+ @LogoParam.deserialize(params['LogoParam'])
346
+ end
347
+ end
348
+ end
349
+
350
+ # ImageOutpainting返回参数结构体
351
+ class ImageOutpaintingResponse < TencentCloud::Common::AbstractModel
352
+ # @param ResultImage: 根据入参 RspImgType 填入不同,返回不同的内容。
353
+ # 如果传入 base64 则返回生成图 Base64 编码。
354
+ # 如果传入 url 则返回的生成图 URL , 有效期1小时,请及时保存。
355
+ # @type ResultImage: String
356
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
357
+ # @type RequestId: String
358
+
359
+ attr_accessor :ResultImage, :RequestId
360
+
361
+ def initialize(resultimage=nil, requestid=nil)
362
+ @ResultImage = resultimage
363
+ @RequestId = requestid
364
+ end
365
+
366
+ def deserialize(params)
367
+ @ResultImage = params['ResultImage']
368
+ @RequestId = params['RequestId']
369
+ end
370
+ end
371
+
223
372
  # ImageToImage请求参数结构体
224
373
  class ImageToImageRequest < TencentCloud::Common::AbstractModel
225
374
  # @param InputImage: 输入图 Base64 数据。
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tencentcloud-sdk-aiart
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.956
4
+ version: 3.0.958
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tencent Cloud
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-06 00:00:00.000000000 Z
11
+ date: 2024-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tencentcloud-sdk-common