API Doc-CometAPI
HomeDashBoardModel_Price
HomeDashBoardModel_Price
Discord_Support
  1. Task Fetching API
  • GET START
    • Model New Release Announcement
    • Platform notification
    • Help Center
    • Quick Start
    • About Pricing
    • About Grouping
    • Interface Stability
    • Privacy policy
    • Terms of service
    • Error code description
    • Code example
    • Must see for use
    • Common Misconceptions
    • Confusion about use
    • Best Practices
      • CometAPI Account Balance Query API Usage Instructions
      • Retry Logic Documentation for CometAPI and OpenAI Official API
      • Midjourney Best Practices
      • Runway Best Practices
  • OpenAI Compatiable Endpoint
    • gpt-4o-image generates image
    • Chat
    • Recognizing Images
    • Models
    • Embeddings
    • Images
    • Realtime
    • Image Editing (gpt-image-1)
  • Audio
    • Create speech
    • Create transcription
    • Create translation
  • Anthropic Compatiable Endpoint
    • Anthropic Claude
  • Music Generation Endpoint
    • Suno
      • Setting suno Version
      • Generate lyrics
      • Generate music clip
      • Upload clip
      • Submit concatenation
      • Single task query
      • Batch query tasks
    • Udio(Temporarily unavailable)
      • Generate music
      • Task query
  • Image Generation Endpoint
    • Midjourney(images)
      • Quick Tutorial - Complete Process in One Go
      • Task Fetching API
        • List by Condition
          POST
        • Fetch Single Task (most recommended)
          GET
      • Imagine
        POST
      • Action (UPSCALE; VARIATION; REROLL; ZOOM, etc.)
        POST
      • Blend (image -> image)
        POST
      • Describe (image -> text)
        POST
      • Modal (Area Redesign & Zoom)
        POST
    • Ideogram(images)
      • Official documentation (updated in real time)
      • Generate 3.0 (text to image)
      • Remix 3.0 (hybrid image)
      • Reframe 3.0(Reconstruction)
      • Replace Background 3.0(Background replacement)
      • Edit 3.0(Editing images)
      • ideogram Text Raw Image
      • ideogram Hybrid image
      • ideogram enlargement HD
      • ideogram describes the image
      • ideogram Edit image
    • Flux(images)
      • Generate image (replicate format)
      • flux fine-tune images(Temporarily unavailable)
      • flux generate image(Temporarily unavailable)
      • flux query
    • Replicate(image)
      • replicate Generate
      • replicate query
    • Recraft(images)
      • Appendix
      • Recraft Generate Image
      • Recraft Vectorize Image
      • Recraft Remove Background
      • Recraft Clarity Upscale
      • Recraft Create style
      • Recraft Generative Upscale
  • Video Generation Ednpoint
    • runway(video)
      • official format
        • runway images raw video
        • runway to get task details
      • Reverse Format
        • generate(text)
        • generate(Reference images)
        • Video to Video Style Redraw
        • Act-one Expression Migration
        • feed-get task
    • kling (video)
      • callback_url
      • Generating images
      • Text Generation Video
      • Image Generation Video
      • Video Extension
      • virtual try-on
      • lip sync
      • Individual queries (videos)
    • MiniMax Conch(video)
      • MiniMax Conch Official Documentation
      • MiniMax Conch Generation
      • MiniMax Conch Query
      • MiniMax Conch Download
    • luma (video)
      • Official api interface format
        • luma generate
        • luma search
    • PIKA(video)
      • pika feed
      • PIKA Reference Video Generation
      • PIKA Reference Image Generation
      • PIKA reference text generation
    • sora
      • Reverse Format
        • Create Video
        • Query Video Task
        • Create Video
  • Software Integration Guide
    • cometapi Site API Call Testing
    • OpenManus
    • Chatbox
    • CherryStudio
    • Cursor
    • ChatHub
    • COZE
    • FastGPT
    • cline
    • dify
    • gptme
    • Immersive Translation
    • Lobe-Chat
    • Zotero
    • LangChain
    • AnythingLLM
    • Eudic Translation
    • OpenAI Translator
    • ChatAll Translation
    • Pot Translation
    • GPT Academic Optimization (gpt_academic)
    • NEXT CHAT (ChatGPT Next Web)
    • Obsidian's Text Generator Plugin
    • Open WebUI
    • avante.nvim
    • librechat
    • Lazy Customer Service
    • utools-ChatGPT Friend
    • IntelliJ Translation Plugin
    • n8n
  1. Task Fetching API

