跳转到主要内容
POST
/
mj
/
submit
/
change
Change(U/V/Reroll)
curl --request POST \
  --url https://openp.ai/mj/submit/change
import requests

url = "https://openp.ai/mj/submit/change"

response = requests.post(url)

print(response.text)
const options = {method: 'POST'};

fetch('https://openp.ai/mj/submit/change', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://openp.ai/mj/submit/change",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://openp.ai/mj/submit/change"

req, _ := http.NewRequest("POST", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://openp.ai/mj/submit/change")
.asString();
require 'uri'
require 'net/http'

url = URI("https://openp.ai/mj/submit/change")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
对一个已完成的 Midjourney 任务执行后续操作:Upscale(放大)、Variation(变体)、Reroll(重抽)。

请求

curl https://openp.ai/mj/submit/change \
  -H "Authorization: Bearer $OPENPAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "taskId": "1737200000000000",
    "action": "UPSCALE",
    "index": 1
  }'

参数

字段类型必填说明
taskIdstring上一步任务 ID
actionstringUPSCALE / VARIATION / REROLL
indexinteger1-4,U/V 对应第几格
notifyHookstring回调 URL
statestring自定义透传

其他 action 端点

端点用途
POST /mj/submit/blend多图融合
POST /mj/submit/describe反推 prompt
POST /mj/submit/zoom缩放扩展
POST /mj/submit/pan横 / 纵向延展
POST /mj/submit/modal高级修改窗口操作

响应

Imagine 的响应,返回新任务 ID。