全部产品
云市场

视频AI

更新时间:2019-01-24 15:38:18

初始化客户端

使用前请先初始化客户端,参考 InitVodClient 接口。

提交AI作业

接口参数和返回字段请参考 SubmitAIJob

  1. using System;
  2. using Aliyun.Acs.Core;
  3. using Aliyun.Acs.Core.Exceptions;
  4. using Aliyun.Acs.vod.Model.V20170321;
  5. namespace Aliyun.Acs.vod.Sdk.SubmitAIJob
  6. {
  7. class MainClass
  8. {
  9. public static void Main(string[] args)
  10. {
  11. try
  12. {
  13. // 构造请求
  14. SubmitAIJobRequest request = new SubmitAIJobRequest();
  15. // 设置视频ID
  16. request.MediaId = "3eb19a4585bc475e995bddxxxxxxxx";
  17. // 设置AI类型,请确保已开通该类型AI
  18. request.Types = "AIVideoCover";
  19. // 初始化客户端
  20. DefaultAcsClient client = InitVodClient("<Your AccessKeyId>", "<Your AccessKeySecret>");
  21. // 发起请求,并得到 response
  22. SubmitAIJobResponse response = client.GetAcsResponse(request);
  23. // 请求ID
  24. Console.WriteLine("RequestId = " + response.RequestId);
  25. if (response.AIJobList != null && response.AIJobList.Count > 0)
  26. {
  27. foreach (var job in response.AIJobList)
  28. {
  29. // 视频ID
  30. Console.WriteLine("MediaId = " + job.MediaId);
  31. // 作业ID
  32. Console.WriteLine("JobId = " + job.JobId);
  33. // AI类型
  34. Console.WriteLine("Type = " + job.Type);
  35. }
  36. }
  37. }
  38. catch (ServerException e)
  39. {
  40. if (e.RequestId != null)
  41. {
  42. Console.WriteLine("RequestId = " + e.RequestId);
  43. }
  44. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  45. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  46. }
  47. catch (ClientException e)
  48. {
  49. if (e.RequestId != null)
  50. {
  51. Console.WriteLine("RequestId = " + e.RequestId);
  52. }
  53. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  54. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  55. }
  56. catch (Exception e)
  57. {
  58. Console.WriteLine("ErrorMessage = " + e.ToString());
  59. }
  60. }
  61. }
  62. }

查询AI作业

接口参数和返回字段请参考 ListAIJob

  1. using System;
  2. using Aliyun.Acs.Core;
  3. using Aliyun.Acs.Core.Exceptions;
  4. using Aliyun.Acs.vod.Model.V20170321;
  5. namespace Aliyun.Acs.vod.Sdk.ListAIJob
  6. {
  7. class MainClass
  8. {
  9. public static void Main(string[] args)
  10. {
  11. try
  12. {
  13. // 构造请求
  14. ListAIJobRequest request = new ListAIJobRequest();
  15. // 设置视频ID
  16. request.JobIds = "979d4d7a36ae41b1a945a2xxxxx,3eb19a4585bc475e995bddeaxxxxx";
  17. // 初始化客户端
  18. DefaultAcsClient client = InitVodClient("<Your AccessKeyId>", "<Your AccessKeySecret>");
  19. // 发起请求,并得到 response
  20. ListAIJobResponse response = client.GetAcsResponse(request);
  21. // 请求ID
  22. Console.WriteLine("RequestId = " + response.RequestId);
  23. // 打印作业列表
  24. if (response.AIJobList != null && response.AIJobList.Count > 0)
  25. {
  26. foreach (var job in response.AIJobList)
  27. {
  28. // 视频ID
  29. Console.WriteLine("MediaId = " + job.MediaId);
  30. // 作业ID
  31. Console.WriteLine("JobId = " + job.JobId);
  32. // AI类型
  33. Console.WriteLine("Type = " + job.Type);
  34. // 作业状态
  35. Console.WriteLine("Status = " + job.Status);
  36. // 作业结果
  37. Console.WriteLine("Data = " + job.Data);
  38. }
  39. }
  40. // 打印不存在的作业ID
  41. if (response.NonExistAIJobIds != null && response.NonExistAIJobIds.Count > 0)
  42. {
  43. foreach(jobId in response.NonExistAIJobIds)
  44. {
  45. // 作业ID
  46. Console.WriteLine("JobId = " + jobId);
  47. }
  48. }
  49. }
  50. catch (ServerException e)
  51. {
  52. if (e.RequestId != null)
  53. {
  54. Console.WriteLine("RequestId = " + e.RequestId);
  55. }
  56. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  57. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  58. }
  59. catch (ClientException e)
  60. {
  61. if (e.RequestId != null)
  62. {
  63. Console.WriteLine("RequestId = " + e.RequestId);
  64. }
  65. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  66. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  67. }
  68. catch (Exception e)
  69. {
  70. Console.WriteLine("ErrorMessage = " + e.ToString());
  71. }
  72. }
  73. }
  74. }

