Cancel Running Job

October 27, 2025

Table of contents

  1. Request Headers
  2. Path Parameters
  3. Responses
  4. Examples
  5. Important Notes
  6. Try It

Cancel a running job by ID.

Note: Only jobs with status created, started, or progress can be cancelled. Completed or failed jobs cannot be cancelled.

https://api.useapi.net/v3/midjourney/jobs/jobid

Request Headers
Authorization: Bearer {API token}
Path Parameters
  • jobid is required. The job ID to cancel.
Responses
  • 204 No Content

    Job cancelled successfully.

    No Content (empty response body)

    The job status has been updated to failed and removed from running jobs list.

  • 401 Unauthorized

    Invalid API token.

    {
      "error": "Unauthorized"
    }
    
  • 404 Not Found

    Job not found.

    {
      "error": "Job not found"
    }
    
  • 410 Gone

    Job expired (older than 62 days).

    {
      "error": "Job j1023... has expired"
    }
    
Examples
  • curl -X DELETE \
         -H "Authorization: Bearer YOUR_API_TOKEN" \
         "https://api.useapi.net/v3/midjourney/jobs/j1023141520123456789i-u12345-c1234567890123456789-bot:midjourney"
    
  • const jobId = 'j1023141520123456789i-u12345-c1234567890123456789-bot:midjourney';
    
    const response = await fetch(
      `https://api.useapi.net/v3/midjourney/jobs/${jobId}`,
      {
        method: 'DELETE',
        headers: {
          'Authorization': 'Bearer YOUR_API_TOKEN'
        }
      }
    );
    
    if (response.status === 204) {
      console.log('Job cancelled successfully');
    } else {
      console.error('Failed to cancel job:', response.status);
    }
    
  • import requests
    
    job_id = 'j1023141520123456789i-u12345-c1234567890123456789-bot:midjourney'
    
    response = requests.delete(
        f'https://api.useapi.net/v3/midjourney/jobs/{job_id}',
        headers={'Authorization': 'Bearer YOUR_API_TOKEN'}
    )
    
    if response.status_code == 204:
        print('Job cancelled successfully')
    else:
        print(f'Failed to cancel job: {response.status_code}')
    
Important Notes
  1. Only running jobs can be cancelled:
    • Status must be: created, started, or progress
    • Cannot cancel: completed, failed, or moderated jobs
  2. Job will be marked as failed:
    • Status updated to failed
    • Error message: “Job cancelled by user”
    • Job removed from running jobs list
  3. Discord cleanup:
    • The API does not delete the Discord message
    • Message remains in your Midjourney DM (direct messages) channel
Try It