Midjourney
Describe an image with Midjourney
Use CometAPI POST /mj/submit/describe to extract an initial Midjourney prompt from an uploaded image for fast remixing and iteration.
POST
/
mj
/
submit
/
describe
cURL
curl https://api.cometapi.com/mj/submit/describe \
-H "Authorization: Bearer $COMETAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"botType": "MID_JOURNEY",
"base64": "data:image/jpeg;base64,<base64-encoded-jpeg>"
}'import base64
import os
import requests
with open("cat.jpg", "rb") as f:
image_b64 = base64.b64encode(f.read()).decode()
response = requests.post(
"https://api.cometapi.com/mj/submit/describe",
headers={"Authorization": "Bearer " + os.environ["COMETAPI_KEY"]},
json={
"botType": "MID_JOURNEY",
"base64": "data:image/jpeg;base64," + image_b64,
},
)
task = response.json()
print(task["code"], task.get("result")) # poll the task; extracted prompts arrive in promptEn
import { readFile } from "node:fs/promises";
const imageB64 = (await readFile("cat.jpg")).toString("base64");
const response = await fetch("https://api.cometapi.com/mj/submit/describe", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.COMETAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
botType: "MID_JOURNEY",
base64: `data:image/jpeg;base64,${imageB64}`,
}),
});
const task = await response.json();
console.log(task.code, task.result); // poll the task; extracted prompts arrive in promptEn
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cometapi.com/mj/submit/describe",
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([
'base64' => 'data:image/png;base64,xxx'
]),
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/describe"
payload := strings.NewReader("{\n \"base64\": \"data:image/png;base64,xxx\"\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/describe")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base64\": \"data:image/png;base64,xxx\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cometapi.com/mj/submit/describe")
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 \"base64\": \"data:image/png;base64,xxx\"\n}"
response = http.request(request)
puts response.read_body{
"code": 123,
"description": "<string>",
"properties": {},
"result": 123
}Use this endpoint to extract Midjourney-style prompt suggestions from an input image.
What this route is good for
- Turning an image into prompt candidates you can remix
- Extracting a visual direction before you start a fresh imagine task
- Building a faster authoring loop when you do not want to write the first prompt from scratch
Task flow
1
Submit the image
Upload or reference the image you want Midjourney to describe and store the returned task id.
2
Poll the describe task
Use Fetch Single Task until the task completes and returns prompt-like output.
3
Reuse the generated prompt
Take the prompt candidate that fits your intent and continue with Imagine for a fresh generation pass.
Body
application/json
Response
200 - application/json
Success
Last modified on June 23, 2026
⌘I
cURL
curl https://api.cometapi.com/mj/submit/describe \
-H "Authorization: Bearer $COMETAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"botType": "MID_JOURNEY",
"base64": "data:image/jpeg;base64,<base64-encoded-jpeg>"
}'import base64
import os
import requests
with open("cat.jpg", "rb") as f:
image_b64 = base64.b64encode(f.read()).decode()
response = requests.post(
"https://api.cometapi.com/mj/submit/describe",
headers={"Authorization": "Bearer " + os.environ["COMETAPI_KEY"]},
json={
"botType": "MID_JOURNEY",
"base64": "data:image/jpeg;base64," + image_b64,
},
)
task = response.json()
print(task["code"], task.get("result")) # poll the task; extracted prompts arrive in promptEn
import { readFile } from "node:fs/promises";
const imageB64 = (await readFile("cat.jpg")).toString("base64");
const response = await fetch("https://api.cometapi.com/mj/submit/describe", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.COMETAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
botType: "MID_JOURNEY",
base64: `data:image/jpeg;base64,${imageB64}`,
}),
});
const task = await response.json();
console.log(task.code, task.result); // poll the task; extracted prompts arrive in promptEn
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cometapi.com/mj/submit/describe",
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([
'base64' => 'data:image/png;base64,xxx'
]),
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/describe"
payload := strings.NewReader("{\n \"base64\": \"data:image/png;base64,xxx\"\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/describe")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base64\": \"data:image/png;base64,xxx\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cometapi.com/mj/submit/describe")
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 \"base64\": \"data:image/png;base64,xxx\"\n}"
response = http.request(request)
puts response.read_body{
"code": 123,
"description": "<string>",
"properties": {},
"result": 123
}