添加AI模板

接口参数和返回字段请参考 AddAITemplate

  1. using System;
  2. using Aliyun.Acs.Core;
  3. using Aliyun.Acs.Core.Exceptions;
  4. using Aliyun.Acs.Core.Profile;
  5. using Aliyun.Acs.vod.Model.V20170321;
  6. using Newtonsoft.Json.Linq;
  7. namespace Aliyun.Acs.vod.Sdk.AddAITemplate
  8. {
  9. class MainClass
  10. {
  11. /// <summary>
  12. /// The entry point of the program, where the program control starts and ends.
  13. /// </summary>
  14. /// <param name="args">The command-line arguments.</param>
  15. public static void Main(string[] args)
  16. {
  17. try
  18. {
  19. // 初始化客户端
  20. DefaultAcsClient client = InitVodClient("<Your AccessKeyId>", "<Your AccessKeySecret>");
  21. // 发起请求,并得到 response
  22. AddAITemplateResponse response = AddAITemplate(client);
  23. // 打印请求ID
  24. Console.WriteLine("RequestId = " + response.RequestId);
  25. // 打印模板ID
  26. Console.WriteLine("TemplateId = " + response.TemplateId);
  27. }
  28. catch (ServerException e)
  29. {
  30. if (e.RequestId != null)
  31. {
  32. Console.WriteLine("RequestId = " + e.RequestId);
  33. }
  34. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  35. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  36. }
  37. catch (ClientException e)
  38. {
  39. if (e.RequestId != null)
  40. {
  41. Console.WriteLine("RequestId = " + e.RequestId);
  42. }
  43. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  44. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  45. }
  46. catch (Exception e)
  47. {
  48. Console.WriteLine("ErrorMessage = " + e.ToString());
  49. }
  50. }
  51. /// <summary>
  52. /// 添加AI模板
  53. /// </summary>
  54. /// <param name="client">Client.</param>
  55. public static AddAITemplateResponse AddAITemplate(DefaultAcsClient client)
  56. {
  57. // 构造请求
  58. AddAITemplateRequest request = new AddAITemplateRequest();
  59. // 设置模板类型,以智能审核模板为例
  60. request.TemplateType = "AIMediaAudit";
  61. // 设置模板名称
  62. request.TemplateName = "My custom template";
  63. // 设置模板详细配置
  64. JObject templateConfig = new JObject();
  65. JArray auditItem = new JArray();
  66. auditItem.Add("terrorism");
  67. auditItem.Add("porn");
  68. templateConfig.Add("AuditItem", auditItem);
  69. JArray auditRange = new JArray();
  70. auditRange.Add("video");
  71. auditRange.Add("image-cover");
  72. auditRange.Add("text-title");
  73. templateConfig.Add("AuditRange", auditRange);
  74. JArray auditContent = new JArray();
  75. auditContent.Add("screen");
  76. templateConfig.Add("AuditContent", auditContent);
  77. templateConfig.Add("AuditAutoBlock", "no");
  78. request.TemplateConfig = templateConfig.ToString();
  79. // 返回结果
  80. return client.GetAcsResponse(request);
  81. }
  82. }
  83. }

