public class TextToImageRequest extends AbstractModel
header, skipSign
Constructor and Description |
---|
TextToImageRequest() |
TextToImageRequest(TextToImageRequest source)
NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
|
Modifier and Type | Method and Description |
---|---|
Long |
getLogoAdd()
Get 为生成结果图添加标识的开关,默认为1。
1:添加标识。
0:不添加标识。
其他数值:默认按1处理。
建议您使用显著标识来提示结果图使用了 AI 绘画技术,是 AI 生成的图片。
|
LogoParam |
getLogoParam()
Get 标识内容设置。
默认在生成结果图右下角添加“图片由 AI 生成”字样,您可根据自身需要替换为其他的标识图片。
|
String |
getNegativePrompt()
Get 反向文本描述。
用于一定程度上从反面引导模型生成的走向,减少生成结果中出现描述内容的可能,但不能完全杜绝。
推荐使用中文。最多可传256个 utf-8 字符。
|
String |
getPrompt()
Get 文本描述。
算法将根据输入的文本智能生成与之相关的图像。建议详细描述画面主体、细节、场景等,文本描述越丰富,生成效果越精美。
不能为空,推荐使用中文。最多可传256个 utf-8 字符。
|
ResultConfig |
getResultConfig()
Get 生成图结果的配置,包括输出图片分辨率和尺寸等。
支持生成以下分辨率的图片:768:768(1:1)、768:1024(3:4)、1024:768(4:3)、1024:1024(1:1)、720:1280(9:16)、1280:720(16:9)、768:1280(3:5)、1280:768(5:3)、1080:1920(9:16)、1920:1080(16:9),不传默认使用768:768。
|
String |
getRspImgType()
Get 返回图像方式(base64 或 url) ,二选一,默认为 base64。url 有效期为1小时。
|
String[] |
getStyles()
Get 绘画风格。
请在 [智能文生图风格列表](https://cloud.tencent.com/document/product/1668/86249) 中选择期望的风格,传入风格编号。
推荐使用且只使用一种风格。不传默认使用201(日系动漫风格)。
|
void |
setLogoAdd(Long LogoAdd)
Set 为生成结果图添加标识的开关,默认为1。
1:添加标识。
0:不添加标识。
其他数值:默认按1处理。
建议您使用显著标识来提示结果图使用了 AI 绘画技术,是 AI 生成的图片。
|
void |
setLogoParam(LogoParam LogoParam)
Set 标识内容设置。
默认在生成结果图右下角添加“图片由 AI 生成”字样,您可根据自身需要替换为其他的标识图片。
|
void |
setNegativePrompt(String NegativePrompt)
Set 反向文本描述。
用于一定程度上从反面引导模型生成的走向,减少生成结果中出现描述内容的可能,但不能完全杜绝。
推荐使用中文。最多可传256个 utf-8 字符。
|
void |
setPrompt(String Prompt)
Set 文本描述。
算法将根据输入的文本智能生成与之相关的图像。建议详细描述画面主体、细节、场景等,文本描述越丰富,生成效果越精美。
不能为空,推荐使用中文。最多可传256个 utf-8 字符。
|
void |
setResultConfig(ResultConfig ResultConfig)
Set 生成图结果的配置,包括输出图片分辨率和尺寸等。
支持生成以下分辨率的图片:768:768(1:1)、768:1024(3:4)、1024:768(4:3)、1024:1024(1:1)、720:1280(9:16)、1280:720(16:9)、768:1280(3:5)、1280:768(5:3)、1080:1920(9:16)、1920:1080(16:9),不传默认使用768:768。
|
void |
setRspImgType(String RspImgType)
Set 返回图像方式(base64 或 url) ,二选一,默认为 base64。url 有效期为1小时。
|
void |
setStyles(String[] Styles)
Set 绘画风格。
请在 [智能文生图风格列表](https://cloud.tencent.com/document/product/1668/86249) 中选择期望的风格,传入风格编号。
推荐使用且只使用一种风格。不传默认使用201(日系动漫风格)。
|
void |
toMap(HashMap<String,String> map,
String prefix)
Internal implementation, normal users should not use it.
|
any, fromJsonString, getBinaryParams, GetHeader, getMultipartRequestParams, getSkipSign, isStream, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonString
public TextToImageRequest()
public TextToImageRequest(TextToImageRequest source)
public String getPrompt()
public void setPrompt(String Prompt)
Prompt
- 文本描述。
算法将根据输入的文本智能生成与之相关的图像。建议详细描述画面主体、细节、场景等,文本描述越丰富,生成效果越精美。
不能为空,推荐使用中文。最多可传256个 utf-8 字符。public String getNegativePrompt()
public void setNegativePrompt(String NegativePrompt)
NegativePrompt
- 反向文本描述。
用于一定程度上从反面引导模型生成的走向,减少生成结果中出现描述内容的可能,但不能完全杜绝。
推荐使用中文。最多可传256个 utf-8 字符。public String[] getStyles()
public void setStyles(String[] Styles)
Styles
- 绘画风格。
请在 [智能文生图风格列表](https://cloud.tencent.com/document/product/1668/86249) 中选择期望的风格,传入风格编号。
推荐使用且只使用一种风格。不传默认使用201(日系动漫风格)。public ResultConfig getResultConfig()
public void setResultConfig(ResultConfig ResultConfig)
ResultConfig
- 生成图结果的配置,包括输出图片分辨率和尺寸等。
支持生成以下分辨率的图片:768:768(1:1)、768:1024(3:4)、1024:768(4:3)、1024:1024(1:1)、720:1280(9:16)、1280:720(16:9)、768:1280(3:5)、1280:768(5:3)、1080:1920(9:16)、1920:1080(16:9),不传默认使用768:768。public Long getLogoAdd()
public void setLogoAdd(Long LogoAdd)
LogoAdd
- 为生成结果图添加标识的开关,默认为1。
1:添加标识。
0:不添加标识。
其他数值:默认按1处理。
建议您使用显著标识来提示结果图使用了 AI 绘画技术,是 AI 生成的图片。public LogoParam getLogoParam()
public void setLogoParam(LogoParam LogoParam)
LogoParam
- 标识内容设置。
默认在生成结果图右下角添加“图片由 AI 生成”字样,您可根据自身需要替换为其他的标识图片。public String getRspImgType()
public void setRspImgType(String RspImgType)
RspImgType
- 返回图像方式(base64 或 url) ,二选一,默认为 base64。url 有效期为1小时。Copyright © 2024. All rights reserved.