# Uploading a new asset 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. Endpoint: POST /v1/assets/upload Security: api_key ## Request fields (multipart/form-data): - `request` (object, required) A JSON object that accepts the same configuration as [creating an asset](/apis/assets/assets-create_asset) (except for the field). - `request.name` (string, required) Display name of the dubbing project. Must not be empty. Names exceeding 255 characters will be automatically truncated. - `request.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. - `request.languages` (array, required) List of languages to translate and dub the asset to - `request.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. - `request.callback_url` (any) - `request.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. - `request.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. - `request.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. - `request.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" - `request.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. - `request.lips_model` (any) - `video` (string, required) Video file to upload. Maximum size is 5GB. - `background` (string) Optional background audio file to upload. Maximum size is 500MB. ## 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.