删除AI模板

接口参数和返回字段请参考 DeleteAITemplate

  1. using System;
  2. using Aliyun.Acs.Core;
  3. using Aliyun.Acs.Core.Exceptions;
  4. using Aliyun.Acs.Core.Profile;
  5. using Aliyun.Acs.vod.Model.V20170321;
  6. namespace Aliyun.Acs.vod.Sdk.DeleteAITemplate
  7. {
  8. class MainClass
  9. {
  10. /// <summary>
  11. /// The entry point of the program, where the program control starts and ends.
  12. /// </summary>
  13. /// <param name="args">The command-line arguments.</param>
  14. public static void Main(string[] args)
  15. {
  16. try
  17. {
  18. // 初始化客户端
  19. DefaultAcsClient client = InitVodClient("<Your AccessKeyId>", "<Your AccessKeySecret>");
  20. // 发起请求,并得到 response
  21. DeleteAITemplateResponse response = DeleteAITemplate(client);
  22. // 打印请求ID
  23. Console.WriteLine("RequestId = " + response.RequestId);
  24. // 打印模板ID
  25. Console.WriteLine("TemplateId = " + response.TemplateId);
  26. }
  27. catch (ServerException e)
  28. {
  29. if (e.RequestId != null)
  30. {
  31. Console.WriteLine("RequestId = " + e.RequestId);
  32. }
  33. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  34. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  35. }
  36. catch (ClientException e)
  37. {
  38. if (e.RequestId != null)
  39. {
  40. Console.WriteLine("RequestId = " + e.RequestId);
  41. }
  42. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  43. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  44. }
  45. catch (Exception e)
  46. {
  47. Console.WriteLine("ErrorMessage = " + e.ToString());
  48. }
  49. }
  50. /// <summary>
  51. /// 删除AI模板
  52. /// </summary>
  53. /// <returns>删除AI模板</returns>
  54. /// <param name="client">Client.</param>
  55. public static DeleteAITemplateResponse DeleteAITemplate(DefaultAcsClient client)
  56. {
  57. // 构造请求
  58. DeleteAITemplateRequest request = new DeleteAITemplateRequest();
  59. // 设置模板ID
  60. request.TemplateId = "dc063078c1d845139e2a5bd8ffxxxxxx";
  61. // 返回结果
  62. return client.GetAcsResponse(request);
  63. }
  64. }
  65. }

修改AI模板

接口参数和返回字段请参考 UpdateAITemplate

  1. using System;
  2. using Aliyun.Acs.Core;
  3. using Aliyun.Acs.Core.Exceptions;
  4. using Aliyun.Acs.Core.Profile;
  5. using Aliyun.Acs.vod.Model.V20170321;
  6. using Newtonsoft.Json.Linq;
  7. namespace Aliyun.Acs.vod.Sdk.UpdateAITemplate
  8. {
  9. class MainClass
  10. {
  11. /// <summary>
  12. /// The entry point of the program, where the program control starts and ends.
  13. /// </summary>
  14. /// <param name="args">The command-line arguments.</param>
  15. public static void Main(string[] args)
  16. {
  17. try
  18. {
  19. // 初始化客户端
  20. DefaultAcsClient client = InitVodClient("<Your AccessKeyId>", "<Your AccessKeySecret>");
  21. // 发起请求,并得到 response
  22. UpdateAITemplateResponse response = UpdateAITemplate(client);
  23. // 打印请求ID
  24. Console.WriteLine("RequestId = " + response.RequestId);
  25. // 打印模板ID
  26. Console.WriteLine("TemplateId = " + response.TemplateId);
  27. }
  28. catch (ServerException e)
  29. {
  30. if (e.RequestId != null)
  31. {
  32. Console.WriteLine("RequestId = " + e.RequestId);
  33. }
  34. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  35. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  36. }
  37. catch (ClientException e)
  38. {
  39. if (e.RequestId != null)
  40. {
  41. Console.WriteLine("RequestId = " + e.RequestId);
  42. }
  43. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  44. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  45. }
  46. catch (Exception e)
  47. {
  48. Console.WriteLine("ErrorMessage = " + e.ToString());
  49. }
  50. }
  51. /// <summary>
  52. /// 修改AI模板
  53. /// </summary>
  54. /// <param name="client">Client.</param>
  55. public static UpdateAITemplateResponse UpdateAITemplate(DefaultAcsClient client)
  56. {
  57. // 构造请求
  58. UpdateAITemplateRequest request = new UpdateAITemplateRequest();
  59. // 设置模板名称
  60. request.TemplateName = "My custom template";
  61. // 设置模板详细配置
  62. JObject templateConfig = new JObject();
  63. JArray auditItem = new JArray();
  64. //auditItem.Add("terrorism");
  65. auditItem.Add("porn");
  66. templateConfig.Add("AuditItem", auditItem);
  67. JArray auditRange = new JArray();
  68. auditRange.Add("video");
  69. auditRange.Add("image-cover");
  70. auditRange.Add("text-title");
  71. templateConfig.Add("AuditRange", auditRange);
  72. JArray auditContent = new JArray();
  73. auditContent.Add("screen");
  74. templateConfig.Add("AuditContent", auditContent);
  75. templateConfig.Add("AuditAutoBlock", "no");
  76. request.TemplateConfig = templateConfig.ToString();
  77. // 返回结果
  78. return client.GetAcsResponse(request);
  79. }
  80. }
  81. }

