Skip to main content
GET
/
api
/
v1
/
mj
/
record-info
Get Midjourney Task Details
curl --request GET \
  --url https://api.midapi.ai/api/v1/mj/record-info \
  --header 'Authorization: Bearer <token>'
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "4edb3c5XXXXX75e3f0aa5cc",
    "taskType": "mj_txt2img",
    "paramJson": "{\"aspectRatio\":\"16:9\",\"callBackUrl\":\"https://api.example.com/callback\",\"fileUrl\":\"\",\"prompt\":\"Help me generate a sci-fi themed fighter jet in a beautiful sky, to be used as a computer wallpaper\",\"speed\":\"Relax\",\"stylization\":1,\"taskType\":\"mj_txt2img\",\"version\":\"7\",\"waterMark\":\"\",\"weirdness\":1}",
    "completeTime": "2024-03-20T10:30:00Z",
    "resultInfoJson": {
      "resultUrls": [
        {
          "resultUrl": "https://tempfile.aiquickdraw.com/v/42ea4a4250571eb18361bd2e309c8e8a_0_0.jpeg"
        },
        {
          "resultUrl": "https://tempfile.aiquickdraw.com/v/42ea4a4250571eb18361bd2e309c8e8a_0_1.jpeg"
        },
        {
          "resultUrl": "https://tempfile.aiquickdraw.com/v/42ea4a4250571eb18361bd2e309c8e8a_0_2.jpeg"
        },
        {
          "resultUrl": "https://tempfile.aiquickdraw.com/v/42ea4a4250571eb18361bd2e309c8e8a_0_3.jpeg"
        }
      ]
    },
    "successFlag": 1,
    "createTime": "2024-03-20T10:30:00Z",
    "errorCode": null,
    "errorMessage": null
  }
}

Status Descriptions

  • successFlag: 0 (Generating) - Task is currently being processed
  • successFlag: 1 (Success) - Task completed successfully
  • successFlag: 2 (Failed) - Task generation failed
  • successFlag: 3 (Generation Failed) - Task created successfully but generation failed

Authorizations

Authorization
string
header
required

All APIs require authentication via Bearer Token.

Get API Key:

  1. Visit API Key Management Page to get your API Key

Usage: Add to request header: Authorization: Bearer YOUR_API_KEY

Note:

  • Keep your API Key secure and do not share it with others
  • If you suspect your API Key has been compromised, reset it immediately in the management page

Query Parameters

taskId
string
required

Task ID returned from the generation request

Response

Request successful

code
enum<integer>

Response status code

  • 200: Success - Request has been processed successfully
  • 400: Bad Request - Invalid request parameters
  • 401: Unauthorized - Authentication credentials are missing or invalid
  • 402: Insufficient Credits - Account does not have enough credits to perform the operation
  • 404: Not Found - The requested resource or endpoint does not exist
  • 422: Validation Error - The request parameters failed validation checks
  • 429: Rate Limited - Request limit has been exceeded for this resource
  • 455: Service Unavailable - System is currently undergoing maintenance
  • 500: Server Error - An unexpected error occurred while processing the request
  • 501: Generation Failed - Image generation task failed
  • 505: Feature Disabled - The requested feature is currently disabled
Available options:
200,
400,
401,
402,
404,
422,
429,
455,
500,
501,
505
msg
string

Response message

Example:

"success"

data
object