tencentcloud-sdk-ai3d 3.0.1096

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 62b9c0284aabdeafa0d49876e9310858757a3f84
4
+ data.tar.gz: 65788d1dbc397ee882650bf927b265892f6bf93d
5
+ SHA512:
6
+ metadata.gz: d826d7f111a14cc1527ba4169082ab0c3b81d170271185a38f12a88ac064c2cea68d07d3cc2201ff55c786b414cd09f2f7908843e609870c7a7be1e5c516e6ae
7
+ data.tar.gz: 06ae4a49e83ec0d21135188b1c2baef7f646eca770fb7aed06c4878475d3b7acca4a82af1497317ad27fca2ef284588315349ba8038f755ecf24d51c248928fc
data/lib/VERSION ADDED
@@ -0,0 +1 @@
1
+ 3.0.1096
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'tencentcloud-sdk-common'
4
+
5
+ require_relative 'v20250513/client'
6
+ require_relative 'v20250513/models'
7
+
8
+ module TencentCloud
9
+ module Ai3d
10
+ end
11
+ end
@@ -0,0 +1,86 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2017-2025 Tencent. All Rights Reserved.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ require 'json'
18
+
19
+ module TencentCloud
20
+ module Ai3d
21
+ module V20250513
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2025-05-13'
26
+ api_endpoint = 'ai3d.tencentcloudapi.com'
27
+ sdk_version = 'AI3D_' + File.read(File.expand_path('../VERSION', __dir__)).strip
28
+ super(credential, region, api_version, api_endpoint, sdk_version, profile)
29
+ end
30
+
31
+
32
+ # 混元生3D接口,基于混元大模型,根据输入的文本描述/图片智能生成3D。
33
+ # 默认提供1个并发,代表最多能同时处理1个已提交的任务,上一个任务处理完毕后,才能开始处理下一个任务。
34
+
35
+ # @param request: Request instance for QueryHunyuanTo3DJob.
36
+ # @type request: :class:`Tencentcloud::ai3d::V20250513::QueryHunyuanTo3DJobRequest`
37
+ # @rtype: :class:`Tencentcloud::ai3d::V20250513::QueryHunyuanTo3DJobResponse`
38
+ def QueryHunyuanTo3DJob(request)
39
+ body = send_request('QueryHunyuanTo3DJob', request.serialize)
40
+ response = JSON.parse(body)
41
+ if response['Response'].key?('Error') == false
42
+ model = QueryHunyuanTo3DJobResponse.new
43
+ model.deserialize(response['Response'])
44
+ model
45
+ else
46
+ code = response['Response']['Error']['Code']
47
+ message = response['Response']['Error']['Message']
48
+ reqid = response['Response']['RequestId']
49
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
50
+ end
51
+ rescue TencentCloud::Common::TencentCloudSDKException => e
52
+ raise e
53
+ rescue StandardError => e
54
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
55
+ end
56
+
57
+ # 混元生3D接口,基于混元大模型,根据输入的文本描述/图片智能生成3D。
58
+ # 默认提供1个并发,代表最多能同时处理1个已提交的任务,上一个任务处理完毕后,才能开始处理下一个任务。
59
+
60
+ # @param request: Request instance for SubmitHunyuanTo3DJob.
61
+ # @type request: :class:`Tencentcloud::ai3d::V20250513::SubmitHunyuanTo3DJobRequest`
62
+ # @rtype: :class:`Tencentcloud::ai3d::V20250513::SubmitHunyuanTo3DJobResponse`
63
+ def SubmitHunyuanTo3DJob(request)
64
+ body = send_request('SubmitHunyuanTo3DJob', request.serialize)
65
+ response = JSON.parse(body)
66
+ if response['Response'].key?('Error') == false
67
+ model = SubmitHunyuanTo3DJobResponse.new
68
+ model.deserialize(response['Response'])
69
+ model
70
+ else
71
+ code = response['Response']['Error']['Code']
72
+ message = response['Response']['Error']['Message']
73
+ reqid = response['Response']['RequestId']
74
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
75
+ end
76
+ rescue TencentCloud::Common::TencentCloudSDKException => e
77
+ raise e
78
+ rescue StandardError => e
79
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
80
+ end
81
+
82
+
83
+ end
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,204 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2017-2025 Tencent. All Rights Reserved.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ module TencentCloud
18
+ module Ai3d
19
+ module V20250513
20
+ # 3D文件
21
+ class File3D < TencentCloud::Common::AbstractModel
22
+ # @param Type: 3D文件的格式。取值范围:OBJ
23
+ # @type Type: String
24
+ # @param Url: 文件的Url(有效期24小时)
25
+ # @type Url: String
26
+ # @param PreviewImageUrl: 预览图片Url
27
+ # @type PreviewImageUrl: String
28
+
29
+ attr_accessor :Type, :Url, :PreviewImageUrl
30
+
31
+ def initialize(type=nil, url=nil, previewimageurl=nil)
32
+ @Type = type
33
+ @Url = url
34
+ @PreviewImageUrl = previewimageurl
35
+ end
36
+
37
+ def deserialize(params)
38
+ @Type = params['Type']
39
+ @Url = params['Url']
40
+ @PreviewImageUrl = params['PreviewImageUrl']
41
+ end
42
+ end
43
+
44
+ # QueryHunyuanTo3DJob请求参数结构体
45
+ class QueryHunyuanTo3DJobRequest < TencentCloud::Common::AbstractModel
46
+ # @param JobId: 任务ID。
47
+ # @type JobId: String
48
+
49
+ attr_accessor :JobId
50
+
51
+ def initialize(jobid=nil)
52
+ @JobId = jobid
53
+ end
54
+
55
+ def deserialize(params)
56
+ @JobId = params['JobId']
57
+ end
58
+ end
59
+
60
+ # QueryHunyuanTo3DJob返回参数结构体
61
+ class QueryHunyuanTo3DJobResponse < TencentCloud::Common::AbstractModel
62
+ # @param Status: 任务状态。WAIT:等待中,RUN:执行中,FAIL:任务失败,DONE:任务成功
63
+ # @type Status: String
64
+ # @param ErrorCode: 错误码
65
+ # @type ErrorCode: String
66
+ # @param ErrorMessage: 错误信息
67
+ # @type ErrorMessage: String
68
+ # @param ResultFile3Ds: 生成的3D文件数组。
69
+ # @type ResultFile3Ds: Array
70
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
71
+ # @type RequestId: String
72
+
73
+ attr_accessor :Status, :ErrorCode, :ErrorMessage, :ResultFile3Ds, :RequestId
74
+
75
+ def initialize(status=nil, errorcode=nil, errormessage=nil, resultfile3ds=nil, requestid=nil)
76
+ @Status = status
77
+ @ErrorCode = errorcode
78
+ @ErrorMessage = errormessage
79
+ @ResultFile3Ds = resultfile3ds
80
+ @RequestId = requestid
81
+ end
82
+
83
+ def deserialize(params)
84
+ @Status = params['Status']
85
+ @ErrorCode = params['ErrorCode']
86
+ @ErrorMessage = params['ErrorMessage']
87
+ unless params['ResultFile3Ds'].nil?
88
+ @ResultFile3Ds = []
89
+ params['ResultFile3Ds'].each do |i|
90
+ file3d_tmp = File3D.new
91
+ file3d_tmp.deserialize(i)
92
+ @ResultFile3Ds << file3d_tmp
93
+ end
94
+ end
95
+ @RequestId = params['RequestId']
96
+ end
97
+ end
98
+
99
+ # SubmitHunyuanTo3DJob请求参数结构体
100
+ class SubmitHunyuanTo3DJobRequest < TencentCloud::Common::AbstractModel
101
+ # @param Prompt: 文生3D,3D内容的描述,中文正向提示词。
102
+ # 最多支持200个 utf-8 字符。
103
+ # 文生3D, image、image_url和 prompt必填其一,且prompt和image/image_url不能同时存在。
104
+ # @type Prompt: String
105
+ # @param ImageBase64: 输入图 Base64 数据。
106
+ # 大小:单边分辨率要求不小于128,不大于5000。大小不超过8m(base64编码后会大30%左右,建议实际输入图片不超过6m)
107
+ # 格式:jpg,png,jpeg,webp。
108
+ # ImageBase64、ImageUrl和 Prompt必填其一,且Prompt和ImageBase64/ImageUrl不能同时存在。
109
+ # @type ImageBase64: String
110
+ # @param ImageUrl: 输入图Url。
111
+ # 大小:单边分辨率要求不小于128,不大于5000。大小不超过8m(base64编码后会大30%左右,建议实际输入图片不超过6m)
112
+ # 格式:jpg,png,jpeg,webp。
113
+ # ImageBase64/ImageUrl和 Prompt必填其一,且Prompt和ImageBase64/ImageUrl不能同时存在。
114
+ # @type ImageUrl: String
115
+ # @param MultiViewImages: 多视角的模型图片,视角参考值:
116
+ # left:左视图;
117
+ # right:右视图;
118
+ # back:后视图;
119
+
120
+ # 每个视角仅限制一张图片。
121
+ # ●图片大小限制:编码后大小不可超过8M。
122
+ # ●图片分辨率限制:单边分辨率小于5000且大于128。
123
+ # ●支持图片格式:支持jpg或png
124
+ # @type MultiViewImages: Array
125
+ # @param ResultFormat: 生成模型的格式,仅限制生成一种格式。
126
+ # 生成模型文件组默认返回obj格式。
127
+ # 可选值:OBJ,GLB,STL,USDZ,FBX,MP4。
128
+ # @type ResultFormat: String
129
+ # @param EnablePBR: 是否开启 PBR材质生成,默认 false。
130
+ # @type EnablePBR: Boolean
131
+
132
+ attr_accessor :Prompt, :ImageBase64, :ImageUrl, :MultiViewImages, :ResultFormat, :EnablePBR
133
+
134
+ def initialize(prompt=nil, imagebase64=nil, imageurl=nil, multiviewimages=nil, resultformat=nil, enablepbr=nil)
135
+ @Prompt = prompt
136
+ @ImageBase64 = imagebase64
137
+ @ImageUrl = imageurl
138
+ @MultiViewImages = multiviewimages
139
+ @ResultFormat = resultformat
140
+ @EnablePBR = enablepbr
141
+ end
142
+
143
+ def deserialize(params)
144
+ @Prompt = params['Prompt']
145
+ @ImageBase64 = params['ImageBase64']
146
+ @ImageUrl = params['ImageUrl']
147
+ unless params['MultiViewImages'].nil?
148
+ @MultiViewImages = []
149
+ params['MultiViewImages'].each do |i|
150
+ viewimage_tmp = ViewImage.new
151
+ viewimage_tmp.deserialize(i)
152
+ @MultiViewImages << viewimage_tmp
153
+ end
154
+ end
155
+ @ResultFormat = params['ResultFormat']
156
+ @EnablePBR = params['EnablePBR']
157
+ end
158
+ end
159
+
160
+ # SubmitHunyuanTo3DJob返回参数结构体
161
+ class SubmitHunyuanTo3DJobResponse < TencentCloud::Common::AbstractModel
162
+ # @param JobId: 任务ID(有效期24小时)
163
+ # @type JobId: String
164
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
165
+ # @type RequestId: String
166
+
167
+ attr_accessor :JobId, :RequestId
168
+
169
+ def initialize(jobid=nil, requestid=nil)
170
+ @JobId = jobid
171
+ @RequestId = requestid
172
+ end
173
+
174
+ def deserialize(params)
175
+ @JobId = params['JobId']
176
+ @RequestId = params['RequestId']
177
+ end
178
+ end
179
+
180
+ # 多视角图片
181
+ class ViewImage < TencentCloud::Common::AbstractModel
182
+ # @param ViewType: 视角类型。
183
+ # 取值:back、left、right
184
+ # @type ViewType: String
185
+ # @param ViewImageUrl: 图片Url地址
186
+ # @type ViewImageUrl: String
187
+
188
+ attr_accessor :ViewType, :ViewImageUrl
189
+
190
+ def initialize(viewtype=nil, viewimageurl=nil)
191
+ @ViewType = viewtype
192
+ @ViewImageUrl = viewimageurl
193
+ end
194
+
195
+ def deserialize(params)
196
+ @ViewType = params['ViewType']
197
+ @ViewImageUrl = params['ViewImageUrl']
198
+ end
199
+ end
200
+
201
+ end
202
+ end
203
+ end
204
+
metadata ADDED
@@ -0,0 +1,66 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tencentcloud-sdk-ai3d
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.0.1096
5
+ platform: ruby
6
+ authors:
7
+ - Tencent Cloud
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2025-07-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: tencentcloud-sdk-common
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '3.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '3.0'
27
+ description: Tencent Cloud Ruby SDK is the official software development kit, which
28
+ allows Ruby developers to write software that makes use of Tencent Cloud service
29
+ AI3D.
30
+ email:
31
+ - tencentcloudapi@tencent.com
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files: []
35
+ files:
36
+ - lib/tencentcloud-sdk-ai3d.rb
37
+ - lib/v20250513/client.rb
38
+ - lib/v20250513/models.rb
39
+ - lib/VERSION
40
+ homepage: https://github.com/TencentCloud/tencentcloud-sdk-ruby
41
+ licenses:
42
+ - Apache-2.0
43
+ metadata:
44
+ source_code_uri: https://github.com/TencentCloud/tencentcloud-sdk-ruby/tencentcloud-sdk-ai3d
45
+ changelog_uri: https://github.com/TencentCloud/tencentcloud-sdk-ruby/blob/master/CHANGELOG.md
46
+ post_install_message:
47
+ rdoc_options: []
48
+ require_paths:
49
+ - lib
50
+ required_ruby_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ required_rubygems_version: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - '>='
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ requirements: []
61
+ rubyforge_project:
62
+ rubygems_version: 2.0.14
63
+ signing_key:
64
+ specification_version: 4
65
+ summary: Tencent Cloud SDK for Ruby - AI3D
66
+ test_files: []