Przejdź do głównej treści
GET
/
mj
/
task
/
{id}
/
fetch
Fetch a Midjourney task
curl --request GET \
  --url https://api.cometapi.com/mj/task/{id}/fetch \
  --header 'Authorization: Bearer <token>'
{
  "id": "1773314942177684",
  "status": "SUCCESS",
  "progress": "100%",
  "imageUrl": "https://api.cometapi.com/mj/image/1773314942177684",
  "videoUrl": "",
  "buttons": [
    {
      "customId": "MJ::JOB::upsample::1::example",
      "emoji": "",
      "label": "U1",
      "type": 2,
      "style": 1
    }
  ]
}
Używaj tego endpointu po każdym wywołaniu przesłania do Midjourney. To główny endpoint do odpytywania dla przepływów imagine, action, modal, blend i editor.

Najpierw sprawdź te pola

  • status dla ogólnego stanu zadania
  • progress dla bieżącego sygnału ukończenia
  • imageUrl lub videoUrl, gdy zasób jest gotowy
  • buttons dla kolejnych dostępnych wartości customId

Zasady odpytywania

  • Kontynuuj odpytywanie, aż zadanie osiągnie SUCCESS, MODAL lub FAILURE
  • Traktuj tablicę buttons jako źródło prawdy dla działań następczych
  • Użyj imageUrl, gdy potrzebujesz gotowej siatki lub wyniku upscale
Walidacja na żywo z dnia 2026-03-12 zwróciła SUCCESS, progress: 100%, imageUrl oraz 9 przycisków akcji dla zadania FAST imagine.

Autoryzacje

Authorization
string
header
wymagane

Bearer token authentication. Use your CometAPI key.

Parametry ścieżki

id
string
wymagane

Midjourney task id.

Odpowiedź

200 - application/json

Current task state.

id
string
wymagane
imageUrl
string
wymagane
status
string
wymagane
progress
string
wymagane
buttons
object[]
wymagane
action
string
customId
string
botType
string
prompt
string
promptEn
string
description
string
state
string
submitTime
integer
startTime
integer
finishTime
integer
videoUrl
string
failReason
string
maskBase64
string
properties
object