Fetch Single Task (most recommended)

GET
https://api.cometapi.com/mj/task/{id}/fetch
Maintainer:Not configured
To get the status of a single midjourney task, fast and stable.

Request

Path Params
id
string 
required
Header Params
Authorization
string 
optional
Example:
Bearer {{api-key}}
Body Params application/x-www-form-urlencoded
object {0}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.cometapi.com/mj/task//fetch' \
--header 'Authorization: Bearer {{api-key}}'

Responses

🟢200Success
application/json
Body
id
string 
required
Unique identifier for the task
action
string 
required
Type of action to execute
customId
string 
required
User-defined ID for tracking or association, empty here
botType
string 
required
Type of bot used, empty here
prompt
string 
required
Original prompt input by user
promptEn
string 
required
Translated English prompt, models typically process in English
description
string 
required
Description of current task status, such as queue information
state
string 
required
Internal status code or identifier
mode
string 
required
Task execution mode (e.g., 'fast', 'relax' in Midjourney), empty here
proxy
string 
required
Proxy server information used, empty here
submitTime
integer 
required
Timestamp when the task was submitted (milliseconds)
startTime
integer 
required
Timestamp when the task started processing (milliseconds)
finishTime
integer 
required
Timestamp when the task completed (milliseconds)
imageUrl
string 
required
URL of the generated image
imageHeight
integer 
required
Height of the generated image (pixels)
imageWidth
integer 
required
Width of the generated image (pixels)
status
string 
required
Final status of the task, 'SUCCESS' indicates success
progress
string 
required
Percentage of task completion
failReason
string 
required
If task failed, this shows the reason for failure, empty here indicates success
buttons
array [object {5}] 
required
Array of interactive buttons related to the generated result
customId
string 
required
variation: generate variants
emoji
string 
required
Emoji for regeneration
label
string 
required
V4: Generate variants based on the fourth image
type
integer 
required
Type of button component
style
integer 
required
Style of the button
maskBase64
string 
required
Base64 encoded mask image data (for image editing like inpainting), empty here
properties
object 
required
Contains other properties or metadata related to the task
notifyHook
string 
required
Webhook notification URL for receiving task status updates, empty here
flags
integer 
required
Internal flags, specific meaning needs to refer to API documentation
messageId
string 
required
Message ID associated with this task
messageHash
string 
required
Hash value of message content, or hash for identifying image (used for U/V operations), empty here
nonce
string 
required
One-time random number to prevent replay attacks or identify requests, empty here
customId
string 
required
Custom ID within properties, empty here
finalPrompt
string 
required
Final prompt passed to the model after processing
progressMessageId
string 
required
Message ID used to display progress updates, empty here
messageContent
string 
required
Content of the associated message, empty here
discordInstanceId
string 
required
Discord instance ID that processed the request, empty here
discordChannelId
string 
required
Discord channel ID where the request originated or results were published, empty here
Example
{
    "id": "string",
    "action": "string",
    "customId": "string",
    "botType": "string",
    "prompt": "string",
    "promptEn": "string",
    "description": "string",
    "state": "string",
    "mode": "string",
    "proxy": "string",
    "submitTime": 0,
    "startTime": 0,
    "finishTime": 0,
    "imageUrl": "string",
    "imageHeight": 0,
    "imageWidth": 0,
    "status": "string",
    "progress": "string",
    "failReason": "string",
    "buttons": [
        {
            "customId": "string",
            "emoji": "string",
            "label": "string",
            "type": 0,
            "style": 0
        }
    ],
    "maskBase64": "string",
    "properties": {
        "notifyHook": "string",
        "flags": 0,
        "messageId": "string",
        "messageHash": "string",
        "nonce": "string",
        "customId": "string",
        "finalPrompt": "string",
        "progressMessageId": "string",
        "messageContent": "string",
        "discordInstanceId": "string",
        "discordChannelId": "string"
    }
}
Previous
List by Condition
Next
Imagine
Built with