tencent cloud

APIs

CreateJustInTimeTranscodeTemplate

ダウンロード
フォーカスモード
フォントサイズ
最終更新日: 2026-11-25 16:59:22

1. API Description

Domain name for API request: teo.intl.tencentcloudapi.com.

JIT transcoding already provides preset transcoding templates to meet most needs. For personalized transcoding requirements, you can create custom transcoding templates through this API, with up to 100 custom templates.
To ensure consistency of JIT transcoding effects and avoid video output exceptions caused by template changes during EO cache or M3U8 sharding, the template cannot be modified after creation.
To learn about JIT transcoding capacity, see EdgeOne Video Instant Processing Function Introduction (https://www.tencentcloud.com/document/product/1552/111927?from_cn_redirect=1).

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: CreateJustInTimeTranscodeTemplate.
Version Yes String Common Params. The value used for this API: 2022-09-01.
Region No String Common Params. This parameter is not required.
ZoneId Yes String Site ID.
TemplateName Yes String Just in time transcoding template name. Length limit: 64 characters.
Comment No String Template description information. The length cannot exceed 256 characters. Empty by default.
VideoStreamSwitch No String Video stream switch. Valid values:
  • on: Enable;
  • off: Disable.
  • Default value: on.
    AudioStreamSwitch No String Enable audio stream switch. Value:
  • on: Enable;
  • off: Disable.
  • Default value: on.
    VideoTemplate No VideoTemplateInfo Video stream configuration parameters. This field is required when VideoStreamSwitch is on.
    AudioTemplate No AudioTemplateInfo Audio stream configuration parameters. This field is required when AudioStreamSwitch is on.

    3. Output Parameters

    Parameter Name Type Description
    TemplateId String Unique identifier of the JIT transcoding template, used for JIT transcoding URL concatenation.
    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Creating a Just In Time Transcoding Template

    Create a just in time transcoding template.

    Input Example

    POST / HTTP/1.1
    Host: teo.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: CreateJustInTimeTranscodeTemplate
    <Common request parameters>
    
    {
        "ZoneId": "zone-djuqmq",
        "TemplateName": "myTemplate",
        "Comment": "This is my template.",
        "VideoStreamSwitch": "on",
        "AudioStreamSwitch": "on",
        "VideoTemplate": {
            "Codec": "H.264",
            "Bitrate": 2048,
            "Fps": 25
        },
        "AudioTemplate": {
            "Codec": "libfdk_aac",
            "AudioChannel": 2
        }
    }

    Output Example

    {
        "Response": {
            "TemplateId": "C1LZ7982VgTpYhJ7M",
            "RequestId": "12ae8d8e-dce3-4151-9d4b-5594145287e1"
        }
    }

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    FailedOperation.ProductDiscontinued The product will already be discontinued. Operation denied.
    FailedOperation.ProductNotActivated No. Enable this product and try again.
    FailedOperation.TemplateOverLimit The number of templates under this site exceeds the maximum quantity limit.
    InternalError Internal error.
    InvalidParameterValue Parameter value error.
    InvalidParameterValue.ZoneNotFound No corresponding site. Please ensure the site information is filled correctly.
    InvalidParameterValue.ZonePaused Site disabled. Check the current site status.
    MissingParameter Parameters are missing.
    UnauthorizedOperation Unauthorized operation.

    ヘルプとサポート

    この記事はお役に立ちましたか?

    フィードバック