Tạo một tác vụ Midjourney imagine
Sử dụng POST /mj/submit/imagine trong CometAPI để tạo các tác vụ Midjourney imagine với đầy đủ tham số Discord, theo dõi trạng thái task_id và bật hiệu ứng chuyển động image-to-video.
Phản hồi đầu tiên cung cấp gì
resultlà id tác vụ mà bạn sẽ poll tiếp theocodevẫn có thể là mã thành công ngay cả khi nó không phải kiểu HTTP200
Quy trình cốt lõi
Gửi tác vụ imagine
Poll cho đến khi tác vụ hoàn tất
SUCCESS, MODAL hoặc FAILURE.Tiếp tục với hậu xử lý
Mẫu prompt video tùy chọn
Nếu bạn muốn tạo chuyển động từ một ảnh nguồn, hãy thêm URL ảnh cùng các cờ video của Midjourney vào prompt, chẳng hạn như--video và --motion.Ủy quyền
Bearer token authentication. Use your CometAPI key.
Nội dung
Text prompt for the generation. Supports standard Midjourney parameters such as --v, --ar, --stylize, etc.
"a paper boat floating on calm water at sunrise --v 6.1"
Bot type to use. MID_JOURNEY for Midjourney (default), NIJI_JOURNEY for Niji.
MID_JOURNEY, NIJI_JOURNEY Filter which Midjourney account modes may be used for this task.
Base64-encoded reference images. Each item should be a data URI such as data:image/png;base64,xxx.
Custom state string. Returned as-is in the task result and webhook callback for your own tracking.
Phản hồi
Task accepted.
Submission status code. 1 = submitted successfully (result carries the task id). 21 = the action opened a confirmation modal; continue with /mj/submit/modal using the returned task id. 4 = parameter error; description explains the cause.
Task id returned after submission.