Upscale to 4K
Table of contents
December 6, 2024
https://api.useapi.net/v2/pixverse/videos/upscale
Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
# Alternatively you can use multipart/form-data
# Content-Type: multipart/form-data
API token
is required, see Setup useapi.net for details.
Request Body
{
"video_id": "Required video_id",
"replyUrl": "Place your call back URL here",
"replyRef": "Place your reference id here",
"maxJobs": 3
}
-
video_id
is required, retrieve thevideo_id
of the desired video using GET /videos. -
replyUrl
is optional, if not provided value from account will be used.
Place here your callback URL. API will call the providedreplyUrl
once PixVerse video completed or failed.
Maximum length 1024 characters.
We recommend using sites like webhook.site to test callback URL functionality. -
replyRef
is optional, place here your reference id which will be stored and returned along with this PixVerse video response / result.
Maximum length 1024 characters. -
maxJobs
is optional, if not specified value from selected accounts/email will be used.
Valid range: 1…8
It should not exceed the number of concurrent generations supported by your account subscription plan.
Responses
-
Use the returned
video_id
to retrieve video status and results using GET /videos. Locate the video in the response array and check if the fieldvideo_status_final
istrue
orvideo_status_name
isCOMPLETED
. The fieldurl
will contain the generated video link.If you specify the optional parameter
replyUrl
, the API will call the providedreplyUrl
with video progress updates until the video is complete or fails.{ "video_id": "user:<userid>-pixverse:<email>-video:<number>" }
-
{ "error": "<Error message>" }
-
{ "error": "Unauthorized" }
-
Insufficient credits. All Credits have been used up. Please upgrade your membership or purchase credits.
{ "error": "All Credits have been used up. Please upgrade your membership or purchase credits." }
-
Wait in a loop for at least 10..30 seconds and retry again.
There are two possible cases for API response 429:
- API query is full and can not accept new videos/upscale requests. Size of query defined by
maxJobs
optional parameter.{ "error": "Account <email> is busy executing <maxJobs> tasks." "All configured accounts are running at maximum capacity." }
- The API received an HTTP response status 429 from PixVerse. Please refer to your subscription plan for the maximum allowed tasks in the queue.
{ "error": "Reached the limit for concurrent generations." }
- API query is full and can not accept new videos/upscale requests. Size of query defined by
-
596 Pending mod message
Your PixVerse.ai account has a pending error. Most likely, you changed your account password or your PixVerse.ai account was placed on hold. Once the issue is resolved, update your account to clear the error by executing POST accounts/email before making any new API calls.
{ "error": "Your PixVerse account has pending error." "Please address this issue at https://useapi.net/docs/api-pixverse-v2/post-pixverse-accounts-email before making any new API calls." }
Model
{ // TypeScript, all fields are optional
video_id: string
error: string
}
Examples
-
curl -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer …" \ -X POST "https://api.useapi.net/v2/pixverse/videos/upscale" \ -d '{"video_id": "…"}'
-
const video_id = "video_id"; const apiUrl = `https://api.useapi.net/v2/pixverse/videos/upscale`; const token = "API token"; const data = { method: 'POST', headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' } }; data.body = JSON.stringify({ video_id }); const response = await fetch(apiUrl, data); const result = await response.json(); console.log("response", {response, result});
-
import requests video_id = "video_id" apiUrl = f"https://api.useapi.net/v2/pixverse/videos/upscale" token = "API token" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } body = { "video_id": f"{video_id}" } response = requests.post(apiUrl, headers=headers, json=body) print(response, response.json())