tencentcloud-sdk-aiart 3.0.1073 → 3.0.1093

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: 38c67987a1cf5a9bc1049e15e5cd611645c4a08c
4
- data.tar.gz: 00f1156bf9e5478b4e73b86fc3781a886a142cba
3
+ metadata.gz: 55cbd6fd2ec9b52c7c56f9b819b181549f869fb9
4
+ data.tar.gz: ecaa9ae3214dd0b34a266d493a3821047ea8f8ac
5
5
  SHA512:
6
- metadata.gz: 88e8daf756fe213584caeca2c7a18a63f1979690675ecfba39ec1fb592268ac41fe01de81d73b746c51ef297c40c25c6a3370ebf20e97b717ee60f5d41e67e04
7
- data.tar.gz: 3e0afdf94834ed744c53772ca92e3e7ed0ba364a1106b7c1bd5674d47f5e58319c7311844b39ef56c9d704f0c1aad66718f15d003e4d25916fa62d1f7c8dde99
6
+ metadata.gz: df54cc5842790e037e9803d73198d65c267b23d26a9c748441401b66e9aee9ecbf6323e89bf1f1983700d9047076eac315b1bf9df5a6a57d251fc6ee362286bf
7
+ data.tar.gz: 8b4e0f8c1e894b75f0fae61350905a47d77910bb5bdb5d63586846a7c15bbcc15f8759aa76bb6696ec5190ddd8a402ee2770fb76a78d11360414dae07fe12fd8
data/lib/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.1073
1
+ 3.0.1093
@@ -551,6 +551,56 @@ module TencentCloud
551
551
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
552
552
  end
553
553
 
554
+ # 混元文生图接口,基于混元大模型,根据输入的文本描述智能生成图片
555
+ # 默认提供1个并发,代表最多能同时处理1个已提交的任务,上一个任务处理完毕后,才能开始处理下一个任务。
556
+
557
+ # @param request: Request instance for TextToImageLite.
558
+ # @type request: :class:`Tencentcloud::aiart::V20221229::TextToImageLiteRequest`
559
+ # @rtype: :class:`Tencentcloud::aiart::V20221229::TextToImageLiteResponse`
560
+ def TextToImageLite(request)
561
+ body = send_request('TextToImageLite', request.serialize)
562
+ response = JSON.parse(body)
563
+ if response['Response'].key?('Error') == false
564
+ model = TextToImageLiteResponse.new
565
+ model.deserialize(response['Response'])
566
+ model
567
+ else
568
+ code = response['Response']['Error']['Code']
569
+ message = response['Response']['Error']['Message']
570
+ reqid = response['Response']['RequestId']
571
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
572
+ end
573
+ rescue TencentCloud::Common::TencentCloudSDKException => e
574
+ raise e
575
+ rescue StandardError => e
576
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
577
+ end
578
+
579
+ # 混元文生图接口,基于混元大模型,根据输入的文本描述智能生成图片
580
+ # 默认提供1个并发,代表最多能同时处理1个已提交的任务,上一个任务处理完毕后,才能开始处理下一个任务。
581
+
582
+ # @param request: Request instance for TextToImageRapid.
583
+ # @type request: :class:`Tencentcloud::aiart::V20221229::TextToImageRapidRequest`
584
+ # @rtype: :class:`Tencentcloud::aiart::V20221229::TextToImageRapidResponse`
585
+ def TextToImageRapid(request)
586
+ body = send_request('TextToImageRapid', request.serialize)
587
+ response = JSON.parse(body)
588
+ if response['Response'].key?('Error') == false
589
+ model = TextToImageRapidResponse.new
590
+ model.deserialize(response['Response'])
591
+ model
592
+ else
593
+ code = response['Response']['Error']['Code']
594
+ message = response['Response']['Error']['Message']
595
+ reqid = response['Response']['RequestId']
596
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
597
+ end
598
+ rescue TencentCloud::Common::TencentCloudSDKException => e
599
+ raise e
600
+ rescue StandardError => e
601
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
602
+ end
603
+
554
604
  # AI 写真分为上传训练图片、训练写真模型(可选跳过)、生成写真图片3个环节,需要依次调用对应接口。
