API Doc-ElkAPI
  1. Task Query
API Doc-ElkAPI
  • Quick Start
    • Quick Start
    • Must-read for beginners
    • ElkAPI Announcement
  • API Reference
    • Error status code description
    • OpenAI Format
      • Veo3-chat format
      • seedance
      • response
      • generate video
      • image
      • Image Editing (gpt-image-1)
      • embed
      • Realtime
      • Get model list
      • Response ID to obtain results
      • Hunyuan3D
    • Anthropic Format
      • Anthropic Claude
    • Midjourney Image Generation
      • Quick teaching-complete process in one go
      • Task Query
        • pagination query
          POST
        • Specify ID to obtain task
          GET
      • Submit Imagine task
        POST
      • Submit video task
        POST
      • Submit editing task
        POST
      • Submit Action Task
        POST
      • Submit Blend task
        POST
      • Submit Describe task
        POST
      • Submit Modal
        POST
    • Image Generation
      • ideogram(images)
        • Official documentation (updated in real time)
        • Generate 3.0 (illustrated in the text)
        • Reframe 3.0 (Refactoring)
        • Replace Background 3.0
        • Remix 3.0 (Mixed Graph)
        • Edit 3.0 (Edit)
        • Generate (text and image)
        • Remix (mixed image)
        • Upscale (enlarged high-definition)
        • Describe
        • Edit
      • Flux(images)
        • Create Task - General
        • generate image
        • Fine tuning (temporarily unavailable)
        • query task
        • Generate image (replica format)
      • Replicate(image)
        • Create Task - General
        • Create task - float kontext pro, max
        • Create task-black forest labs/flux-1.1-pro
        • Create task-black forest labs/flux-1.1-pro ultra
        • query task
        • Create task
      • Recraft(images)
        • Generate Image
        • Vectorize Image
        • Remove Background
        • Clarity Upscale
        • Create style
        • Generative Upscale
    • Music Generation
      • Suno
        • Set suno version
        • Suno API Scenario Application Guide
        • Generate lyrics
        • Generate music
        • Upload music
        • Song Splicing
        • Full track acoustic separation
        • Single track acoustic separation
        • Create a new Persona
        • Query a single task
        • Generate MP4 MV video
        • Retrieve WAV format files
        • Timing: Lyrics, audio timeline
        • Batch query task
        • Create music using persona_id
      • Udio (not available yet)
        • Generate music
        • Query a single task
    • Video Generation
      • veo3
        • veo3-chat format
        • Submit video generation task
        • Check the video generation status
      • Dream Test
        • seedance
      • runway(video)
        • Official format
          • Generate videos from images
          • Get detailed task information
        • Reverse format
          • Generate (text)
          • Generate (refer to image)
          • Video2video video to video style redrawing
          • Act one emoji transfer
          • Feed - Get Task
      • kling (video)
        • Callback Protocol
        • image expansion
        • generate image
        • text-to-video
        • image-to-video
        • Video extension
        • Virtual try on
        • lip-sync
        • video effects
        • Query task (single)
      • luma (video)
        • Official API format
          • generate video
          • Single query task
      • MiniMax Conch (video)
        • Official Documentation
        • video generation
        • query task
        • File Download
      • PIKA(video)
        • Universal version
          • generate video
          • Query video tasks
        • Generate (reference video/extended video)
        • Generate (refer to image)
        • Generate (text)
        • feed
      • sora
        • Reverse format
          • Create video
          • Generate Video
          • Query video tasks
    • Audio
      • Text to audio conversion
      • audio to text
      • Create translation
  • Integration Guide
    • Best Practices
      • Claude code access instructions
      • ElkAPI Account Balance Query API Usage Instructions
      • Retry logic documentation using ElkAPI and OpenAI's official API
      • Midjorney Calling Best Practices
      • Runway Call Best Practices
    • Application Integration Guide
  • Pricing and Billing
    • About Price
    • About Grouping
  • Help Center
    • Help Center
    • Interface stability
    • Common Misconceptions
    • Use confusion
    • Privacy Policy
    • Terms of Service
  1. Task Query

