Midjourney Describe
curl --request POST \
--url https://kaienapi.com/mj/submit/describe \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base64Array": [
"data:image/png;base64,..."
]
}
'import requests
url = "https://kaienapi.com/mj/submit/describe"
payload = { "base64Array": ["data:image/png;base64,..."] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({base64Array: ['data:image/png;base64,...']})
};
fetch('https://kaienapi.com/mj/submit/describe', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://kaienapi.com/mj/submit/describe"
payload := strings.NewReader("{\n \"base64Array\": [\n \"data:image/png;base64,...\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}Midjourney Describe
根据参考图反推 Midjourney 提示词。
请求格式
使用 application/json,把图片 base64 放入 base64Array。可提交一张或多张图片。
读取结果
Describe 会提炼参考图里的主体、风格、光线、构图和材质关键词。返回结果可作为 imagine prompt 的起点;提交生成前,再补充比例、画面要求和限制条件。
POST
/
mj
/
submit
/
describe
Midjourney Describe
curl --request POST \
--url https://kaienapi.com/mj/submit/describe \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base64Array": [
"data:image/png;base64,..."
]
}
'import requests
url = "https://kaienapi.com/mj/submit/describe"
payload = { "base64Array": ["data:image/png;base64,..."] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({base64Array: ['data:image/png;base64,...']})
};
fetch('https://kaienapi.com/mj/submit/describe', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://kaienapi.com/mj/submit/describe"
payload := strings.NewReader("{\n \"base64Array\": [\n \"data:image/png;base64,...\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}Authorizations
在请求头中传入:Authorization: Bearer sk-...
Body
application/json
Midjourney 兼容请求。提交类接口返回任务 ID,随后用任务查询接口获取最终结果。
提示词。比例、风格、质量等 Midjourney 参数写入 prompt,例如 --ar 16:9。
Example:
"a cinematic robot portrait"
已有任务 ID。放大、变体、局部编辑、视频延展和查询任务时传入。
Example:
"task_xxx"
基于已有任务的操作类型,例如 UPSCALE、VARIATION、REROLL。
Example:
"UPSCALE"
自定义动作 ID。按返回按钮或动作标识继续提交时传入。
Example:
"MJ::JOB::upsample::1::abcd"
四宫格中的图片序号,一般为 1 到 4。
Example:
1
任务筛选状态。按条件查询任务列表时传入。
简化操作内容,例如 U1 task_xxx。
图片 base64 数组。describe、blend 和图片上传类接口会读取该字段。
局部编辑遮罩图 base64,用来标记需要重绘的区域。
回调地址。任务状态变化时可接收通知,是否生效以接口说明为准。
Response
成功响应
The response is of type object.