555
605
  # 本接口用于上传人像图片并指定对应的写真模型 ID。上传的图片要求是同一个人,建议上传单人、正脸、脸部区域占比较大、脸部清晰无遮挡、无大角度偏转、无夸张表情的图片。
556
606
  # 可选模式:
@@ -243,6 +243,26 @@ module TencentCloud
243
243
  end
244
244
  end
245
245
 
246
+ # 图片
247
+ class Image < TencentCloud::Common::AbstractModel
248
+ # @param Base64: 图片Base64
249
+ # @type Base64: String
250
+ # @param Url: 图片Url
251
+ # @type Url: String
252
+
253
+ attr_accessor :Base64, :Url
254
+
255
+ def initialize(base64=nil, url=nil)
256
+ @Base64 = base64
257
+ @Url = url
258
+ end
259
+
260
+ def deserialize(params)
261
+ @Base64 = params['Base64']
262
+ @Url = params['Url']
263
+ end
264
+ end
265
+
246
266
  # ImageInpaintingRemoval请求参数结构体
247
267
  class ImageInpaintingRemovalRequest < TencentCloud::Common::AbstractModel
248
268
  # @param InputImage: 输入图 Base64 数据。
@@ -1462,6 +1482,210 @@ module TencentCloud
1462
1482
  end
1463
1483
  end
1464
1484
 