查询AI模板

接口参数和返回字段请参考 GetAITemplate

  1. using System;
  2. using Aliyun.Acs.Core;
  3. using Aliyun.Acs.Core.Exceptions;
  4. using Aliyun.Acs.Core.Profile;
  5. using Aliyun.Acs.vod.Model.V20170321;
  6. namespace Aliyun.Acs.vod.Sdk.GetAITemplate
  7. {
  8. class MainClass
  9. {
  10. /// <summary>
  11. /// The entry point of the program, where the program control starts and ends.
  12. /// </summary>
  13. /// <param name="args">The command-line arguments.</param>
  14. public static void Main(string[] args)
  15. {
  16. try
  17. {
  18. // 初始化客户端
  19. DefaultAcsClient client = InitVodClient("<Your AccessKeyId>", "<Your AccessKeySecret>");
  20. // 发起请求,并得到 response
  21. GetAITemplateResponse response = GetAITemplate(client);
  22. // 打印请求ID
  23. Console.WriteLine("RequestId = " + response.RequestId);
  24. // 打印模板信息
  25. Console.WriteLine("TemplateId = " + response.TemplateInfo.TemplateId);
  26. Console.WriteLine("TemplateType = " + response.TemplateInfo.TemplateType);
  27. Console.WriteLine("TemplateName = " + response.TemplateInfo.TemplateName);
  28. Console.WriteLine("TemplateConfig = " + response.TemplateInfo.TemplateConfig);
  29. }
  30. catch (ServerException e)
  31. {
  32. if (e.RequestId != null)
  33. {
  34. Console.WriteLine("RequestId = " + e.RequestId);
  35. }
  36. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  37. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  38. }
  39. catch (ClientException e)
  40. {
  41. if (e.RequestId != null)
  42. {
  43. Console.WriteLine("RequestId = " + e.RequestId);
  44. }
  45. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  46. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  47. }
  48. catch (Exception e)
  49. {
  50. Console.WriteLine("ErrorMessage = " + e.ToString());
  51. }
  52. }
  53. /// <summary>
  54. /// 查询AI模板
  55. /// </summary>
  56. /// <returns>AI模板</returns>
  57. /// <param name="client">Client.</param>
  58. public static GetAITemplateResponse GetAITemplate(DefaultAcsClient client)
  59. {
  60. // 构造请求
  61. GetAITemplateRequest request = new GetAITemplateRequest();
  62. // 设置模板ID
  63. request.TemplateId = "dc063078c1d845139e2a5bd8ffxxxxxx";
  64. // 返回结果
  65. return client.GetAcsResponse(request);
  66. }
  67. }
  68. }

