Lấy một tác vụ Midjourney
Sử dụng CometAPI GET /mj/task//fetch để truy xuất nhanh chóng và đáng tin cậy trạng thái của một tác vụ Midjourney nhằm giám sát và polling kết quả.
Kiểm tra các trường này trước
statuscho trạng thái tổng thể của tác vụprogresscho tín hiệu hoàn thành hiện tạiimageUrlhoặcvideoUrlkhi tài nguyên đã sẵn sàngbuttonscho các giá trịcustomIdkhả dụng tiếp theo
Quy tắc polling
- Tiếp tục polling cho đến khi tác vụ đạt
SUCCESS,MODALhoặcFAILURE - Xem mảng
buttonslà nguồn thông tin chuẩn cho các hành động tiếp theo - Sử dụng
imageUrlkhi bạn cần lưới hoàn chỉnh hoặc kết quả upscale
Ủy quyền
Bearer token authentication. Use your CometAPI key.
Tham số đường dẫn
Midjourney task id.
Phản hồi
Current task state.
Task id.
Stable CometAPI-proxied image link (https://api.cometapi.com/mj/image/{id}). Prefer this link; entries in image_urls point at provider storage and can expire.
Task lifecycle state: NOT_START, SUBMITTED, IN_PROGRESS, SUCCESS, or FAILURE.
Progress percentage string such as 58% while the task runs and 100% when finished.
Action buttons available on the finished task. Send a button's customId together with this task's id to /mj/submit/action to upscale, vary, zoom, or pan.
Task type: IMAGINE, UPSCALE, VARIATION, DESCRIBE, BLEND, VIDEO, or another action name.
Button customId that created this task, when the task came from an action.
Bot that handled the task, MID_JOURNEY or NIJI_JOURNEY, when reported.
Original prompt as submitted.
Prompt after translation to the provider language. For DESCRIBE tasks, the extracted prompt suggestions arrive here.
Human-readable submission status message.
Custom state string echoed back from the submission for your own tracking.
Submission time as a Unix timestamp in milliseconds.
Processing start time as a Unix timestamp in milliseconds.
Completion time as a Unix timestamp in milliseconds.
Generated video link for VIDEO tasks.
Failure reason when status is FAILURE.
Mask attached to the task when a region edit created it.
Additional task metadata, such as finalPrompt.