- API文档
- 快速开发指南
- PPT API 文档
- 文多多(官方格式)
- 韦尼克(官方格式)
- 申请PPT生成任务(PPT描述/主题一键生成)
- 通过描述生成PPT标题大纲(逐步生成PPT)
- 根据标题生成封面预览图(模版封面图预览)
- 根据标题以及封面预览信息生成不同主题色的预览(设置主题色)
- 通过task_id增加PPT单页(PPT中插入单页)
- 短文本文件生成PPT(文件内容解析)
- 基于当前模板生成(基于当前模版生成)
- 获取PPT生成状态和预览页(文件内容解析)
- 获取PPT生成状态和预览页(文件内容解析)
- 更换模版(更换模版)
- 通过文件生成PPT(文件内容解析)
- 申请PPT生成任务(逐步生成PPT)
- 获取PPT生成状态和预览页(逐步生成PPT)
- 获取PPT生成状态和预览页(PPT描述/主题一键生成)
- 生成PPT备注(演讲稿备注)
- 获取PPT下载链接(获取下载链接)
- API文档(KEY 认证方式)
- API文档(HEAD认证方式)
- 聊天接口(Chat)
- 自动补全接口(Completions)
- 图像接口(Images)
- 向量生成接口(Embeddings)
- 音频接口(Audio)
- 图像接口(Midjourney)
- 图像接口(Recraft V3)
- 图像接口 (Ideogram)
- 图像接口(Flux)
- 图像 接口(jimeng)
- 图像接口(Stable Diffusion)
- Suno音乐接口
- Luma视频接口
- kling可灵视频图片接口
- 视频接口(混元视频API)
- 海螺Hailuo AI视频接口
- 佐糖API
- MewXAI星月熊开放API
- Claude
- Google Gemini
- 帮助中心
- 语音克隆
创建图像(Recraftv3)
POST
/recraftv3/api/v1/images/generations
请求参数
Authorization
Body 参数application/json
model
enum<string>
使用的模型名称
枚举值:
recraftv3fluxsdcogviewhunyuanstepkling
prompt
string
描述所需图像的文本
<= 500 字符
n
enum<integer>
生成图像的数量
枚举值:
12
默认值:
1
style_id
string <uuid> | null
可选
style
enum<string> | enum<null>
生成图像的风格
枚举值:
anydigital_illustrationillustration_3ddigital_illustration_seamlessdigital_illustration_pixel_artdigital_illustration_3ddigital_illustration_psychedelicdigital_illustration_hand_drawndigital_illustration_graindigital_illustration_glowdigital_illustration_80sdigital_illustration_watercolordigital_illustration_voxeldigital_illustration_infantile_sketchdigital_illustration_2d_art_posterdigital_illustration_kawaiidigital_illustration_halloween_drawingsdigital_illustration_2d_art_poster_2digital_illustration_engraving_colordigital_illustration_flat_air_artdigital_illustration_hand_drawn_outlinedigital_illustration_handmade_3ddigital_illustration_stickers_drawingsrealistic_imagerealistic_image_mockuprealistic_image_b_and_wrealistic_image_enterpriserealistic_image_hard_flashrealistic_image_hdrrealistic_image_natural_lightrealistic_image_studio_portraitrealistic_image_motion_blurvector_illustrationvector_illustration_seamlessvector_illustration_line_artvector_illustration_doodle_line_artvector_illustration_flat_2vector_illustration_70svector_illustration_cartoonvector_illustration_kawaiivector_illustration_linocutvector_illustration_engravingvector_illustration_halloween_stickersvector_illustration_line_circuit
默认值:
realistic_image
substyle
string | null
子风格
response_format
enum<string> | enum<null>
返回生成图像的格式
枚举值:
urlb64_json
默认值:
url
size
string | null
生成图像的大小
默认值:
1024x1024
正则匹配:
^\d+x\d+$
controls
object | null
可选
示例
{
"model": "recraftv3", // recraftv3、flux系列、sd系列、cogview系列、hunyuan系列、step系列、kling系列
"prompt": "鸟瞰图,海岸线,海水清澈见底,细节和自然之美。特写,超高清,最好的质量,超高细节的画质,8K分辨率", // 必需参数,描述所需图像的文本,最大长度为500个字符
"n": 1, // 整数或null,默认为1,目前仅支持n=1和n=2
"style_id": null, // UUID或null,使用之前上传的风格作为参考
"style": "realistic_image", // 字符串或null,默认为realistic_image,生成图像的风格
"substyle": null, // 字符串或null,子风格,具体内容在上面有涉及
"response_format": "url", // 字符串或null,默认为url,返回生成图像的格式,必须是url或b64_json之一
"size": "1024x1024", // 字符串或null,默认为1024x1024,生成图像的大小,以WxH格式表示
"controls": null // 对象或null,一组自定义参数,用于调整生成过程
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/recraftv3/api/v1/images/generations' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "recraftv3", // recraftv3、flux系列、sd系列、cogview系列、hunyuan系列、step系列、kling系列
"prompt": "鸟瞰图,海岸线,海水清澈见底,细节和自然之美。特写,超高清,最好的质量,超高细节的画质,8K分辨率", // 必需参数,描述所需图像的文本,最大长度为500个字符
"n": 1, // 整数或null,默认为1,目前仅支持n=1和n=2
"style_id": null, // UUID或null,使用之前上传的风格作为参考
"style": "realistic_image", // 字符串或null,默认为realistic_image,生成图像的风格
"substyle": null, // 字符串或null,子风格,具体内容在上面有涉及
"response_format": "url", // 字符串或null,默认为url,返回生成图像的格式,必须是url或b64_json之一
"size": "1024x1024", // 字符串或null,默认为1024x1024,生成图像的大小,以WxH格式表示
"controls": null // 对象或null,一组自定义参数,用于调整生成过程
}'
返回响应
🟢200成功
application/json
Body
created
integer
创建时间戳
data
array [object {1}]
必需
url
string
生成图像的URL
image
array[string]
可选
metadata
object
可选
credits
integer
可选
height
integer
可选
width
integer
可选
images
array [object {4}]
可选
random_seed
integer
可选
request_id
string
可选
transform_model
string
可选
示例
{
"created": 1732457701,
"data": [
{
"url": "https://sfile.chatglm.cn/chatglm4/121adf46-b582-449f-bf4b-6f19998c3622.png"
}
],
"image": [
"https://sfile.chatglm.cn/chatglm4/121adf46-b582-449f-bf4b-6f19998c3622.png"
],
"metadata": {
"credits": 1,
"height": 1024,
"images": [
{
"image_id": "f64b8f0d-a2fa-4efc-9d34-5134faf3fc14",
"image_invariants": {
"preset": "realistic_image"
},
"transparent": false,
"vector_image": false
}
],
"random_seed": 2978853182,
"request_id": "8d4be7b1-989d-47b2-bc35-82a657a4f488",
"transform_model": "recraftv3",
"width": 1024
}
}
修改于 2024-11-24 14:48:17