- AIGC-OPEN-API
- AI绘画模型和模式相关接口
文本生成图片
POST
https://ai-api-test.feilianyun.cn/open/token/ai/easy/txt2img
AI绘画公开API接口,联系客服接入
请求参数
Body 参数application/json
文本生成图片
artist
array[string]
可选
batchSize
integer <int32>
可选
cfgScaleType
integer <int32>
必需
colorStyle
array[string]
色调选择,可选参数
faceOptimize
integer <int32>
可选
hiresFixType
integer <int32>
可选
imageScale
string
必需
model
integer <int32>
必需
negativePrompt
string
可选
paintPattern
integer <int32>
必需
paintStyle
array[string]
可选
picture
string
可选
pixel
integer <int32>
可选
prompt
string
必需
render
array[string]
可选
scene
array[string]
场景,可选参数
seedNum
integer <int64>
可选
similarity
integer <int32>
可选
stepType
integer <int32>
必需
token
string
必需
view
array[string]
视觉,可选参数
示例
{
"artist": [
"string"
],
"batchSize": 0,
"cfgScaleType": 0,
"colorStyle": [
"string"
],
"faceOptimize": 0,
"hiresFixType": 0,
"imageScale": "string",
"model": 0,
"negativePrompt": "string",
"paintPattern": 0,
"paintStyle": [
"string"
],
"picture": "string",
"pixel": 0,
"prompt": "string",
"render": [
"string"
],
"scene": [
"string"
],
"seedNum": 0,
"similarity": 0,
"stepType": 0,
"token": "string",
"view": [
"string"
]
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://ai-api-test.feilianyun.cn/open/token/ai/easy/txt2img' \
--header 'Content-Type: application/json' \
--data-raw ''
返回响应
🟢200OK
application/json
Body
code
integer <int32>
可选
data
string
可选
message
string
可选
示例
{
"code": 0,
"data": "string",
"message": "string"
}
🟢201Created
🟠401Unauthorized
🟠403Forbidden
🟠404Not Found
修改于 2023-05-06 09:12:58