Skip to content

Authentication

To authenticate with the API, you will need to provide your API key in the Authorization header of each request.

It should look like this:

Authorization: Bearer panjaya-{YOUR_API_KEY}

Languages support

Below is a list of supported languages and their corresponding locale codes that are used in Panjaya Dubbing Studio API. Please note that some languages are marked as source languages only, meaning they can only be used as the source language of the uploaded videos, while some are marked as target languages only - meaning they can only be translated into.

LanguageLocale codeSource supportedTarget supported
Arabicar-AE
Bulgarianbg-BG
Chinesezh-CN
Croatianhr-HR
Czechcs-CZ
Danishda-DK
Dutchnl-NL
Englishen-US
Filipinofil-PH
Finnishfi-FI
Frenchfr-FR
Germande-DE
Greekel-GR
Hebrewhe-IL🚫
Hindihi-IN
Hungarianhu-HU
Indonesianid-ID
Italianit-IT
Japaneseja-JP
Koreanko-KR
Lithuanianlt-LT
Malayms-MY
Norwegiannb-NO
Polishpl-PL
Portuguesept-BR
Portuguesept-PT
Romanianro-RO
Russianru-RU
Slovaksk-SK
Spanishes-ES
Spanishes-MX
Swedishsv-SE
Tamilta-IN
Turkishtr-TR
Ukrainianuk-UA
Vietnamesevi-VN

Error codes

Panjaya Dubbing Studio API uses standard HTTP status codes to indicate the success or failure of an API request. In case of an error, the response body will include a detailed error message to help you identify and resolve the issue.

Here is a list of erroneous HTTP status codes and their general meanings:

  • 401 Unauthorized: The API key could not be validated
  • 400 Bad Request: The request could not be processed due to invalid input
  • 403 Forbidden: The request could not be completed due to account limitations
  • 404 Not Found: The requested resource was not found
  • 500 Internal Server Error: An internal server error occurred
Overview
Languages
Servers

https://api.panjaya.ai/

Assets

Assets are the core resource in Panjaya Dubbing Studio. An asset represents a source video you want to dub into different languages. Each asset can be dubbed into multiple languages, and every language is assigned a unique dubbing ID. You can optionally add SRT files for better accuracy.

Operations

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.

Operations

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.

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.
Security
api_key
Path
version_idstringrequired
No request payload

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
errorobject or null
Any of:

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

Response
application/json
{ "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" }

Request

Revert a generated dubbing version to editing mode in the Panjaya Dubbing Studio.

Once a dubbing version is successfully generated, its status changes to Completed, allowing only preview access to the generated video. If further edits are needed, use this endpoint to restore the version to an editable state.

Note: This action permanently removes the generated video and its associated result_url.

If studio_url_request provided this endpoint will return a URL to the Panjaya Dubbing Studio. See the Create a signed URL endpoint for more details.

Version Status

This operation is only allowed if the version status is either Completed, ReadyToEdit or Failed. Upon execution, the version status will be updated to ReadyToEdit, allowing further modifications.

Security
api_key
Path
version_idstringrequired
Bodyapplication/json
studio_url_requestobject or null
Any of:
application/json
{}

Responses

Version has been reverted and is ready to edit in studio

Bodyapplication/json
studio_urlstring or null
Any of:
string
Response
application/json
{ "studio_url": "string" }

Request

Initiate the generation process for a dubbing version. Once the process is complete, and you'll receive notifications via email or a callback URL, if configured (see below). Your final video will then be available for download.

Version Status

This operation is only allowed if the version status is ReadyToEdit. Upon execution, the version status will be updated to Generating, until the generation process is completed, after which the version status will be updated to Completed.

Security
api_key
Path
version_idstringrequired
Bodyapplication/jsonrequired
generate_modestringrequired

Panjaya will generate the version with or without synthesized lips according to the parameter's value.

Enum"with_lips""no_lips"
application/json
{ "generate_mode": "with_lips" }

Responses

The version is being generated

Bodyapplication/json
any
Response
application/json
null

Request

Create a URL that allows anyone with the link to access the Panjaya Dubbing Studio for a specific dubbing version.

This endpoint is useful for sharing a version with collaborators or reviewers who need to make edits or QC the dubbing, without requiring them to log in.

The generated URL provides a pre-signed access to the Panjaya Dubbing Studio, where users can view the dubbing version, adjust the text, and fine-tune the dubbing. The access is limited to the specific version and does not allow access to other versions or assets.

Adjust the expiration_minutes parameter to specify the duration in minutes for which the URL will remain valid. The default expiration time is 3 hours.

Security
api_key
Path
version_idstringrequired
Bodyapplication/jsonrequired
sign_urlboolean

If true, the returned URL will be signed

Default true
expiration_minutesinteger( 0 .. 7200 )

Time in minutes for url to expire

Default 180
application/json
{}

Responses

Version found

Bodyapplication/json
studio_urlstringrequired
Response
application/json
{ "studio_url": "https://client.panjaya.ai/v/7b9b9e3c3c7e322aec4c3d9d?access_token=eJzrWfJ9jf..." }

Request

Fetch the current version's source transcript or target translation, formatted as an SRT file.

Use the locality query parameter to indicate the desired subtitles - Set to source for fetching the transcript in the asset's source language, or target for fetching the current translation in the version's target language.

Security
api_key
Path
version_idstringrequired
Query
localitystring
Default "target"
Enum"source""target"
No request payload

Responses

SRT successfully fetched

Bodyapplication/x-subrip
string
Response
application/x-subrip
1
00:00:00,000 --> 00:00:03,000
Hello, world!

Callbacks

Learn how to use a callback URL to receive real-time status updates about the dubbing process.

Webhooks