# 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. ## Creating a new asset - [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 process ### Uploading the Source Video - Use the parameter to specify the publicly accessible URL of the source video you want to dub. - Set the field to indicate the original language of the source video. - It is recommended to set the field to the number of distinct speakers in the video, to improve accuracy and quality of the final video. ### Adding Target Languages Define the languages into which you want to dub the video: Panjaya's locale codes adhere to the IETF Language Tag standard, combining ISO 639-1 language codes and ISO 3166-1 country codes. Examples: (English - United States), (Spanish - Spain), (Chinese - China). For each target language, you may optionally provide a valid SRT file, where applicable, in the designated field. ### Trimming the Video You can optionally use the and parameters to trim your video, allowing you to dub a specific section of your video. Both parameters accept a number of seconds from the beginning of the video. For example, if you want to dub only the first 2 minutes of your video, set to . If not specified, defaults to (beginning of the video), and defaults to the end of the video. ### Status Updates via Callbacks Optionally, you can configure a to receive real-time status updates about the dubbing process. When a is specified, Panjaya will send updates whenever the status of an asset or any of its dubbing versions changes. For detailed information on implementing callbacks, refer to the Callbacks section of this documentation. ### Models The field specifies which lips model to use when generating versions under this asset. This parameter is only applicable when lip correction is enabled. You can use it to fine-tune the balance between quality and performance. * (Default): Our highest-quality lips model, suitable for most use cases. * : Optimized for speed - up to 4× faster than , while maintaining high quality. ### Background Audio Panjaya uses our SceneAware audio separation model to separate speech from background audio in the source video. This preserves the original background audio in the dubbed result, creating a more natural and immersive experience. If you already have a clean background audio track (e.g., music and sound effects without speech), you can provide a publicly accessible URL to it via the field. Panjaya will then use this track directly instead of separating background audio from the source video. ## Uploading a new asset - [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 parameters as the Create Asset endpoint, except for the parameter, which is replaced by the file input. Note that this endpoint is structured as a request, where the form field contains a JSON-serialized object with the asset parameters, and the form field contains the video file to be uploaded. You may additionally provide a file to upload a clean background audio track. Refer to Background Audio section under create asset endpoint. ## Get an asset - [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 specifying its asset ID. This endpoint allows you to access key metadata, including the asset's current status, associated dubbings, and available versions. ### Asset processing failures In case of an error while processing the asset, the asset status will be , and the 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 assets: - : The input provided is invalid. Ensure all provided fields match the asset's properties. - : We didnt find a valid video stream in the media file. - : No spoken content was identified in the uploaded video. - : No audio tracks were found in the source video. - : The video duration limit for your account has been reached. - : The file size of the requested video has exceeded the allowed size limit. - : The provided start_time or end_time is out of video range. Ensure that the timestamps are within the video duration. ## Add languages to an existing asset - [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 will be notified via email and the callback URL, if configured.