飞链云版图-开放平台接口
  1. AI绘画公开API接口,联系客服接入
飞链云版图-开放平台接口
  • AIGC-OPEN-API
    • 常见问题答疑
    • 模型、模式、提示词、排除词、等绘画参数介绍
    • 对接步骤和费用说明
    • AI绘画公开API接口,联系客服接入
      • 图生图、文生图模型的选择模式
      • AI绘画查询图片详情接口
        GET
      • 获取放大后的图片
        GET
      • 图片生成图片
        POST
      • 图片放大
        POST
      • 文本生成图片
        POST
  • AI绘画模型和模式相关接口
    • 获取模型列表和模型对应的模式列表说明
    • 首页模型列表接口
      GET
    • 菜单综合选项
      GET
  1. AI绘画公开API接口,联系客服接入

文本生成图片

POST
https://ai-api-test.feilianyun.cn/open/token/ai/easy/txt2img
AI绘画公开API接口,联系客服接入
通过选择参数和输入关键提示词生成图片,支持批量生成。语雀旧文档参考 https://feilianyun.yuque.com/bu08xt/bt/gz07i6oyxrnh1x1i

请求参数

Body 参数application/json
文本生成图片
artist
array[string]
可选
艺术家(集合)具体参数值见:https://feilianyun.yuque.com/bu08xt/bt/wrgdges69bt2xhs9#I3OfC
batchSize
integer <int32>
可选
图片生成的数量 1 2 4 8,默认1 可选参数
cfgScaleType
integer <int32>
必需
精确度1=默认 2=高 3=超高 ,想法匹配度
colorStyle
array[string]
色调选择,可选参数
可选
faceOptimize
integer <int32>
可选
面部优化: 0关闭 1开启
hiresFixType
integer <int32>
可选
二次重绘参数,默认0=关闭 1=1.5倍 、2=1.75倍、3=2倍,二次精度放大+重新绘制),可选参数
imageScale
string 
必需
画幅,用户生成图片比例,如: 1:1,1:2,2:1,3:4,4:3,9:16,16:9
model
integer <int32>
必需
模型类别,必传参数。详细说明见https://feilianyun.yuque.com/bu08xt/bt/xaurvgobuc3aunky 文档。 0=二次元模型、1=二点五次元 、2=三次元模型 、3= doll模型、4=梦幻模型 、5=国风模型 、6=奇幻模型、 7=艺术模型、8=2.5次元模型1.1、9=Doll模型2.5D
negativePrompt
string 
可选
图片排除的关键字,图片不会生成在该关键词中的描述,可选参数
paintPattern
integer <int32>
必需
模型下对应的模式风格类型 默认2通用风。详细说明见https://feilianyun.yuque.com/bu08xt/bt/xaurvgobuc3aunky 文档。
paintStyle
array[string]
可选
风格集合,具体参数值见 https://feilianyun.yuque.com/bu08xt/bt/wrgdges69bt2xhs9#I3OfC
picture
string 
可选
画幅,不推荐使用,将再后续维护中移除 ,请使用imageScale 默认1:1,9:16,16:9,3:4,4:3 可选参数,不传默认1:1
pixel
integer <int32>
可选
兼容老版本字段,不推荐使用,可选参数,图片精细度:默认1,图片像素,1-标清,2-高清,3-超清 4-超高清
prompt
string 
必需
图片描述的关键字,必传参数
render
array[string]
可选
渲染(集合)具体参数值见:https://feilianyun.yuque.com/bu08xt/bt/wrgdges69bt2xhs9#I3OfC
scene
array[string]
场景,可选参数
可选
seedNum
integer <int64>
可选
微调使用,种子数,可选参数
similarity
integer <int32>
可选
可选参数 相似度 1~100 ,可选参数,默认62
stepType
integer <int32>
必需
步骤值(图片精细度),旧的参数pixel将再后续移除 1=默认 2=高 3=超高 4=超高+
token
string 
必需
必传参数,分配的token令牌,接入时联系客服
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 '{
    "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"
    ]
}'

返回响应

🟢200OK
application/json
Body
code
integer <int32>
可选
200-表示业务处理成功;401-未认证(签名错误),校验未通过;403-表示未登录,需要登录才能操作;其他值都表示失败
data
string 
可选
返回成功时,有业务数据都情况下,才会有的业务值
message
string 
可选
失败时会返回的失败原因
示例
{
  "code": 0,
  "data": "string",
  "message": "string"
}
🟢201Created
🟠401Unauthorized
🟠403Forbidden
🟠404Not Found
上一页
图片放大
下一页
获取模型列表和模型对应的模式列表说明
Built with