1485
+ # TextToImageLite请求参数结构体
1486
+ class TextToImageLiteRequest < TencentCloud::Common::AbstractModel
1487
+ # @param Prompt: 文本描述。将根据输入的文本智能生成与之相关的图像。
1488
+ # 不能为空,推荐使用中文。最多可传1024个 utf-8 字符。
1489
+ # @type Prompt: String
1490
+ # @param NegativePrompt: 反向提示词。 减少生成结果中出现描述内容。
1491
+ # 推荐使用中文。最多可传1024个 utf-8 字符。
1492
+ # @type NegativePrompt: String
1493
+ # @param Resolution: 生成图分辨率,默认1024:1024。
1494
+ # 支持的图像宽高比例: 1:1,3:4,4:3,9:16,16:9。
1495
+ # 支持的长边分辨率: 160,200,225,258,512,520,608,768,1024,1080,1280,1600,1620,1920,2048,2400,2560,2592,3440,3840,4096。
1496
+ # @type Resolution: String
1497
+ # @param Seed: 随机种子,默认随机。
1498
+ # 0:随机种子生成。
1499
+ # 不传:随机种子生成。
1500
+ # 正数:固定种子生成。
1501
+ # @type Seed: Integer
1502
+ # @param LogoAdd: 为生成结果图添加标识的开关,默认为1。
1503
+ # 1:添加标识。
1504
+ # 0:不添加标识。
1505
+ # 其他数值:默认按1处理。
1506
+ # 建议您使用显著标识来提示结果图使用了 AI 绘画技术,是 AI 生成的图片。
1507
+ # @type LogoAdd: Integer
1508
+ # @param LogoParam: 标识内容设置。
1509
+ # 默认在生成结果图右下角添加“图片由 AI 生成”字样,您可根据自身需要替换为其他的标识图片。
1510
+ # @type LogoParam: :class:`Tencentcloud::Aiart.v20221229.models.LogoParam`
1511
+ # @param RspImgType: 返回图像方式(base64 或 url),二选一,默认为 base64。url 有效期为1小时。
1512
+ # @type RspImgType: String
1513
+
1514
+ attr_accessor :Prompt, :NegativePrompt, :Resolution, :Seed, :LogoAdd, :LogoParam, :RspImgType
1515
+
1516
+ def initialize(prompt=nil, negativeprompt=nil, resolution=nil, seed=nil, logoadd=nil, logoparam=nil, rspimgtype=nil)
1517
+ @Prompt = prompt
1518
+ @NegativePrompt = negativeprompt
1519
+ @Resolution = resolution
1520
+ @Seed = seed
1521
+ @LogoAdd = logoadd
1522
+ @LogoParam = logoparam
1523
+ @RspImgType = rspimgtype
1524
+ end
1525
+
1526
+ def deserialize(params)
1527
+ @Prompt = params['Prompt']
1528
+ @NegativePrompt = params['NegativePrompt']
1529
+ @Resolution = params['Resolution']
1530
+ @Seed = params['Seed']
1531
+ @LogoAdd = params['LogoAdd']
1532
+ unless params['LogoParam'].nil?
1533
+ @LogoParam = LogoParam.new
1534
+ @LogoParam.deserialize(params['LogoParam'])
1535
+ end
1536
+ @RspImgType = params['RspImgType']
1537
+ end
1538
+ end
1539
+
1540
+ # TextToImageLite返回参数结构体
1541
+ class TextToImageLiteResponse < TencentCloud::Common::AbstractModel
1542
+ # @param ResultImage: 根据入参 RspImgType 填入不同,返回不同的内容。
1543
+ # 如果传入 base64 则返回生成图 Base64 编码。
1544
+ # 如果传入 url 则返回的生成图 URL , 有效期1小时,请及时保存。
1545
+ # @type ResultImage: String
1546
+ # @param Seed: Seed
1547
+ # @type Seed: Integer
1548
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1549
+ # @type RequestId: String
1550
+
1551
+ attr_accessor :ResultImage, :Seed, :RequestId
1552
+
1553
+ def initialize(resultimage=nil, seed=nil, requestid=nil)
1554
+ @ResultImage = resultimage
1555
+ @Seed = seed
1556
+ @RequestId = requestid
1557
+ end
1558
+
1559
+ def deserialize(params)
1560
+ @ResultImage = params['ResultImage']
1561
+ @Seed = params['Seed']
1562
+ @RequestId = params['RequestId']
1563
+ end
1564
+ end
1565
+
1566
+ # TextToImageRapid请求参数结构体
1567
+ class TextToImageRapidRequest < TencentCloud::Common::AbstractModel
1568
+ # @param Prompt: 文本描述。
1569
+ # 算法将根据输入的文本智能生成与之相关的图像。建议详细描述画面主体、细节、场景等,文本描述越丰富,生成效果越精美。
1570
+ # 不能为空,推荐使用中文。最多可传256个 utf-8 字符。
1571
+ # @type Prompt: String
1572
+ # @param Resolution: 生成图分辨率,默认1024:1024。
1573
+ # 支持的图像宽高比例: 1:1,3:4,4:3,9:16,16:9。
1574
+ # 支持的长边分辨率: 160,200,225,258,512,520,608,768,1024,1080,1280,1600,1620,1920,2048,2400,2560,2592,3440,3840,4096。
1575
+ # @type Resolution: String
1576
+ # @param Seed: 随机种子,默认随机。
1577
+ # 0:随机种子生成。
1578
+ # 不传:随机种子生成。
1579
+ # 正数:固定种子生成。
1580
+ # @type Seed: Integer
1581
+ # @param Image: 参考图。
1582
+
1583
+ # - Base64 和 Url 必须提供一个,如果都提供以 Url 为准。
1584
+ # - 当传入Image参数时,Style和Resolution参数不生效,输出图分辨率将保持Image传入图分辨率。
1585
+ # - 图片限制:单边分辨率大于128且小于2048;图片小于6M;格式支持 jpg、jpeg、png、bmp、tiff、webp。
1586
+ # @type Image: :class:`Tencentcloud::Aiart.v20221229.models.Image`
1587
+ # @param Style: 生成的图片风格,参考值:
1588
+
1589
+ # 1:宫崎骏风格;
1590
+ # 2:新海诚风格;
1591
+ # 3:去旅行风格;
1592
+ # 4:水彩风格;
1593
+ # 5:像素风格;
1594
+ # 6:童话世界风格;
1595
+ # 7:奇趣卡通风格;
1596
+ # 8:赛博朋克风格;
1597
+ # 9:极简风格;
1598
+ # 10:复古风格;
1599
+ # 11:暗黑系风格;
1600
+ # 12:波普风风格;
1601
+ # 13:糖果色风格;
1602
+ # 14:胶片电影风格;
1603
+ # 15:素描风格;
1604
+ # 16:水墨画风格;
1605
+ # 17:油画风格;
1606
+ # 18:粉笔风格;
1607
+ # 19:粘土风格;
1608
+ # 20:毛毡风格;
1609
+ # 21:刺绣风格;
1610
+ # 22:彩铅风格;
1611
+ # 23:莫奈风格;
1612
+ # 24:毕加索风格;
1613
+ # 25:穆夏风格;
1614
+ # 26:古风二次元风格;
1615
+ # 27:都市二次元风格;
1616
+ # 28:悬疑风格;
1617
+ # 29:校园风格;
1618
+ # 30:都市异能风格。
1619
+ # @type Style: String
1620
+ # @param LogoAdd: 为生成结果图添加标识的开关,默认为1。
1621
+ # 1:添加标识。
1622
+ # 0:不添加标识。
1623
+ # 其他数值:默认按1处理。
1624
+ # 建议您使用显著标识来提示结果图使用了 AI 绘画技术,是 AI 生成的图片。
1625
+ # @type LogoAdd: Integer
1626
+ # @param LogoParam: 标识内容设置。
1627
+ # 默认在生成结果图右下角添加“图片由 AI 生成”字样,您可根据自身需要替换为其他的标识图片。
1628
+ # @type LogoParam: :class:`Tencentcloud::Aiart.v20221229.models.LogoParam`
1629
+ # @param RspImgType: 返回图像方式(base64 或 url) ,二选一,默认为 base64。url 有效期为1小时。
1630
+ # @type RspImgType: String
1631
+
1632
+ attr_accessor :Prompt, :Resolution, :Seed, :Image, :Style, :LogoAdd, :LogoParam, :RspImgType
1633
+
1634
+ def initialize(prompt=nil, resolution=nil, seed=nil, image=nil, style=nil, logoadd=nil, logoparam=nil, rspimgtype=nil)
1635
+ @Prompt = prompt
1636
+ @Resolution = resolution
1637
+ @Seed = seed
1638
+ @Image = image
1639
+ @Style = style
1640
+ @LogoAdd = logoadd
1641
+ @LogoParam = logoparam
1642
+ @RspImgType = rspimgtype
1643
+ end
1644
+
1645
+ def deserialize(params)
1646
+ @Prompt = params['Prompt']
1647
+ @Resolution = params['Resolution']
1648
+ @Seed = params['Seed']
1649
+ unless params['Image'].nil?
1650
+ @Image = Image.new
1651
+ @Image.deserialize(params['Image'])
1652
+ end
1653
+ @Style = params['Style']
1654
+ @LogoAdd = params['LogoAdd']
1655
+ unless params['LogoParam'].nil?
1656
+ @LogoParam = LogoParam.new
1657
+ @LogoParam.deserialize(params['LogoParam'])
1658
+ end
1659
+ @RspImgType = params['RspImgType']
1660
+ end
1661
+ end
1662
+
1663
+ # TextToImageRapid返回参数结构体
1664
+ class TextToImageRapidResponse < TencentCloud::Common::AbstractModel
1665
+ # @param ResultImage: 根据入参 RspImgType 填入不同,返回不同的内容。
1666
+ # 如果传入 base64 则返回生成图 Base64 编码。
1667
+ # 如果传入 url 则返回的生成图 URL , 有效期1小时,请及时保存。
1668
+ # @type ResultImage: String
1669
+ # @param Seed: Seed
1670
+ # @type Seed: Integer
1671
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1672
+ # @type RequestId: String
1673
+
1674
+ attr_accessor :ResultImage, :Seed, :RequestId
1675
+
1676
+ def initialize(resultimage=nil, seed=nil, requestid=nil)
1677
+ @ResultImage = resultimage
1678
+ @Seed = seed
1679
+ @RequestId = requestid
1680
+ end
1681
+
1682
+ def deserialize(params)
1683
+ @ResultImage = params['ResultImage']
1684
+ @Seed = params['Seed']
1685
+ @RequestId = params['RequestId']
1686
+ end
1687
+ end
1688
+
1465
1689
  # TextToImage请求参数结构体
1466
1690
  class TextToImageRequest < TencentCloud::Common::AbstractModel
1467
1691
  # @param Prompt: 文本描述。
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.1073
4
+ version: 3.0.1093
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tencent Cloud
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-06-03 00:00:00.000000000 Z
11
+ date: 2025-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tencentcloud-sdk-common