Skip to content

Versions

After upload, an initial version of the dub is automatically created for each language. You can create additional versions for each language to act as snapshots in time as you edit or to edit independently, with each version identified by a unique version ID.

Get a dubbing version

Request

Retrieve detailed information about a specific dubbing version by providing its unique Version ID.

Response Details

The response includes metadata about the version, such as its current status and progress in the dubbing process.

The studio_url field provides a link to Panjaya Dubbing Studio, where you can fine-tune the dubs further. This URL is not signed and requires authentication. Use the /studio_url endpoint (as described below) to pre-sign a URL.

If the final video has been successfully generated, the response will also include a signed URL in the result_url field. This URL allows you to securely download the fully synchronized video, complete with lip and body language alignment. A signed URL for the dubbed audio track is also returned in the result_audio_url field.

Both result_url and result_audio_url are short-lived signed URLs that expire 5 days after the response is issued. Re-call this endpoint to obtain a fresh URL once the previous one has expired.

Version Status

The status field indicates the current state of the version. Possible values include:

  • NotReady: The version is currently being prepared for editing.
  • ReadyToEdit: The version is ready for editing and refinement in the Panjaya Dubbing Studio web interface.
  • Generating: The version is being processed to generate the final video. Editing is temporarily disabled during this stage.
  • Completed: The version has been successfully generated and is ready for download.
  • Failed: An error occurred during the version processing.

Version failures

If the version status is Failed, the error field in this endpoint's response will contain helpful information for identifying the issue.

It contains an error code and a detailed error message to help you understand and resolve the issue. Here is a list of common error codes for versions:

  • general_error: A general error occurred.
  • insufficient_balance: Your organization's balance is insufficient to perform this operation.
Security
api_key
Path
version_idstringrequired
import requests

version_id = "YOUR_version_id_PARAMETER"
url = "https://api.panjaya.ai/v1/versions/" + version_id

headers = {"Authorization": "Bearer <YOUR_TOKEN_HERE>"}

response = requests.get(url, headers=headers)

data = response.json()
print(data)

Responses

Version found

Bodyapplication/json
asset_idstringrequired
dubbing_idstringrequired
version_idstringrequired
namestringrequired
studio_urlstringrequired
localestring, [ 5 .. 6 ] characters^[a-z]{2,3}-[A-Z]{2}$required

A locale code of a supported locale. If the locale is not supported, an error response of status 400 will be returned.

created_atstring, (date-time)required
statusstringrequired
Enum:"NotReady""ReadyToEdit""Generating""Completed""Failed"
result_urlstring or null
Any of:
string
result_audio_urlstring or null
Any of:
string
result_generated_atstring or null
Any of:
string (date-time)
voice_overboolean

Whether the version was created with voice-over enabled, keeping the original audio under the dubbed vocals.

Default:false
errorApiVersionErrorInfo (object) or null
Any of:

In case of an error while processing the version, this field contains helpful information for identifying the issue.

Response
{ "asset_id": "7b9b9e3c3c7e322aec4c3d9b", "dubbing_id": "7b9b9e3c3c7e322aec4c3d9c", "version_id": "7b9b9e3c3c7e322aec4c3d9d", "name": "Version 1", "locale": "es-ES", "created_at": "2021-09-01T12:00:00Z", "status": "Completed", "result_url": "https://cdn.panjaya.ai/your-result.mp4", "result_audio_url": "https://cdn.panjaya.ai/your-result.mp3", "studio_url": "https://client.panjaya.ai/v/7b9b9e3c3c7e322aec4c3d9d" }