cURL
curl --request POST \
--url https://api.midjourney-api.com/gpt/v1/job-status \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"taskIds": [
"MtAd7mCuc4YqK_a1iAQSW"
]
}
'import requests
url = "https://api.midjourney-api.com/gpt/v1/job-status"
payload = { "taskIds": ["MtAd7mCuc4YqK_a1iAQSW"] }
headers = {
"API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({taskIds: ['MtAd7mCuc4YqK_a1iAQSW']})
};
fetch('https://api.midjourney-api.com/gpt/v1/job-status', 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://api.midjourney-api.com/gpt/v1/job-status",
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([
'taskIds' => [
'MtAd7mCuc4YqK_a1iAQSW'
]
]),
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"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.midjourney-api.com/gpt/v1/job-status"
payload := strings.NewReader("{\n \"taskIds\": [\n \"MtAd7mCuc4YqK_a1iAQSW\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("API-KEY", "<api-key>")
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.midjourney-api.com/gpt/v1/job-status")
.header("API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"taskIds\": [\n \"MtAd7mCuc4YqK_a1iAQSW\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.midjourney-api.com/gpt/v1/job-status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"taskIds\": [\n \"MtAd7mCuc4YqK_a1iAQSW\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": 0,
"data": [
{
"status": 1,
"taskId": "MtAd7mCuc4YqK_a1iAQSW",
"image": "https://cdn.midjourney.com/089b3f2e-b120-4c30-8c1e-6bb02851f661/grid_0.png",
"jobId": "089b3f2e-b120-4c30-8c1e-6bb02851f661",
"images": [
"https://cdn.midjourney.com/089b3f2e-b120-4c30-8c1e-6bb02851f661/0_0.png"
],
"prompt": "a dog play with a boy --niji 6 --ar 9:16",
"mjPrompt": "a dog play with a boy --niji 6 --ar 9:16",
"createdAt": 1766915367000,
"meta": {
"width": 816,
"height": 1456
}
}
],
"message": "success"
}{
"error": 1001,
"message": "quota not enough"
}ChatGPT
Job Status
Use the Midjourney task result API to fetch generation status, output data, and image result URLs in asynchronous image workflows.
POST
/
gpt
/
v1
/
job-status
cURL
curl --request POST \
--url https://api.midjourney-api.com/gpt/v1/job-status \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"taskIds": [
"MtAd7mCuc4YqK_a1iAQSW"
]
}
'import requests
url = "https://api.midjourney-api.com/gpt/v1/job-status"
payload = { "taskIds": ["MtAd7mCuc4YqK_a1iAQSW"] }
headers = {
"API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({taskIds: ['MtAd7mCuc4YqK_a1iAQSW']})
};
fetch('https://api.midjourney-api.com/gpt/v1/job-status', 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://api.midjourney-api.com/gpt/v1/job-status",
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([
'taskIds' => [
'MtAd7mCuc4YqK_a1iAQSW'
]
]),
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"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.midjourney-api.com/gpt/v1/job-status"
payload := strings.NewReader("{\n \"taskIds\": [\n \"MtAd7mCuc4YqK_a1iAQSW\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("API-KEY", "<api-key>")
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.midjourney-api.com/gpt/v1/job-status")
.header("API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"taskIds\": [\n \"MtAd7mCuc4YqK_a1iAQSW\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.midjourney-api.com/gpt/v1/job-status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"taskIds\": [\n \"MtAd7mCuc4YqK_a1iAQSW\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": 0,
"data": [
{
"status": 1,
"taskId": "MtAd7mCuc4YqK_a1iAQSW",
"image": "https://cdn.midjourney.com/089b3f2e-b120-4c30-8c1e-6bb02851f661/grid_0.png",
"jobId": "089b3f2e-b120-4c30-8c1e-6bb02851f661",
"images": [
"https://cdn.midjourney.com/089b3f2e-b120-4c30-8c1e-6bb02851f661/0_0.png"
],
"prompt": "a dog play with a boy --niji 6 --ar 9:16",
"mjPrompt": "a dog play with a boy --niji 6 --ar 9:16",
"createdAt": 1766915367000,
"meta": {
"width": 816,
"height": 1456
}
}
],
"message": "success"
}{
"error": 1001,
"message": "quota not enough"
}Authorizations
You can obtain your API key from the Midjourney-api Dashboard.
Body
application/json
⌘I