Midjourney 任务模块

功能说明

接口前缀为:

  1. 主站:https://ai.burncloud.com
  2. 企业站:https://b.burncloud.com

图像生成任务的管理系统。支持任务状态跟踪、进度监控、结果查看等功能。包含图片 URL 转发和后台轮询更新机制。

🔐 用户鉴权

获取自己的 MJ 任务

💡 请求示例:

const response = await fetch('/api/mj/self?p=1&page_size=20&mj_id=task123&start_timestamp=1640908800&end_timestamp=1640995200', {  
  method: 'GET',  
  headers: {  
    'Content-Type': 'application/json',  
    'Authorization': 'Bearer your_user_token',
    'New-Api-User': 'Bearer your_user_id'
  }  
});  
const data = await response.json();

✅ 成功响应示例:

{  
  "success": true,  
  "message": "",  
  "data": {  
    "items": [  
      {  
        "id": 1,  
        "mj_id": "task123456",  
        "action": "IMAGINE",  
        "prompt": "a beautiful landscape",  
        "prompt_en": "a beautiful landscape",  
        "status": "SUCCESS",  
        "progress": "100%",  
        "image_url": "https://example.com/image.jpg",  
        "video_url": "https://example.com/video.mp4",  
        "video_urls": "[\"https://example.com/video1.mp4\"]",  
        "submit_time": 1640908800,  
        "start_time": 1640909000,  
        "finish_time": 1640909200,  
        "fail_reason": "",  
        "quota": 1000  
      }  
    ],  
    "total": 25,  
    "page": 1,  
    "page_size": 20  
  }  
}

❗ 失败响应示例:

{  
  "success": false,  
  "message": "获取任务列表失败"  
}

🧾 字段说明:

返回字段说明:

🔐 管理员鉴权

获取全部 MJ 任务

💡 请求示例:

const response = await fetch('/api/mj/?p=1&page_size=20&channel_id=1&mj_id=task123&start_timestamp=1640908800&end_timestamp=1640995200', {  
  method: 'GET',  
  headers: {  
    'Content-Type': 'application/json',  
    'Authorization': 'Bearer your_admin_token',
    'New-Api-User': 'Bearer your_user_id'
  }  
});  
const data = await response.json();

✅ 成功响应示例:

{  
  "success": true,  
  "message": "",  
  "data": {  
    "items": [  
      {  
        "id": 1,  
        "user_id": 1,  
        "mj_id": "task123456",  
        "action": "IMAGINE",  
        "prompt": "a beautiful landscape",  
        "status": "SUCCESS",  
        "progress": "100%",  
        "image_url": "https://example.com/image.jpg",  
        "channel_id": 1,  
        "quota": 1000,  
        "submit_time": 1640908800,  
        "finish_time": 1640909200  
      }  
    ],  
    "total": 100,  
    "page": 1,  
    "page_size": 20  
  }  
}

❗ 失败响应示例:

{  
  "success": false,  
  "message": "获取任务列表失败"  
}

🧾 字段说明:

返回字段包含用户自身任务的所有字段,另外增加:


Revision #1
Created 30 October 2025 04:00:32 by Burncloud
Updated 30 October 2025 04:01:02 by Burncloud