Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) QueryHunyuanTo3DProJob(request *QueryHunyuanTo3DProJobRequest) (response *QueryHunyuanTo3DProJobResponse, err error)
- func (c *Client) QueryHunyuanTo3DProJobWithContext(ctx context.Context, request *QueryHunyuanTo3DProJobRequest) (response *QueryHunyuanTo3DProJobResponse, err error)
- func (c *Client) SubmitHunyuanTo3DProJob(request *SubmitHunyuanTo3DProJobRequest) (response *SubmitHunyuanTo3DProJobResponse, err error)
- func (c *Client) SubmitHunyuanTo3DProJobWithContext(ctx context.Context, request *SubmitHunyuanTo3DProJobRequest) (response *SubmitHunyuanTo3DProJobResponse, err error)
- type File3D
- type QueryHunyuanTo3DProJobRequest
- type QueryHunyuanTo3DProJobRequestParams
- type QueryHunyuanTo3DProJobResponse
- type QueryHunyuanTo3DProJobResponseParams
- type SubmitHunyuanTo3DProJobRequest
- type SubmitHunyuanTo3DProJobRequestParams
- type SubmitHunyuanTo3DProJobResponse
- type SubmitHunyuanTo3DProJobResponseParams
- type ViewImage
Constants ¶
const APIVersion = "2023-09-01"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func NewClient ¶
func NewClient(credential common.CredentialIface, region string, clientProfile *profile.ClientProfile) (client *Client, err error)
func NewClientWithSecretId ¶
Deprecated
func (*Client) QueryHunyuanTo3DProJob ¶
func (c *Client) QueryHunyuanTo3DProJob(request *QueryHunyuanTo3DProJobRequest) (response *QueryHunyuanTo3DProJobResponse, err error)
QueryHunyuanTo3DProJob This API is used to intelligently generate 3D content based on the HunYuan Large Model and input text descriptions/images.
This API is used to provide 3 concurrent tasks by default, which can process 3 submitted tasks simultaneously. The next task can be processed only after the previous task is completed.
func (*Client) QueryHunyuanTo3DProJobWithContext ¶
func (c *Client) QueryHunyuanTo3DProJobWithContext(ctx context.Context, request *QueryHunyuanTo3DProJobRequest) (response *QueryHunyuanTo3DProJobResponse, err error)
QueryHunyuanTo3DProJob This API is used to intelligently generate 3D content based on the HunYuan Large Model and input text descriptions/images.
This API is used to provide 3 concurrent tasks by default, which can process 3 submitted tasks simultaneously. The next task can be processed only after the previous task is completed.
func (*Client) SubmitHunyuanTo3DProJob ¶
func (c *Client) SubmitHunyuanTo3DProJob(request *SubmitHunyuanTo3DProJobRequest) (response *SubmitHunyuanTo3DProJobResponse, err error)
SubmitHunyuanTo3DProJob This API is used to intelligently generate 3D content based on the HunYuan Large Model and input text descriptions/images.
This API is used to provide 3 concurrent tasks by default. Up to 3 submitted tasks can be processed simultaneously. A new task can be processed only after the previous one is completed.
func (*Client) SubmitHunyuanTo3DProJobWithContext ¶
func (c *Client) SubmitHunyuanTo3DProJobWithContext(ctx context.Context, request *SubmitHunyuanTo3DProJobRequest) (response *SubmitHunyuanTo3DProJobResponse, err error)
SubmitHunyuanTo3DProJob This API is used to intelligently generate 3D content based on the HunYuan Large Model and input text descriptions/images.
This API is used to provide 3 concurrent tasks by default. Up to 3 submitted tasks can be processed simultaneously. A new task can be processed only after the previous one is completed.
type File3D ¶
type File3D struct {
// 3D file format. valid values: GIF, OBJ.
Type *string `json:"Type,omitnil,omitempty" name:"Type"`
// Specifies the file Url (valid for 24 hours).
Url *string `json:"Url,omitnil,omitempty" name:"Url"`
// Preview image Url.
PreviewImageUrl *string `json:"PreviewImageUrl,omitnil,omitempty" name:"PreviewImageUrl"`
}
type QueryHunyuanTo3DProJobRequest ¶
type QueryHunyuanTo3DProJobRequest struct {
*tchttp.BaseRequest
// Task ID.
JobId *string `json:"JobId,omitnil,omitempty" name:"JobId"`
}
func NewQueryHunyuanTo3DProJobRequest ¶
func NewQueryHunyuanTo3DProJobRequest() (request *QueryHunyuanTo3DProJobRequest)
func (*QueryHunyuanTo3DProJobRequest) FromJsonString ¶
func (r *QueryHunyuanTo3DProJobRequest) FromJsonString(s string) error
FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*QueryHunyuanTo3DProJobRequest) ToJsonString ¶
func (r *QueryHunyuanTo3DProJobRequest) ToJsonString() string
type QueryHunyuanTo3DProJobRequestParams ¶
type QueryHunyuanTo3DProJobRequestParams struct {
// Task ID.
JobId *string `json:"JobId,omitnil,omitempty" name:"JobId"`
}
Predefined struct for user
type QueryHunyuanTo3DProJobResponse ¶
type QueryHunyuanTo3DProJobResponse struct {
*tchttp.BaseResponse
Response *QueryHunyuanTo3DProJobResponseParams `json:"Response"`
}
func NewQueryHunyuanTo3DProJobResponse ¶
func NewQueryHunyuanTo3DProJobResponse() (response *QueryHunyuanTo3DProJobResponse)
func (*QueryHunyuanTo3DProJobResponse) FromJsonString ¶
func (r *QueryHunyuanTo3DProJobResponse) FromJsonString(s string) error
FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*QueryHunyuanTo3DProJobResponse) ToJsonString ¶
func (r *QueryHunyuanTo3DProJobResponse) ToJsonString() string
type QueryHunyuanTo3DProJobResponseParams ¶
type QueryHunyuanTo3DProJobResponseParams struct {
// Task status. WAIT: waiting; RUN: running; FAIL: failed; DONE: successful.
Status *string `json:"Status,omitnil,omitempty" name:"Status"`
// Error code
ErrorCode *string `json:"ErrorCode,omitnil,omitempty" name:"ErrorCode"`
// Error message
ErrorMessage *string `json:"ErrorMessage,omitnil,omitempty" name:"ErrorMessage"`
// Describes the generated 3d file array.
ResultFile3Ds []*File3D `json:"ResultFile3Ds,omitnil,omitempty" name:"ResultFile3Ds"`
// The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
}
Predefined struct for user
type SubmitHunyuanTo3DProJobRequest ¶
type SubmitHunyuanTo3DProJobRequest struct {
*tchttp.BaseRequest
// Generates 3D content, describes 3D content.
// Supports up to 1024 utf-8 characters.
// Text-To-3D. Specifies either ImageBase64/ImageUrl or Prompt is required. Prompt and ImageBase64/ImageUrl cannot coexist.
Prompt *string `json:"Prompt,omitnil,omitempty" name:"Prompt"`
// Enter the Base64 code of the image.
// Size: specifies the unilateral resolution requirement, not less than 128 and not greater than 5000. size should not exceed 8m (after encoding, it increases by about 30%, recommend actual input image size no more than 6m).
// Input image suggestion:
// 1.Simple background (solid-color background)
// 2.No text or blended colors
// 3.Single object
// 4.The object occupies over 50% of the frame
// Valid values: jpg, png, jpeg, webp.
// Specifies either ImageBase64/ImageUrl or Prompt is required. Prompt and ImageBase64/ImageUrl cannot coexist.
ImageBase64 *string `json:"ImageBase64,omitnil,omitempty" name:"ImageBase64"`
// Input image Url.
// Size: specifies the unilateral resolution requirement, not less than 128 and not greater than 5000. size should not exceed 8m (after encoding, it increases by about 30%, recommend actual input image size no more than 6m).
// Input image suggestion:
// 1.Simple background (solid-color background)
// 2.No text or blended colors
// 3.Single object
// 4.The object occupies over 50% of the frame
// Valid values: jpg, png, jpeg, webp.
// Specifies either ImageBase64/ImageUrl or Prompt is required. Prompt and ImageBase64/ImageUrl cannot coexist.
ImageUrl *string `json:"ImageUrl,omitnil,omitempty" name:"ImageUrl"`
// Multi-Perspective model image. reference value for viewing angle:.
// left view.
// right view.
// back view.
//
// Each perspective is limited to one image.
// Image size limit. the value must not exceed 8 mb after encoding.
// Image resolution limitation: the unilateral resolution should be less than 5000 and greater than 128.
// Supported image format: JPG or PNG
MultiViewImages []*ViewImage `json:"MultiViewImages,omitnil,omitempty" name:"MultiViewImages"`
// Specifies whether PBR material generation is enabled. default false.
EnablePBR *bool `json:"EnablePBR,omitnil,omitempty" name:"EnablePBR"`
// Specifies the face count for 3D model generation. default value is 500000.
// Specifies the supported face count generation range. value range: 40000-1500000.
FaceCount *int64 `json:"FaceCount,omitnil,omitempty" name:"FaceCount"`
// Generation task type. default: Normal. valid values:.
// Normal: generates a geometric model with textures.
// LowPoly: specifies the model generated after intelligent polygon reduction.
// Geometry: specifies whether to generate a Geometry model without textures (white model). when this task is selected, the EnablePBR parameter does not take effect.
// Specifies the Sketch for the generative model, allowing input of a Sketch or line drawing. in this mode, both prompt and ImageUrl/ImageBase64 can be entered together.
GenerateType *string `json:"GenerateType,omitnil,omitempty" name:"GenerateType"`
// This parameter only takes effect when LowPoly mode is selected from GenerateType.
//
// Polygon type, indicates the number of sides in the model's surface grid, defaults to triangle. valid values:.
// triangle. specifies the triangular face.
// quadrilateral: mix quadrangle and triangle faces to generate.
PolygonType *string `json:"PolygonType,omitnil,omitempty" name:"PolygonType"`
}
func NewSubmitHunyuanTo3DProJobRequest ¶
func NewSubmitHunyuanTo3DProJobRequest() (request *SubmitHunyuanTo3DProJobRequest)
func (*SubmitHunyuanTo3DProJobRequest) FromJsonString ¶
func (r *SubmitHunyuanTo3DProJobRequest) FromJsonString(s string) error
FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*SubmitHunyuanTo3DProJobRequest) ToJsonString ¶
func (r *SubmitHunyuanTo3DProJobRequest) ToJsonString() string
type SubmitHunyuanTo3DProJobRequestParams ¶
type SubmitHunyuanTo3DProJobRequestParams struct {
// Generates 3D content, describes 3D content.
// Supports up to 1024 utf-8 characters.
// Text-To-3D. Specifies either ImageBase64/ImageUrl or Prompt is required. Prompt and ImageBase64/ImageUrl cannot coexist.
Prompt *string `json:"Prompt,omitnil,omitempty" name:"Prompt"`
// Enter the Base64 code of the image.
// Size: specifies the unilateral resolution requirement, not less than 128 and not greater than 5000. size should not exceed 8m (after encoding, it increases by about 30%, recommend actual input image size no more than 6m).
// Input image suggestion:
// 1.Simple background (solid-color background)
// 2.No text or blended colors
// 3.Single object
// 4.The object occupies over 50% of the frame
// Valid values: jpg, png, jpeg, webp.
// Specifies either ImageBase64/ImageUrl or Prompt is required. Prompt and ImageBase64/ImageUrl cannot coexist.
ImageBase64 *string `json:"ImageBase64,omitnil,omitempty" name:"ImageBase64"`
// Input image Url.
// Size: specifies the unilateral resolution requirement, not less than 128 and not greater than 5000. size should not exceed 8m (after encoding, it increases by about 30%, recommend actual input image size no more than 6m).
// Input image suggestion:
// 1.Simple background (solid-color background)
// 2.No text or blended colors
// 3.Single object
// 4.The object occupies over 50% of the frame
// Valid values: jpg, png, jpeg, webp.
// Specifies either ImageBase64/ImageUrl or Prompt is required. Prompt and ImageBase64/ImageUrl cannot coexist.
ImageUrl *string `json:"ImageUrl,omitnil,omitempty" name:"ImageUrl"`
// Multi-Perspective model image. reference value for viewing angle:.
// left view.
// right view.
// back view.
//
// Each perspective is limited to one image.
// Image size limit. the value must not exceed 8 mb after encoding.
// Image resolution limitation: the unilateral resolution should be less than 5000 and greater than 128.
// Supported image format: JPG or PNG
MultiViewImages []*ViewImage `json:"MultiViewImages,omitnil,omitempty" name:"MultiViewImages"`
// Specifies whether PBR material generation is enabled. default false.
EnablePBR *bool `json:"EnablePBR,omitnil,omitempty" name:"EnablePBR"`
// Specifies the face count for 3D model generation. default value is 500000.
// Specifies the supported face count generation range. value range: 40000-1500000.
FaceCount *int64 `json:"FaceCount,omitnil,omitempty" name:"FaceCount"`
// Generation task type. default: Normal. valid values:.
// Normal: generates a geometric model with textures.
// LowPoly: specifies the model generated after intelligent polygon reduction.
// Geometry: specifies whether to generate a Geometry model without textures (white model). when this task is selected, the EnablePBR parameter does not take effect.
// Specifies the Sketch for the generative model, allowing input of a Sketch or line drawing. in this mode, both prompt and ImageUrl/ImageBase64 can be entered together.
GenerateType *string `json:"GenerateType,omitnil,omitempty" name:"GenerateType"`
// This parameter only takes effect when LowPoly mode is selected from GenerateType.
//
// Polygon type, indicates the number of sides in the model's surface grid, defaults to triangle. valid values:.
// triangle. specifies the triangular face.
// quadrilateral: mix quadrangle and triangle faces to generate.
PolygonType *string `json:"PolygonType,omitnil,omitempty" name:"PolygonType"`
}
Predefined struct for user
type SubmitHunyuanTo3DProJobResponse ¶
type SubmitHunyuanTo3DProJobResponse struct {
*tchttp.BaseResponse
Response *SubmitHunyuanTo3DProJobResponseParams `json:"Response"`
}
func NewSubmitHunyuanTo3DProJobResponse ¶
func NewSubmitHunyuanTo3DProJobResponse() (response *SubmitHunyuanTo3DProJobResponse)
func (*SubmitHunyuanTo3DProJobResponse) FromJsonString ¶
func (r *SubmitHunyuanTo3DProJobResponse) FromJsonString(s string) error
FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*SubmitHunyuanTo3DProJobResponse) ToJsonString ¶
func (r *SubmitHunyuanTo3DProJobResponse) ToJsonString() string
type SubmitHunyuanTo3DProJobResponseParams ¶
type SubmitHunyuanTo3DProJobResponseParams struct {
// Task ID (valid period: 24 hours).
JobId *string `json:"JobId,omitnil,omitempty" name:"JobId"`
// The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
}
Predefined struct for user
type ViewImage ¶
type ViewImage struct {
// Specifies the viewing angle type.
// Valid values: back, left, right.
ViewType *string `json:"ViewType,omitnil,omitempty" name:"ViewType"`
// Image Url.
ViewImageUrl *string `json:"ViewImageUrl,omitnil,omitempty" name:"ViewImageUrl"`
// base64 address of the image.
ViewImageBase64 *string `json:"ViewImageBase64,omitnil,omitempty" name:"ViewImageBase64"`
}