Midjourney
Midjourney blend 작업 생성
POST /mj/submit/blend 엔드포인트에 이미지를 제출해 하나 이상의 입력을 새로운 Midjourney 스타일 이미지로 블렌딩하세요.
POST
/
mj
/
submit
/
blend
cURL
curl https://api.cometapi.com/mj/submit/blend \
-H "Authorization: Bearer $COMETAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"botType": "MID_JOURNEY",
"base64Array": [
"data:image/jpeg;base64,<base64-encoded-first-image>",
"data:image/jpeg;base64,<base64-encoded-second-image>"
],
"dimensions": "SQUARE"
}'
import base64
import os
import requests
def to_data_uri(path):
with open(path, "rb") as f:
return "data:image/jpeg;base64," + base64.b64encode(f.read()).decode()
response = requests.post(
"https://api.cometapi.com/mj/submit/blend",
headers={"Authorization": "Bearer " + os.environ["COMETAPI_KEY"]},
json={
"botType": "MID_JOURNEY",
"base64Array": [to_data_uri("first.jpg"), to_data_uri("second.jpg")],
"dimensions": "SQUARE",
},
)
task = response.json()
print(task["code"], task.get("result"))
import { readFile } from "node:fs/promises";
async function toDataUri(path) {
return `data:image/jpeg;base64,${(await readFile(path)).toString("base64")}`;
}
const response = await fetch("https://api.cometapi.com/mj/submit/blend", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.COMETAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
botType: "MID_JOURNEY",
base64Array: [await toDataUri("first.jpg"), await toDataUri("second.jpg")],
dimensions: "SQUARE",
}),
});
const task = await response.json();
console.log(task.code, task.result);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cometapi.com/mj/submit/blend",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'base64Array' => [
'data:image/png;base64,xxx1',
'data:image/png;base64,xxx2'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cometapi.com/mj/submit/blend"
payload := strings.NewReader("{\n \"base64Array\": [\n \"data:image/png;base64,xxx1\",\n \"data:image/png;base64,xxx2\"\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))
}HttpResponse<String> response = Unirest.post("https://api.cometapi.com/mj/submit/blend")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base64Array\": [\n \"data:image/png;base64,xxx1\",\n \"data:image/png;base64,xxx2\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cometapi.com/mj/submit/blend")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"base64Array\": [\n \"data:image/png;base64,xxx1\",\n \"data:image/png;base64,xxx2\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"code": 123,
"description": "<string>",
"properties": {},
"result": 123
}이 엔드포인트를 사용하면 2~5개의 소스 이미지를 새로운 Midjourney 구도로 블렌딩할 수 있습니다. 직접 진입하는 엔드포인트이며, 사전에 imagine 작업이 필요하지 않습니다.
호출 전에 확인할 사항
- 2~5개의 소스 이미지를 준비하세요
- 처음 테스트는 작게 시작하고, 필요하지 않다면 추가 계정 라우팅 옵션은 건너뛰세요
- 블렌딩은 여전히 비동기 방식이므로 반환된 task id를 저장하세요
작업 흐름
1
blend 작업 제출
blend 엔드포인트를 통해 소스 이미지를 전송하고 반환된 task id를 저장합니다.
2
작업 폴링
작업이 최종 상태에 도달할 때까지 단일 작업 가져오기를 사용하세요.
3
결과에서 계속 진행
액션 버튼이 표시되면 업스케일, variation 또는 기타 후속 단계를 위해 Action을 사용하세요.
인증
Bearer token authentication. Use your CometAPI key.
본문
application/json
Two or more base64-encoded images to blend. Each item should be a data URI such as data:image/png;base64,xxx.
Output aspect ratio.
사용 가능한 옵션:
PORTRAIT, SQUARE, LANDSCAPE Webhook URL to receive task status updates. Falls back to your account-level webhook if omitted.
Custom state string. Returned as-is in the task result and webhook callback for your own tracking.
Bot type to use. MID_JOURNEY for Midjourney (default), NIJI_JOURNEY for Niji.
사용 가능한 옵션:
MID_JOURNEY, NIJI_JOURNEY 마지막 수정일 2026년 6월 23일
⌘I
cURL
curl https://api.cometapi.com/mj/submit/blend \
-H "Authorization: Bearer $COMETAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"botType": "MID_JOURNEY",
"base64Array": [
"data:image/jpeg;base64,<base64-encoded-first-image>",
"data:image/jpeg;base64,<base64-encoded-second-image>"
],
"dimensions": "SQUARE"
}'
import base64
import os
import requests
def to_data_uri(path):
with open(path, "rb") as f:
return "data:image/jpeg;base64," + base64.b64encode(f.read()).decode()
response = requests.post(
"https://api.cometapi.com/mj/submit/blend",
headers={"Authorization": "Bearer " + os.environ["COMETAPI_KEY"]},
json={
"botType": "MID_JOURNEY",
"base64Array": [to_data_uri("first.jpg"), to_data_uri("second.jpg")],
"dimensions": "SQUARE",
},
)
task = response.json()
print(task["code"], task.get("result"))
import { readFile } from "node:fs/promises";
async function toDataUri(path) {
return `data:image/jpeg;base64,${(await readFile(path)).toString("base64")}`;
}
const response = await fetch("https://api.cometapi.com/mj/submit/blend", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.COMETAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
botType: "MID_JOURNEY",
base64Array: [await toDataUri("first.jpg"), await toDataUri("second.jpg")],
dimensions: "SQUARE",
}),
});
const task = await response.json();
console.log(task.code, task.result);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cometapi.com/mj/submit/blend",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'base64Array' => [
'data:image/png;base64,xxx1',
'data:image/png;base64,xxx2'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cometapi.com/mj/submit/blend"
payload := strings.NewReader("{\n \"base64Array\": [\n \"data:image/png;base64,xxx1\",\n \"data:image/png;base64,xxx2\"\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))
}HttpResponse<String> response = Unirest.post("https://api.cometapi.com/mj/submit/blend")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base64Array\": [\n \"data:image/png;base64,xxx1\",\n \"data:image/png;base64,xxx2\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cometapi.com/mj/submit/blend")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"base64Array\": [\n \"data:image/png;base64,xxx1\",\n \"data:image/png;base64,xxx2\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"code": 123,
"description": "<string>",
"properties": {},
"result": 123
}