import com.tencentcloudapi.common.Credential;
import com.tencentcloudapi.common.profile.ClientProfile;
import com.tencentcloudapi.common.profile.HttpProfile;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
import com.tencentcloudapi.ims.v20201229.ImsClient;
import com.tencentcloudapi.ims.v20201229.models.*;
public class ImageModeration
{
public static void main(String [] args) {
try{
Credential cred = new Credential("SecretId", "SecretKey");
HttpProfile httpProfile = new HttpProfile();
httpProfile.setEndpoint("ims.tencentcloudapi.com");
ClientProfile clientProfile = new ClientProfile();
clientProfile.setHttpProfile(httpProfile);
ImsClient client = new ImsClient(cred, "ap-guangzhou", clientProfile);
ImageModerationRequest req = new ImageModerationRequest();
ImageModerationResponse resp = client.ImageModeration(req);
System.out.println(ImageModerationResponse.toJsonString(resp));
} catch (TencentCloudSDKException e) {
System.out.println(e.toString());
}
}
}
本页内容是否解决了您的问题?