查询AI模板列表

接口参数和返回字段请参考 ListAITemplate

  1. using System;
  2. using Aliyun.Acs.Core;
  3. using Aliyun.Acs.Core.Exceptions;
  4. using Aliyun.Acs.Core.Profile;
  5. using Aliyun.Acs.vod.Model.V20170321;
  6. namespace Aliyun.Acs.vod.Sdk.ListAITemplate
  7. {
  8. class MainClass
  9. {
  10. /// <summary>
  11. /// The entry point of the program, where the program control starts and ends.
  12. /// </summary>
  13. /// <param name="args">The command-line arguments.</param>
  14. public static void Main(string[] args)
  15. {
  16. try
  17. {
  18. // 初始化客户端
  19. DefaultAcsClient client = InitVodClient("<Your AccessKeyId>", "<Your AccessKeySecret>");
  20. // 发起请求,并得到 response
  21. ListAITemplateResponse response = ListAITemplate(client);
  22. // 打印请求ID
  23. Console.WriteLine("RequestId = " + response.RequestId);
  24. // 打印模板信息
  25. if (response.TemplateInfoList != null && response.TemplateInfoList.Count > 0) {
  26. foreach (ListAITemplateResponse.ListAITemplate_TemplateInfoListItem templateInfo in response.TemplateInfoList) {
  27. Console.WriteLine("TemplateId = " + templateInfo.TemplateId);
  28. Console.WriteLine("TemplateType = " + templateInfo.TemplateType);
  29. Console.WriteLine("TemplateName = " + templateInfo.TemplateName);
  30. Console.WriteLine("TemplateConfig = " + templateInfo.TemplateConfig);
  31. }
  32. }
  33. }
  34. catch (ServerException e)
  35. {
  36. if (e.RequestId != null)
  37. {
  38. Console.WriteLine("RequestId = " + e.RequestId);
  39. }
  40. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  41. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  42. }
  43. catch (ClientException e)
  44. {
  45. if (e.RequestId != null)
  46. {
  47. Console.WriteLine("RequestId = " + e.RequestId);
  48. }
  49. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  50. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  51. }
  52. catch (Exception e)
  53. {
  54. Console.WriteLine("ErrorMessage = " + e.ToString());
  55. }
  56. }
  57. /// <summary>
  58. /// 查询AI模板列表
  59. /// </summary>
  60. /// <returns>AI模板列表</returns>
  61. /// <param name="client">Client.</param>
  62. public static ListAITemplateResponse ListAITemplate(DefaultAcsClient client)
  63. {
  64. // 构造请求
  65. ListAITemplateRequest request = new ListAITemplateRequest();
  66. // 设置模板类型,以智能审核模板为例
  67. request.TemplateType = "AIMediaAudit";
  68. // 返回结果
  69. return client.GetAcsResponse(request);
  70. }
  71. }
  72. }

设置默认AI模板

