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
Cancel execution of job created by
https://api.useapi.net/v1/pixverse/jobs/cancel/?jobid=
jobid
Request Headers
Authorization: Bearer {API token}
API token
is required, see Setup useapi.net for details.
Query Parameter
jobid
is required, use value returned by
Responses
-
{ "jobid": "<jobid>", "status": "cancelled" } "code": 200
-
{ "error": "Query param jobid not provided", "code": 400 }
-
{ "error": "Unauthorized", "code": 401 }
-
{ "error": "Account has no subscription or subscription expired", "code": 402 }
-
{ "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())