跳转到主要内容
POST
/
v1
/
image_generate
提交图片生成任务
curl --request POST \
  --url https://api.keevx.cn/v1/image_generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "A serene mountain lake at sunset with golden reflections",
  "reference_images": [
    "https://example.com/ref.jpg"
  ],
  "module": "std",
  "generate_count": 2,
  "image_quality": "2K",
  "image_ratio": "16:9"
}
'
{
  "code": 0,
  "msg": "ok",
  "data": {
    "task_ids": [
      "i2is-a1b2c3d4e5f6",
      "i2is-g7h8i9j0k1l2"
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.keevx.cn/llms.txt

Use this file to discover all available pages before exploring further.

回调通知

视频生成任务处理完成后,服务将向发起请求中提供的 callback_url 发送一个 POST 请求。

结构

code
integer
响应状态码。0 表示回调发送成功。
msg
string
响应消息,通常为 “ok”。
task_type
string
任务类型。枚举值:image_to_video
data
object
包含生成结果的数据载体。

回调示例

{
    "code": 0,
    "msg": "ok",
    "task_type": "image_generate",
    "data": {
        "task_id": "i2is-18e830d27ea041658e4accd576ea7008",
        "status": "SUCCEEDED",
        "image_url": "https://xiling-dh.bj.bcebos.com/f4231c3b-fa87-4930-90e3-29fcdcdd2759-i2is-f32d314204d64e75b9e13034ad3443d5-ai.png",
        "error_message": ""
    }
}

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
prompt
string
必填

图片生成的文本提示词(必填)。

Maximum string length: 1000
reference_images
string<uri>[]

可选的参考图片 URL 列表。最多 5 张,每张不超过 20MB。支持格式:JPG、JPEG、PNG、BMP、WebP、GIF。超出部分会被静默截断为 5 张。

Maximum array length: 5
module
enum<string>
默认值:std

生成模式。std = 标准模式(默认),pro = 专业模式。

可用选项:
std,
pro
generate_count
integer
默认值:1

生成图片数量。每张图片会产生一个独立的任务 ID。

必填范围: 1 <= x <= 8
image_quality
enum<string>
默认值:2K

输出图片质量/分辨率等级。

可用选项:
1K,
2K,
4K
image_ratio
enum<string>
默认值:9:16

输出图片宽高比。

可用选项:
1:1,
3:2,
2:3,
3:4,
4:3,
4:5,
5:4,
9:16,
16:9,
21:9

响应

任务提交成功,或发生业务级错误。

code
integer
必填

业务状态码。0 表示成功;非零表示错误。

msg
string
必填

状态消息。成功时为 ok;失败时为错误描述。

data
object

业务数据。错误响应时省略或为 null。