接口参数和返回字段请参考 SetDefaultAITemplate

  1. using System;
  2. using Aliyun.Acs.Core;
  3. using Aliyun.Acs.Core.Exceptions;
  4. using Aliyun.Acs.Core.Profile;
  5. using Aliyun.Acs.vod.Model.V20170321;
  6. namespace SetDefaultAITemplate
  7. {
  8. class MainClass
  9. {
  10. /// <summary>
  11. /// The entry point of the program, where the program control starts and ends.
  12. /// </summary>
  13. /// <param name="args">The command-line arguments.</param>
  14. public static void Main(string[] args)
  15. {
  16. try
  17. {
  18. // 初始化客户端
  19. DefaultAcsClient client = InitVodClient("<Your AccessKeyId>", "<Your AccessKeySecret>");
  20. // 发起请求,并得到 response
  21. SetDefaultAITemplateResponse response = SetDefaultAITemplate(client);
  22. // 打印请求ID
  23. Console.WriteLine("RequestId = " + response.RequestId);
  24. // 打印模板ID
  25. Console.WriteLine("TemplateId = " + response.TemplateId);
  26. }
  27. catch (ServerException e)
  28. {
  29. if (e.RequestId != null)
  30. {
  31. Console.WriteLine("RequestId = " + e.RequestId);
  32. }
  33. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  34. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  35. }
  36. catch (ClientException e)
  37. {
  38. if (e.RequestId != null)
  39. {
  40. Console.WriteLine("RequestId = " + e.RequestId);
  41. }
  42. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  43. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  44. }
  45. catch (Exception e)
  46. {
  47. Console.WriteLine("ErrorMessage = " + e.ToString());
  48. }
  49. }
  50. /// <summary>
  51. /// 设置默认AI模板
  52. /// </summary>
  53. /// <returns>默认AI模板</returns>
  54. /// <param name="client">Client.</param>
  55. public static SetDefaultAITemplateResponse SetDefaultAITemplate(DefaultAcsClient client)
  56. {
  57. // 构造请求
  58. SetDefaultAITemplateRequest request = new SetDefaultAITemplateRequest();
  59. // 设置模板ID
  60. request.TemplateId = "dc063078c1d845139e2a5bd8ffxxxxxx";
  61. // 返回结果
  62. return client.GetAcsResponse(request);
  63. }
  64. }
  65. }

查询默认AI模板

接口参数和返回字段请参考 GetDefaultAITemplate

  1. using System;
  2. using Aliyun.Acs.Core;
  3. using Aliyun.Acs.Core.Exceptions;
  4. using Aliyun.Acs.Core.Profile;
  5. using Aliyun.Acs.vod.Model.V20170321;
  6. namespace GetDefaultAITemplate
  7. {
  8. class MainClass
  9. {
  10. /// <summary>
  11. /// The entry point of the program, where the program control starts and ends.
  12. /// </summary>
  13. /// <param name="args">The command-line arguments.</param>
  14. public static void Main(string[] args)
  15. {
  16. try
  17. {
  18. // 初始化客户端
  19. DefaultAcsClient client = InitVodClient("<Your AccessKeyId>", "<Your AccessKeySecret>");
  20. // 发起请求,并得到 response
  21. GetDefaultAITemplateResponse response = GetDefaultAITemplate(client);
  22. // 打印请求ID
  23. Console.WriteLine("RequestId = " + response.RequestId);
  24. // 打印模板信息
  25. Console.WriteLine("TemplateId = " + response.TemplateInfo.TemplateId);
  26. Console.WriteLine("TemplateType = " + response.TemplateInfo.TemplateType);
  27. Console.WriteLine("TemplateName = " + response.TemplateInfo.TemplateName);
  28. Console.WriteLine("TemplateConfig = " + response.TemplateInfo.TemplateConfig);
  29. }
  30. catch (ServerException e)
  31. {
  32. if (e.RequestId != null)
  33. {
  34. Console.WriteLine("RequestId = " + e.RequestId);
  35. }
  36. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  37. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  38. }
  39. catch (ClientException e)
  40. {
  41. if (e.RequestId != null)
  42. {
  43. Console.WriteLine("RequestId = " + e.RequestId);
  44. }
  45. Console.WriteLine("ErrorCode = " + e.ErrorCode);
  46. Console.WriteLine("ErrorMessage = " + e.ErrorMessage);
  47. }
  48. catch (Exception e)
  49. {
  50. Console.WriteLine("ErrorMessage = " + e.ToString());
  51. }
  52. }
  53. /// <summary>
  54. /// 查询默认AI模板
  55. /// </summary>
  56. /// <returns>默认AI模板</returns>
  57. /// <param name="client">Client.</param>
  58. public static GetDefaultAITemplateResponse GetDefaultAITemplate(DefaultAcsClient client)
  59. {
  60. // 构造请求
  61. GetDefaultAITemplateRequest request = new GetDefaultAITemplateRequest();
  62. // 设置模板类型,以智能审核模板为例
  63. request.TemplateType = "AIMediaAudit";
  64. // 返回结果
  65. return client.GetAcsResponse(request);
  66. }
  67. }
  68. }