This API version is deprecated.

Please use PixVerse API v2 it supports all recent features, including effects, extend, lipsync and more.

Cancel PixVerse job

Table of contents

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

Cancel execution of job created by

https://api.useapi.net/v1/pixverse/jobs/cancel/?jobid=jobid

Request Headers
Authorization: Bearer {API token}
Query Parameter

jobid is required, use value returned by

Responses
  • {
        "jobid": "<jobid>",
        "status": "cancelled"
    }   "code": 200
    
  • 400 Bad Request

    {
        "error": "Query param jobid not provided",
        "code": 400
    }
    
  • 401 Unauthorized

    {
        "error": "Unauthorized",
        "code": 401
    }
    
  • 402 Payment Required

    {
        "error": "Account has no subscription or subscription expired",
        "code": 402
    }
    
  • 404 Not Found

    {
        "error": "Unable to locate job <jobid>",
        "code": 404
    }
    
Model
{ // TypeScript, all fields are optional
  jobid: string, 
  status: 'created' | 'started' | 'moderated' | 'progress' | 
          'completed' | 'failed' | 'cancelled',
  error: string,
  errorDetails: string,
  code: number
}
Examples
  • curl https://api.useapi.net/v1/pixverse/jobs/cancel/?jobid=\
       -H "Accept: application/json" \
       -H "Authorization: Bearer …" 
    
  • const token = "API token";
    const jobid = "jobid returned by pixverse/create, pixverse/animate, pixverse/encrypt_text, pixverse/encrypt_image or pixverse/button";      
    const apiUrl = `https://api.useapi.net/v1/pixverse/jobs/cancel/?jobid=${jobid}`; 
    const response = await fetch(apiUrl, {
      headers: {
        "Authorization": `Bearer ${token}`,
      },
    });
    const result = await response.json();
    console.log("response", {response, result});
    
  • import requests
    token = "API token"
    jobid = "jobid returned by pixverse/create, pixverse/animate, pixverse/encrypt_text, pixverse/encrypt_image or pixverse/button"
    apiUrl = f"https://api.useapi.net/v1/pixverse/jobs/cancel/?jobid={jobid}"
    headers = {
        "Content-Type": "application/json", 
        "Authorization" : f"Bearer {token}"
    }
    response = requests.get(apiUrl, headers=headers)
    print(response, response.json())
    
Try It