# Panjaya Dubbing Studio API


## 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:

```http
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.

| Language           | Locale code | Source supported | Target supported |
|--------------------|-------------|------------------|------------------|
| Arabic             | ar-AE       | ✅               | ✅               |
| Bulgarian          | bg-BG       | ✅               | ✅               |
| Cantonese          | yue-CN      | ✅               | ✅               |
| 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       | ✅               | ✅               |
| Thai               | th-TH       | 🚫               | ✅               |
| Turkish            | tr-TR       | ✅               | ✅               |
| Ukrainian          | uk-UA       | ✅               | ✅               |
| Urdu               | ur-IN       | ✅               | 🚫               |
| Vietnamese         | vi-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
- **429 Too Many Requests**: Too many requests
- **500 Internal Server Error**: An internal server error occurred


## Servers

```
https://api.panjaya.ai
```

## Security

### api_key

[object Object]

Type: http
Scheme: bearer

## Download OpenAPI description

 - [Panjaya Dubbing Studio API](https://docs.panjaya.ai/_bundle/apis/index.yaml)

## Assets

 - [GET /v1/assets/](https://docs.panjaya.ai/apis/assets/assets-get_assets.md): Get a paginated list of your assets. This endpoint allows you to fetch all your assets with basic metadata, including the asset's current status and associated dubbings. For available versions of each
 - [POST /v1/assets/](https://docs.panjaya.ai/apis/assets/assets-create_asset.md): Creating an asset is the first step to dubbing your video with Panjaya Dubbing Studio. This endpoint allows you to: - Upload a source video - Configure the necessary parameters to initiate the dubbing
 - [POST /v1/assets/upload](https://docs.panjaya.ai/apis/assets/assets-upload_asset.md): Upload an asset video file directly to Panjaya Dubbing Studio. This endpoint allows you to upload a video file directly, saving the need to upload to an external storage service. It accepts the same p
 - [GET /v1/assets/{asset_id}](https://docs.panjaya.ai/apis/assets/assets-get_asset.md): After creating an asset - either through the Panjaya Dubbing Studio API or by uploading it via the Panjaya Dubbing Studio web interface - you can easily fetch detailed information about the asset by s
 - [POST /v1/assets/{asset_id}/languages](https://docs.panjaya.ai/apis/assets/assets-add_languages.md): With this endpoint, you can add new languages to an existing asset. Once you make the request, Panjaya will initiate a new dubbing process for each added language. Once the process is complete, you w
## Versions

 - [GET /v1/versions/{version_id}](https://docs.panjaya.ai/apis/versions/versions-get_version.md): 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 an
 - [PATCH /v1/versions/{version_id}/revise](https://docs.panjaya.ai/apis/versions/versions-revise_version.md): 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 t
 - [POST /v1/versions/{version_id}/generate](https://docs.panjaya.ai/apis/versions/versions-generate_version.md): 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 w
 - [POST /v1/versions/{version_id}/studio_url](https://docs.panjaya.ai/apis/versions/versions-get_studio_url_for_version.md): 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 nee
 - [GET /v1/versions/{version_id}/srt](https://docs.panjaya.ai/apis/versions/versions-get_version_srt.md): 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 t
## Callbacks

 - [POST /callback](https://docs.panjaya.ai/apis/callbacks/callback_callback_post.md): To stay informed about the progress of dubbing processes, you can configure a callback URL. For every status update related to an asset or its versions, Panjaya will send an HTTP `POST` request to the
## Voices

 - [GET /v1/voices](https://docs.panjaya.ai/apis/voices/voices-get_voices.md): List the library voices available for voice-over. Use a voice's `library_id` as a language's `voice_over_library_id` in the create-asset request.
