tencent cloud

Cloud Infinite

Release Notes and Announcements
Release Notes
Announcements
Product Introduction
Product Overview
Product Strengths
Use Cases
Feature Overview
Regions and Domains
Specifications and Limits
Billing
Billing Overview
Billing Mode
Billable Items
Free Tier
Payment Overdue
Viewing Bill Details
FAQs
Getting Started
Registering and Logging In
Bind Bucket
Uploading and Processing File
Downloading and Deleting Images
Unbinding Buckets
Using CI via COS
Features
Image Processing
Media Processing
Content Moderation
AI Content Recognition
File Processing
Smart Voice
File processing
User Guide
Overview
Bucket Management
Smart Toolbox
Job and Workflow
Data Monitoring
Usage statistics
Use Cases
Copyright Protection Solutions
Image Processing Practices
Working with API Authorization Policies
Workflow Practices
API Documentation
API Overview
Structure
Common Request Headers
Common Response Headers
Activate Vast Service
Image Processing
AI-Based Content Recognition
Smart Audio
Media Processing
Content Moderation
Document Processing
File Processing
Job and Workflow
Cloud Virus Detection
Error Codes
Request Signature
SDK Documentation
SDK Overview
Android SDK
iOS SDK
COS Android SDK
C SDK
C++ SDK
.NET(C#) SDK
Go SDK
COS iOS SDK
Java SDK
JavaScript SDK
Node.js SDK
PHP SDK
Python SDK
Mini Program SDK
Personal Information Protection Policy for SDK
Security and Compliance
Permission ‍Management
FAQs
Basic Settings
Document Processing
Media Processing
Content Recognition
Smart Audio
Agreements
Service Level Agreement
Contact Us
Glossary

Template Search API

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2024-03-01 14:43:58

Overview

This document provides an overview of APIs and SDK code samples for template search.
API
Description
Searches for animated image templates.
Searches for screenshot templates.
Searches for watermark templates.
Searches for transcoding templates.
Searches for splicing templates.
Searches for top speed codec transcoding templates.
Searches for video montage templates.
Searches for voice/sound separation templates.
Searches for video enhancement templates.
Searching for image processing templates
Searches for image processing templates.
Searches for super resolution templates.

Searching for Template

Feature description

This API is used to search for templates of diverse types, such as Animation, Snapshot, Watermark, Transcode, Concat, HighSpeedHd, VideoMontage, VoiceSeparate, VideoProcess, PicProcess, and SuperResolution.

Method prototype

public Guzzle\\Service\\Resource\\Model describeMediaTemplates(array $args = array());

Sample request

<?php

require dirname(__FILE__) . '/../vendor/autoload.php';

$secretId = "SECRETID"; // Replace it with your actual `secretId`, which can be viewed and managed in the CAM console at https://console.tencentcloud.com/cam/capi.
$secretKey = "SECRETKEY"; // Replace it with your actual `secretKey`, which can be viewed and managed in the CAM console at https://console.tencentcloud.com/cam/capi.
$region = "ap-beijing"; // Replace it with the actual region, which can be viewed in the console at https://console.tencentcloud.com/cos5/bucket.
$cosClient = new Qcloud\\Cos\\Client(
array(
'region' => $region,
'schema' => 'https', // Protocol header, which is `http` by default.
'credentials'=> array(
'secretId' => $secretId ,
'secretKey' => $secretKey)));
try {
// Query the template list
$result = $cosClient->describeMediaTemplates(array(
'Bucket' => 'examplebucket-125000000', // Bucket name in the format of `BucketName-Appid`, which can be viewed in the COS console at https://console.tencentcloud.com/cos5/bucket.
'Tag' => '', // Template type. Valid values: `Animation`, `Snapshot`, `Watermark`, `Transcode`, `Concat`, `HighSpeedHd`, `VideoMontage`, `VoiceSeparate`, `VideoProcess`, `PicProcess`.
'Category' => 'Custom',
'Ids' => '',
'Name' => '',
'PageNumber' => '',
'PageSize' => '',
));
// The request succeeded.
print_r($result);
} catch (\\Exception $e) {
// The request failed.
echo($e);
}

Parameter description

Request has the following sub-nodes:
Node Name (Keyword)
Parent Node
Description
Type
Required
Tag
None
Template type
String
Yes
Category
None
Template category: Custom or Official. Default value: Custom.
String
No
Ids
None
Template ID. If you enter multiple IDs, separate them by comma.
String
No
Name
None
Template name prefix
String
No
PageNumber
None
Page number
Integer
No
PageSize
None
Number of entries per page
Integer
No

Sample response

GuzzleHttp\\Command\\Result Object
(
[RequestId] => NjJhOTRlZDFfNzgwYzdkAOIUDOAIUDTA4ZWE=
[ContentType] => application/xml
[ContentLength] => 782
[TotalCount] => 1
[PageNumber] => 1
[PageSize] => 10
[TemplateList] => Array
(
[0] => Array
(
[TemplateId] => t1456ea89fcbdf45basd7fa98sd97a5
[Name] => VoiceSeparate-Name
[State] => Normal
[Tag] => VoiceSeparate
[CreateTime] => 2021-12-27T22:19:15+0800
[UpdateTime] => 2021-12-27T22:19:15+0800
[BucketId] => examplebucket-125000000
[Category] => Custom
[VoiceSeparate] => Array
(
[AudioMode] => AudioAndBackground
[AudioConfig] => Array
(
[Codec] => mp3
[Samplerate] => 44100
[Bitrate] => 128
[Channels] => 2
)

)

)

)

[Bucket] => examplebucket-125000000
[Location] => examplebucket-125000000.ci.ap-guangzhou.myqcloud.com/template
)

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan