Cancel a job

June 3, 2026 (November 9, 2026)

Table of contents

  1. Request Headers
  2. Responses
  3. Model
  4. Examples
  5. Try It

Cancel a running job (an async one, or a sync request still in progress, which then answers 409 user_cancelled) and free its concurrency slot. The job record is marked failed with error code user_cancelled. A job that has already ended is only taken off the running list.

https://api.useapi.net/v1/flowmusic/jobs/jobid

  • jobid is required. The jobid of a POST /music or /music/edit answer, URL-encoded (it holds : and @).

Request Headers

Authorization: Bearer {API token}

Responses

  • 204 No Content

    The job is cancelled and its slot is free. A job that was still running is stored as failed, with error.code user_cancelled. No body.

  • 400 Bad Request

    The request itself is wrong, or no usable Google Flow Music account is added. The error text says what to change.

    {
      "error": "Please configure at least one account at https://useapi.net/docs/api-flowmusic-v1/post-flowmusic-accounts",
      "code": 400
    }
    
    {
      "error": "Invalid JSON: Unexpected token 'o', \"not json\" is not valid JSON",
      "code": 400
    }
    
  • 401 Unauthorized

    The useapi.net API token is missing or wrong.

    {
      "error": "useapi.net ⁝ Unauthorized",
      "code": 401
    }
    
  • 402 Payment Required

    The useapi.net subscription is not active.

    {
      "error": "useapi.net ⁝ Your account has no subscription, please subscribe to our services before submitting requests",
      "code": 402
    }
    
  • 403 Forbidden

    The id belongs to another API token.

    {
      "error": "jobid does not belong to authenticated operator (parsed user:12346, calling user:12345)",
      "code": 403
    }
    
  • 404 Not Found

    The account, job or clip does not exist, or is no longer there.

    {
      "error": "no job with id job:2c9a1e3f-6b8d-4f0a-9e7c-1d2b3c4d5e6f-user:[email protected]:flowmusic",
      "code": 404
    }
    
  • 500 Internal Server Error

    Something failed on our side.

    {
      "error": "Cannot read properties of undefined (reading 'email')",
      "code": 500
    }
    

Model

A successful cancel answers 204 with no body. Only the error answers carry a JSON body with error and code.

Examples

  • curl -X DELETE "https://api.useapi.net/v1/flowmusic/jobs/job:2c9a1e3f-6b8d-4f0a-9e7c-1d2b3c4d5e6f-user:[email protected]:flowmusic" \
         -H "Authorization: Bearer YOUR_API_TOKEN"
    
  • const response = await fetch('https://api.useapi.net/v1/flowmusic/jobs/job:2c9a1e3f-6b8d-4f0a-9e7c-1d2b3c4d5e6f-user:[email protected]:flowmusic', {
      method: 'DELETE',
      headers: {
        'Authorization': 'Bearer YOUR_API_TOKEN'
      }
    })
    console.log(response.status, await response.text())
    
  • import requests
    
    response = requests.delete(
        'https://api.useapi.net/v1/flowmusic/jobs/job:2c9a1e3f-6b8d-4f0a-9e7c-1d2b3c4d5e6f-user:[email protected]:flowmusic',
        headers={'Authorization': 'Bearer YOUR_API_TOKEN'},
    )
    print(response.status_code, response.text)
    

Try It