Specify ID to obtain task

GET
https://api.elkapi.com/mj/task/{id}/fetch
Quickly and stably obtain the status of a single intermediate task.

Request

Path Params

Header Params

Body Params application/x-www-form-urlencoded

Responses

🟢200Success
application/json
Body

Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.elkapi.com/mj/task//fetch' \
--header 'Authorization: Bearer {{api-key}}'
Response Response Example
{
  "id": "1747190313867714",
  "action": "IMAGINE",
  "customId": "",
  "botType": "",
  "prompt": "cat",
  "promptEn": "cat",
  "description": "In the queue, there are still 19 tasks ahead",
  "state": "",
  "mode": "",
  "proxy": "",
  "submitTime": 1747190313868,
  "startTime": 1747190373409,
  "finishTime": 1747190391402,
  "imageUrl": "https://cdn.discordapp.com/attachments/1372025398619279432/1372040685490016286/mira.bilus._cat_e116ba11-6559-4e3a-8792-ce6ff98e8bd4.png?ex=682553f6&is=68240276&hm=07dd4f64e3c5a9783f2ce2bf1e8a8f30e7581c670696aa1a58a64e34faf63976&",
  "imageHeight": 2048,
  "imageWidth": 2048,
  "status": "SUCCESS",
  "progress": "100%",
  "failReason": "",
  "buttons": [
    {
      "customId": "MJ::JOB::upsample::1::e116ba11-6559-4e3a-8792-ce6ff98e8bd4",
      "emoji": "",
      "label": "U1",
      "type": 2,
      "style": 2
    },
    {
      "customId": "MJ::JOB::upsample::2::e116ba11-6559-4e3a-8792-ce6ff98e8bd4",
      "emoji": "",
      "label": "U2",
      "type": 2,
      "style": 2
    },
    {
      "customId": "MJ::JOB::upsample::3::e116ba11-6559-4e3a-8792-ce6ff98e8bd4",
      "emoji": "",
      "label": "U3",
      "type": 2,
      "style": 2
    },
    {
      "customId": "MJ::JOB::upsample::4::e116ba11-6559-4e3a-8792-ce6ff98e8bd4",
      "emoji": "",
      "label": "U4",
      "type": 2,
      "style": 2
    },
    {
      "customId": "MJ::JOB::reroll::0::e116ba11-6559-4e3a-8792-ce6ff98e8bd4::SOLO",
      "emoji": "🔄",
      "label": "",
      "type": 2,
      "style": 2
    },
    {
      "customId": "MJ::JOB::variation::1::e116ba11-6559-4e3a-8792-ce6ff98e8bd4",
      "emoji": "",
      "label": "V1",
      "type": 2,
      "style": 2
    },
    {
      "customId": "MJ::JOB::variation::2::e116ba11-6559-4e3a-8792-ce6ff98e8bd4",
      "emoji": "",
      "label": "V2",
      "type": 2,
      "style": 2
    },
    {
      "customId": "MJ::JOB::variation::3::e116ba11-6559-4e3a-8792-ce6ff98e8bd4",
      "emoji": "",
      "label": "V3",
      "type": 2,
      "style": 2
    },
    {
      "customId": "MJ::JOB::variation::4::e116ba11-6559-4e3a-8792-ce6ff98e8bd4",
      "emoji": "",
      "label": "V4",
      "type": 2,
      "style": 2
    }
  ],
  "maskBase64": "",
  "properties": {
    "notifyHook": "",
    "flags": 0,
    "messageId": "1372040685854654507",
    "messageHash": "e116ba11-6559-4e3a-8792-ce6ff98e8bd4",
    "nonce": "1922481632673193984",
    "customId": "",
    "finalPrompt": "cat --fast",
    "progressMessageId": "1372040685854654507",
    "messageContent": "**cat --fast** - <@1365375019445653646> (fast)",
    "discordInstanceId": "1372025398619279432",
    "discordChannelId": "1372025398619279432"
  }
}
Previous
pagination query
Next
Submit Imagine task
Built with