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.
Panjaya Dubbing Studio API
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}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.
| Language | Locale code | Source supported | Target supported |
|---|---|---|---|
| Arabic | ar-AE | ✅ | ✅ |
| Bulgarian | bg-BG | ✅ | ✅ |
| Chinese | zh-CN | ✅ | ✅ |
| Croatian | hr-HR | ✅ | ✅ |
| Czech | cs-CZ | ✅ | ✅ |
| Danish | da-DK | ✅ | ✅ |
| Dutch | nl-NL | ✅ | ✅ |
| English | en-US | ✅ | ✅ |
| Filipino | fil-PH | ✅ | ✅ |
| Finnish | fi-FI | ✅ | ✅ |
| French | fr-FR | ✅ | ✅ |
| German | de-DE | ✅ | ✅ |
| Greek | el-GR | ✅ | ✅ |
| Hebrew | he-IL | ✅ | 🚫 |
| Hindi | hi-IN | ✅ | ✅ |
| Hungarian | hu-HU | ✅ | ✅ |
| Indonesian | id-ID | ✅ | ✅ |
| Italian | it-IT | ✅ | ✅ |
| Japanese | ja-JP | ✅ | ✅ |
| Korean | ko-KR | ✅ | ✅ |
| Lithuanian | lt-LT | ✅ | ✅ |
| Malay | ms-MY | ✅ | ✅ |
| Norwegian | nb-NO | ✅ | ✅ |
| Polish | pl-PL | ✅ | ✅ |
| Portuguese | pt-BR | ✅ | ✅ |
| Portuguese | pt-PT | ✅ | ✅ |
| Romanian | ro-RO | ✅ | ✅ |
| Russian | ru-RU | ✅ | ✅ |
| Slovak | sk-SK | ✅ | ✅ |
| Spanish | es-ES | ✅ | ✅ |
| Spanish | es-MX | ✅ | ✅ |
| Swedish | sv-SE | ✅ | ✅ |
| Tamil | ta-IN | ✅ | ✅ |
| Turkish | tr-TR | ✅ | ✅ |
| Ukrainian | uk-UA | ✅ | ✅ |
| Vietnamese | vi-VN | ✅ | ✅ |
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
https://api.panjaya.ai/
Request
Retrieve detailed information about a specific dubbing version by providing its unique Version ID.
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.
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.
https://api.panjaya.ai/v1/versions/{version_id}
- Payload
- Python
- Go
- JavaScript
- C#
- Java
- curl
No request payloadVersion found
A locale code of a supported locale. If the locale is not supported, an error response of status 400 will be returned.
{ "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.
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.
https://api.panjaya.ai/v1/versions/{version_id}/revise
- Payload
- Python
- Go
- JavaScript
- C#
- Java
- curl
{}
{ "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.
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.
https://api.panjaya.ai/v1/versions/{version_id}/generate
- Payload
- Python
- Go
- JavaScript
- C#
- Java
- curl
{ "generate_mode": "with_lips" }
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.
https://api.panjaya.ai/v1/versions/{version_id}/studio_url
- Payload
- Python
- Go
- JavaScript
- C#
- Java
- curl
{}
{ "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.
https://api.panjaya.ai/v1/versions/{version_id}/srt
- Payload
- Python
- Go
- JavaScript
- C#
- Java
- curl
No request payload1
00:00:00,000 --> 00:00:03,000
Hello, world!