简体中文
cURL
curl --request POST \ --url https://api.kie.ai/api/v1/mj/generate \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "taskType": "mj_txt2img", "speed": "relaxed", "prompt": "Help me generate a sci-fi themed fighter jet in a beautiful sky, to be used as a computer wallpaper", "fileUrls": [ "https://example.com/image.jpg" ], "aspectRatio": "16:9", "version": "7", "variety": 10, "stylization": 1, "weirdness": 1, "waterMark": "", "enableTranslation": false, "callBackUrl": "https://api.example.com/callback", "ow": 500, "videoBatchSize": 1, "motion": "high" }'
{ "code": 200, "msg": "success", "data": { "taskId": "mj_task_abcdef123456" } }
使用 Midjourney AI 模型创建新的图像生成任务。
所有 API 都需要通过 Bearer Token 进行认证。
获取 API Key:
使用方法: 添加到请求头: Authorization: Bearer YOUR_API_KEY
注意:
请求成功
The response is of type object.
object