# Creating a new asset 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. Endpoint: POST /v1/assets/ Security: api_key ## Request fields (application/json): - `name` (string, required) Display name of the dubbing project. Must not be empty. Names exceeding 255 characters will be automatically truncated. - `locale` (string, required) A locale code of [a supported locale](#section/Languages-support). If the locale is not supported, an error response of status 400 will be returned. - `languages` (array, required) List of languages to translate and dub the asset to - `languages.srt` (any) Optional reference SRT file contents. Must be in a [valid SRT file format](https://docs.fileformat.com/video/srt/), otherwise, an error response of status 400 will be returned. - `callback_url` (any) - `speakers_count` (any) Number of speakers in the source video. If not specified, Panjaya will attempt to automatically detect the number of speakers in the video. - `start_time` (any) Trim the source video from this time (in seconds). Must be within the video's total duration, otherwise, the asset will fail with an error code of . Defaults to the start of the video. - `end_time` (any) Trim the source video to this time (in seconds). Must be greater than start_time, if provided, and within the video's total duration, otherwise, the asset will fail with an error code of . Defaults to the end of the video. - `auto_generate` (string) If specified, Panjaya will generate the result video automatically, with or without synthesized lips according to the parameter's value. If not specified, Panjaya will not generate the result video automatically. Enum: "off", "with_lips", "no_lips" - `source_srt` (any) Optional reference SRT file contents. Recommended to be in a [valid SRT file format](https://docs.fileformat.com/video/srt/), but other textual formats are also accepted. - `lips_model` (any) - `media_url` (string, required) Public URL (can be temporary) of the source video - `background_url` (any) ## Response 201 fields (application/json): - `asset_id` (string, required) - `name` (string, required) - `locale` (string, required) A locale code of [a supported locale](#section/Languages-support). If the locale is not supported, an error response of status 400 will be returned. - `created_at` (string, required) - `status` (string, required) Enum: "Dubbing", "PendingReview", "Ready", "Failed" - `languages` (array, required) - `languages.dubbing_id` (any, required) - `languages.versions` (array, required) - `languages.versions.version_id` (string, required) - `duration` (any, required) Duration of the source video in seconds. The field may be while the asset is processing. - `error` (any) ## Response 400 fields (application/json): - `detail` (string, required) A full description of the error. ## Response 401 fields (application/json): - `detail` (string, required) A full description of the error. ## Response 403 fields (application/json): - `detail` (string, required) A full description of the error. ## Response 500 fields (application/json): - `detail` (string, required) A full description of the error.