summaryrefslogtreecommitdiff
path: root/data/zh_cn/imageaudit/2019-12-30/api-docs.php
blob: fb44cd71f3680c19a686368e3457b94e068343fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
<?php return [
    'version' => '1.0',
    'info' => [
        'style' => 'RPC',
        'product' => 'imageaudit',
        'version' => '2019-12-30',
    ],
    'directories' => [
        [
            'id' => 64301,
            'title' => '内容审核',
            'type' => 'directory',
            'children' => [
                'ScanImage',
                'ScanText',
            ],
        ],
    ],
    'components' => [
        'schemas' => [],
    ],
    'apis' => [
        'ScanImage' => [
            'summary' => '本文介绍图片内容安全ScanImage的语法及示例。',
            'methods' => [
                'post',
            ],
            'schemes' => [
                'http',
                'https',
            ],
            'security' => [
                [
                    'AK' => [],
                ],
            ],
            'operationType' => 'read',
            'deprecated' => false,
            'systemTags' => [
                'operationType' => 'none',
                'riskType' => 'none',
                'chargeType' => 'paid',
            ],
            'parameters' => [
                [
                    'name' => 'Task',
                    'in' => 'formData',
                    'style' => 'repeatList',
                    'schema' => [
                        'description' => '1',
                        'type' => 'array',
                        'items' => [
                            'description' => '1',
                            'type' => 'object',
                            'properties' => [
                                'ImageTimeMillisecond' => [
                                    'description' => '图片创建或编辑时间,单位为毫秒。',
                                    'type' => 'integer',
                                    'format' => 'int64',
                                    'required' => false,
                                    'example' => '1',
                                ],
                                'Interval' => [
                                    'description' => '截帧频率,GIF图或者长图检测专用。GIF图可理解为图片数组,每**interval**张图片抽取一张进行检测。只有该值存在时,才会对GIF进行截帧。长图同时支持长竖图和长横图。'."\n"
                                        ."\n"
                                        .'- 长竖图(高大于400像素,高宽比大于2.5),会按照`高/宽`取整来计算总图数,并进行切割。'."\n"
                                        ."\n"
                                        .'- 长横图(宽大于400像素,宽高比大于2.5),会按照`宽/高`取整来计算总图数,并进行切割。'."\n"
                                        ."\n"
                                        .'> 默认只会检测GIF图或长图的第一帧,interval参数用于指示后台在检测时可按照该间隔跳着检测,以节省检测成本。需要与maxFrames参数组合使用。例如,设置interval为2,maxFrames为100,检测长图或GIF图时,将每间隔1帧检测一次,最多检测100帧,计费则按照实际检测的数量计算。'."\n",
                                    'type' => 'integer',
                                    'format' => 'int32',
                                    'required' => false,
                                    'example' => '1',
                                ],
                                'ImageURL' => [
                                    'description' => '待检测图像的URL地址。支持HTTP和HTTPS协议。推荐使用上海地域的OSS链接,对于文件在本地或者非上海地域OSS链接的情况,请参见[文件URL处理](~~155645~~)。'."\n"
                                        ."\n"
                                        .'> 如果使用上海地域的OSS链接,系统会自动将OSS链接地址转成内网地址然后再下载文件,所以调用该接口并不会产生OSS流量计费。',
                                    'type' => 'string',
                                    'required' => true,
                                    'example' => 'http://xxx.xxx.com/xxx.jpg',
                                    'isFileTransferUrl' => true,
                                ],
                                'MaxFrames' => [
                                    'description' => '最大截帧数量,GIF图或长图检测专用,默认值为1。'."\n"
                                        .'当interval*maxFrames小于该图片所包含的图片数量时,截帧间隔会自动修改为`该图片所包含的图片数/maxFrames`,以提高整体检测效果。',
                                    'type' => 'integer',
                                    'format' => 'int32',
                                    'required' => false,
                                    'example' => '1',
                                ],
                                'DataId' => [
                                    'description' => '数据ID。需要保证在一次请求中所有的ID不重复。',
                                    'type' => 'string',
                                    'required' => false,
                                    'example' => 'uuid-xxxx-xxxx-1234',
                                ],
                            ],
                            'required' => false,
                        ],
                        'required' => true,
                        'maxItems' => 10,
                    ],
                ],
                [
                    'name' => 'Scene',
                    'in' => 'formData',
                    'style' => 'repeatList',
                    'schema' => [
                        'description' => '1',
                        'type' => 'array',
                        'items' => [
                            'description' => '指定图片检测的应用场景,可选值包括:'."\n"
                                ."\n"
                                .'- porn:图片智能鉴黄'."\n"
                                ."\n"
                                .'- terrorism:图片敏感内容识别、图片风险人物识别'."\n"
                                ."\n"
                                .'- ad:图片垃圾广告识别'."\n"
                                ."\n"
                                .'- live:图片不良场景识别'."\n"
                                ."\n"
                                .'- logo:图片Logo识别'."\n"
                                ."\n"
                                .'> 支持多场景(scenes)一起检测。例如`scenes=[“porn”, “terrorism”]`,即对一张图片同时进行鉴黄和涉恐识别,此时也会按照两个场景计费。',
                            'type' => 'string',
                            'required' => false,
                            'example' => 'porn',
                        ],
                        'required' => true,
                        'example' => 'porn',
                        'maxItems' => 6,
                    ],
                ],
            ],
            'responses' => [
                200 => [
                    'headers' => [],
                    'schema' => [
                        'description' => '1',
                        'type' => 'object',
                        'properties' => [
                            'RequestId' => [
                                'description' => '请求ID。',
                                'type' => 'string',
                                'example' => '69B41AE8-1234-1234-1234-12D395695D2D',
                            ],
                            'Data' => [
                                'description' => '返回的结果数据内容。',
                                'type' => 'object',
                                'properties' => [
                                    'Results' => [
                                        'description' => '图片检测结果。',
                                        'type' => 'array',
                                        'items' => [
                                            'description' => '1',
                                            'type' => 'object',
                                            'properties' => [
                                                'ImageURL' => [
                                                    'description' => '图像URL地址。',
                                                    'type' => 'string',
                                                    'example' => 'http://xxx.xxx.xxx/xxx.jpg',
                                                ],
                                                'DataId' => [
                                                    'description' => '数据ID。',
                                                    'type' => 'string',
                                                    'example' => 'uuid-xxxx-xxx-1234',
                                                ],
                                                'SubResults' => [
                                                    'description' => '单张图片的检测结果。',
                                                    'type' => 'array',
                                                    'items' => [
                                                        'description' => '1',
                                                        'type' => 'object',
                                                        'properties' => [
                                                            'SfaceDataList' => [
                                                                'description' => '图片中包含暴恐敏感内容时,返回识别出来的暴恐敏感信息。'."\n"
                                                                    ."\n"
                                                                    .'> 仅适用于terrorism和sface场景。关于该参数在sface场景中的具体内容,请参见敏感人脸检测。',
                                                                'type' => 'array',
                                                                'items' => [
                                                                    'description' => '1',
                                                                    'type' => 'object',
                                                                    'properties' => [
                                                                        'Width' => [
                                                                            'description' => '人脸区域宽度。',
                                                                            'type' => 'number',
                                                                            'format' => 'float',
                                                                            'example' => '97',
                                                                        ],
                                                                        'Faces' => [
                                                                            'description' => '识别出的人脸信息。',
                                                                            'type' => 'array',
                                                                            'items' => [
                                                                                'description' => '1',
                                                                                'type' => 'object',
                                                                                'properties' => [
                                                                                    'Name' => [
                                                                                        'description' => '相似人物的名称。',
                                                                                        'type' => 'string',
                                                                                        'example' => 'abc',
                                                                                    ],
                                                                                    'Id' => [
                                                                                        'description' => '人脸ID。',
                                                                                        'type' => 'string',
                                                                                        'example' => 'AliFace_0001234',
                                                                                    ],
                                                                                    'Rate' => [
                                                                                        'description' => '相似概率。',
                                                                                        'type' => 'number',
                                                                                        'format' => 'float',
                                                                                        'example' => '91.54',
                                                                                    ],
                                                                                ],
                                                                            ],
                                                                        ],
                                                                        'Height' => [
                                                                            'description' => '人脸区域高度。',
                                                                            'type' => 'number',
                                                                            'format' => 'float',
                                                                            'example' => '131',
                                                                        ],
                                                                        'Y' => [
                                                                            'description' => '以图片左上角为坐标原点,人脸区域左上角到x轴距离。',
                                                                            'type' => 'number',
                                                                            'format' => 'float',
                                                                            'example' => '39',
                                                                        ],
                                                                        'X' => [
                                                                            'description' => '以图片左上角为坐标原点,人脸区域左上角到y轴距离。',
                                                                            'type' => 'number',
                                                                            'format' => 'float',
                                                                            'example' => '49',
                                                                        ],
                                                                    ],
                                                                ],
                                                            ],
                                                            'HintWordsInfoList' => [
                                                                'description' => '图片中含有广告时,返回图片中广告文字命中的风险关键词信息。格式为数组。'."\n"
                                                                    ."\n"
                                                                    .'> 仅适用于ad场景。示例值:`”hintWordsInfo”:[{“context”:”敏感词”}]`。',
                                                                'type' => 'array',
                                                                'items' => [
                                                                    'description' => '1',
                                                                    'type' => 'object',
                                                                    'properties' => [
                                                                        'Context' => [
                                                                            'description' => '图片中文字命中的风险关键词内容。',
                                                                            'type' => 'string',
                                                                            'example' => 'abc',
                                                                        ],
                                                                    ],
                                                                ],
                                                            ],
                                                            'Suggestion' => [
                                                                'description' => '建议您执行的操作。'."\n"
                                                                    ."\n"
                                                                    .'- pass:图片正常,无需进行其余操作;或者未识别出目标对象。'."\n"
                                                                    ."\n"
                                                                    .'- review:检测结果不确定,需要进行人工审核;或者未识别出目标对象。'."\n"
                                                                    ."\n"
                                                                    .'- block:图片违规,建议执行进一步操作(如直接删除或做限制处理)。',
                                                                'type' => 'string',
                                                                'example' => 'block',
                                                            ],
                                                            'ProgramCodeDataList' => [
                                                                'description' => '图片中含有小程序码时,返回小程序码的位置信息。'."\n"
                                                                    ."\n"
                                                                    .'> 仅适用于qrcode场景,且已通过钉钉群(23109592)联系我们开通了小程序码识别。',
                                                                'type' => 'array',
                                                                'items' => [
                                                                    'description' => '1',
                                                                    'type' => 'object',
                                                                    'properties' => [
                                                                        'Width' => [
                                                                            'description' => '小程序码区域宽度。',
                                                                            'type' => 'number',
                                                                            'format' => 'float',
                                                                            'example' => '402.0',
                                                                        ],
                                                                        'Height' => [
                                                                            'description' => '小程序码区域高度。',
                                                                            'type' => 'number',
                                                                            'format' => 'float',
                                                                            'example' => '413.0',
                                                                        ],
                                                                        'Y' => [
                                                                            'description' => '以图片左上角为坐标原点,小程序码区域左上角到x轴距离。',
                                                                            'type' => 'number',
                                                                            'format' => 'float',
                                                                            'example' => '0.0',
                                                                        ],
                                                                        'X' => [
                                                                            'description' => '以图片左上角为坐标原点,小程序码区域左上角到y轴距离。',
                                                                            'type' => 'number',
                                                                            'format' => 'float',
                                                                            'example' => '11.0',
                                                                        ],
                                                                    ],
                                                                ],
                                                            ],
                                                            'OCRDataList' => [
                                                                'description' => '1',
                                                                'type' => 'array',
                                                                'items' => [
                                                                    'description' => '识别到的图片中的完整文字信息。',
                                                                    'type' => 'string',
                                                                    'example' => 'abc',
                                                                ],
                                                            ],
                                                            'Frames' => [
                                                                'description' => '如果待检测图片因为过长被截断,该参数返回截断后的每一帧图像的临时访问地址供您参考。',
                                                                'type' => 'array',
                                                                'items' => [
                                                                    'description' => '1',
                                                                    'type' => 'object',
                                                                    'properties' => [
                                                                        'URL' => [
                                                                            'description' => '被截断的图片的临时访问URL,地址有效期是5分钟。',
                                                                            'type' => 'string',
                                                                            'example' => 'http://xxx.xxx.com/xxx-0.jpg',
                                                                        ],
                                                                        'Rate' => [
                                                                            'description' => '结果为该分类的概率,取值范围为0~100。值越高,表示越有可能属于该分类。',
                                                                            'type' => 'number',
                                                                            'format' => 'float',
                                                                            'example' => '89.85',
                                                                        ],
                                                                    ],
                                                                ],
                                                            ],
                                                            'LogoDataList' => [
                                                                'description' => '图片中含有Logo时,返回识别出来的Logo信息。'."\n"
                                                                    ."\n"
                                                                    .'> 仅适用于Logo场景。',
                                                                'type' => 'array',
                                                                'items' => [
                                                                    'description' => '1',
                                                                    'type' => 'object',
                                                                    'properties' => [
                                                                        'Type' => [
                                                                            'description' => '识别出的logo类型,取值为TV(台标)。',
                                                                            'type' => 'string',
                                                                            'example' => 'TV',
                                                                        ],
                                                                        'Width' => [
                                                                            'description' => 'Logo区域宽度。',
                                                                            'type' => 'number',
                                                                            'format' => 'float',
                                                                            'example' => '106',
                                                                        ],
                                                                        'Height' => [
                                                                            'description' => 'Logo区域高度。',
                                                                            'type' => 'number',
                                                                            'format' => 'float',
                                                                            'example' => '106',
                                                                        ],
                                                                        'Y' => [
                                                                            'description' => '以图片左上角为坐标原点,Logo区域左上角到x轴距离。',
                                                                            'type' => 'number',
                                                                            'format' => 'float',
                                                                            'example' => '68',
                                                                        ],
                                                                        'Name' => [
                                                                            'description' => '识别出的Logo名称。',
                                                                            'type' => 'string',
                                                                            'example' => 'abc',
                                                                        ],
                                                                        'X' => [
                                                                            'description' => '以图片左上角为坐标原点,Logo区域左上角到y轴距离。',
                                                                            'type' => 'number',
                                                                            'format' => 'float',
                                                                            'example' => '140',
                                                                        ],
                                                                    ],
                                                                ],
                                                            ],
                                                            'Label' => [
                                                                'description' => '检测结果的分类,与具体的scene对应。取值范围参见scene和label对应关系说明。',
                                                                'type' => 'string',
                                                                'example' => 'normal',
                                                            ],
                                                            'Scene' => [
                                                                'description' => '图片检测场景,和调用请求中的场景(scenes)对应。',
                                                                'type' => 'string',
                                                                'example' => 'ad',
                                                            ],
                                                            'Rate' => [
                                                                'description' => '结果为该分类的概率,取值范围为0~100。值越高,表示越有可能属于该分类。',
                                                                'type' => 'number',
                                                                'format' => 'float',
                                                                'example' => '99.91',
                                                            ],
                                                        ],
                                                    ],
                                                ],
                                                'TaskId' => [
                                                    'description' => '任务ID。',
                                                    'type' => 'string',
                                                    'example' => 'img4wlJcb7p4wH4lAP3111111-123456',
                                                ],
                                            ],
                                        ],
                                    ],
                                ],
                            ],
                        ],
                    ],
                ],
            ],
            'responseDemo' => '[{"type":"json","example":"{\\n  \\"RequestId\\": \\"69B41AE8-1234-1234-1234-12D395695D2D\\",\\n  \\"Data\\": {\\n    \\"Results\\": [\\n      {\\n        \\"ImageURL\\": \\"http://xxx.xxx.xxx/xxx.jpg\\",\\n        \\"DataId\\": \\"uuid-xxxx-xxx-1234\\",\\n        \\"SubResults\\": [\\n          {\\n            \\"SfaceDataList\\": [\\n              {\\n                \\"Width\\": 97,\\n                \\"Faces\\": [\\n                  {\\n                    \\"Name\\": \\"abc\\",\\n                    \\"Id\\": \\"AliFace_0001234\\",\\n                    \\"Rate\\": 91.54\\n                  }\\n                ],\\n                \\"Height\\": 131,\\n                \\"Y\\": 39,\\n                \\"X\\": 49\\n              }\\n            ],\\n            \\"HintWordsInfoList\\": [\\n              {\\n                \\"Context\\": \\"abc\\"\\n              }\\n            ],\\n            \\"Suggestion\\": \\"block\\",\\n            \\"ProgramCodeDataList\\": [\\n              {\\n                \\"Width\\": 402,\\n                \\"Height\\": 413,\\n                \\"Y\\": 0,\\n                \\"X\\": 11\\n              }\\n            ],\\n            \\"OCRDataList\\": [\\n              \\"abc\\"\\n            ],\\n            \\"Frames\\": [\\n              {\\n                \\"URL\\": \\"http://xxx.xxx.com/xxx-0.jpg\\",\\n                \\"Rate\\": 89.85\\n              }\\n            ],\\n            \\"LogoDataList\\": [\\n              {\\n                \\"Type\\": \\"TV\\",\\n                \\"Width\\": 106,\\n                \\"Height\\": 106,\\n                \\"Y\\": 68,\\n                \\"Name\\": \\"abc\\",\\n                \\"X\\": 140\\n              }\\n            ],\\n            \\"Label\\": \\"normal\\",\\n            \\"Scene\\": \\"ad\\",\\n            \\"Rate\\": 99.91\\n          }\\n        ],\\n        \\"TaskId\\": \\"img4wlJcb7p4wH4lAP3111111-123456\\"\\n      }\\n    ]\\n  }\\n}","errorExample":""},{"type":"xml","example":"<Data>\\n    <Results>\\n        <Code>200</Code>\\n        <Message>OK</Message>\\n        <DataId>uuid-xxxx-xxx-1234</DataId>\\n        <SubResults>\\n            <Rate>99.63</Rate>\\n            <Suggestion>block</Suggestion>\\n            <Label>sexy</Label>\\n            <Scene>porn</Scene>\\n        </SubResults>\\n        <SubResults>\\n            <Label>politics</Label>\\n            <Rate>91.54</Rate>\\n            <Scene>terrorism</Scene>\\n            <SfaceDataList>\\n                <Faces>\\n                    <Id>AliFace_0001234</Id>\\n                    <Name>命中人名</Name>\\n                    <Rate>91.54</Rate>\\n                </Faces>\\n                <Height>131</Height>\\n                <Width>97</Width>\\n                <X>49</X>\\n                <y>39</y>\\n            </SfaceDataList>\\n            <Suggestion>block</Suggestion>\\n        </SubResults>\\n        <SubResults>\\n            <ProgramCodeDataList>\\n                <Width>402</Width>\\n                <Height>413</Height>\\n                <X>11</X>\\n                <y>0</y>\\n            </ProgramCodeDataList>\\n            <Frames>\\n                <Rate>89.85</Rate>\\n                <URL>http://xxx.xxx.com/xxx-0.jpg</URL>\\n            </Frames>\\n            <Frames>\\n                <Rate>68.06</Rate>\\n                <URL>http://xxx.xxx.com/xxx-1.jpg</URL>\\n            </Frames>\\n            <Rate>99.91</Rate>\\n            <Suggestion>block</Suggestion>\\n            <Label>ad</Label>\\n            <Scene>ad</Scene>\\n        </SubResults>\\n        <SubResults>\\n            <Rate>99.91</Rate>\\n            <Suggestion>block</Suggestion>\\n            <Label>drug</Label>\\n            <Scene>live</Scene>\\n        </SubResults>\\n        <SubResults>\\n            <LogoDataList>\\n                <Name>xxx台</Name>\\n                <Type>TV</Type>\\n                <X>140</X>\\n                <y>68</y>\\n                <Width>106</Width>\\n                <Height>106</Height>\\n            </LogoDataList>\\n            <Rate>99.9</Rate>\\n            <Suggestion>block</Suggestion>\\n            <Label>TV</Label>\\n            <Scene>logo</Scene>\\n        </SubResults>\\n        <TaskId>img4wlJcb7p4wH4lAP3111111-123456</TaskId>\\n        <ImageURL>http://xxx.xxx.xxx/xxx.jpg</ImageURL>\\n    </Results>\\n</Data>\\n<RequestId>69B41AE8-1234-1234-1234-12D395695D2D</RequestId>","errorExample":""}]',
            'title' => '图片内容安全',
            'description' => '## 功能描述'."\n"
                .'图片内容安全结合行为、内容,采用多维度、多模型、多检测手段,识别图片中的敏感信息,规避图片中存在敏感人物照片、敏感事件等内容风险。'."\n"
                .'支持检测的场景包括:图片智能鉴黄、图片敏感内容识别、图片风险人物识别、图片垃圾广告识别、图片不良场景识别、图片Logo识别。'."\n"
                .'在提交检测任务时,您需要指定scenes参数,并且支持组合使用,即可对同一张图片的多种风险进行检测。'."\n"
                ."\n"
                .'> - 在同时检测多个scene的情况下,将按照每个场景的检测图片数量×每个场景的单价进行累加计费。而在检测返回结果中,则包含了您指定的scenes对应的label。您可以根据参数的返回值判断风险的具体类型。然后对图片进行处理。'."\n"
                .'- 您可以进入[在线咨询](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2)获取在线人工帮助。'."\n"
                .'- 阿里云视觉智能开放平台视觉AI能力API接入、接口使用或问题咨询等,请通过钉钉群(23109592)加入阿里云视觉智能开放平台咨询群联系我们。'."\n"
                ."\n\n"
                .'在图片审核中,scene与label的对应关系如下: '."\n"
                .'| scene     | 描述                                                                                               | label                                                                                                                                                                                                                                                                                      |'."\n"
                .'| --------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |'."\n"
                .'| porn      | 图片智能鉴黄:适用于图片涉及色情、低俗内容检测。                             | normal(正常图片)、sexy(性感图片)、porn(色情图片)                                                                                                                                                                                                                 |'."\n"
                .'| terrorism | 图片敏感内容识别:适用于图片涉及敏感事件、暴力、武器、恐怖、血腥、爆炸等内容识别。<br>图片风险人物识别:适用于图片涉及敏感人物、明星的识别。 | normal(正常图片)、bloody(血腥)、explosion(爆炸烟光)、outfit(特殊装束)、logo(特殊标识)、weapon(武器)、politics(敏感内容)、violence(打斗)、crowd(聚众)、parade(游行)、carcrash(车祸现场)、flag(旗帜)、location(地标)、drug(涉毒)、gamble(赌博)、others(其他) |'."\n"
                .'| ad        | 图片垃圾广告识别:适用于图片中含有广告信息的识别,特別是针对于类似牛皮癣的文字广告有较好的识别效果。 | normal(正常图片)、politics(文字含敏感内容)、porn(文字含涉黄内容)、abuse(文字含辱骂内容)、terrorism(文字含涉恐内容)、contraband(文字含违禁内容)、spam(文字含其他垃圾内容)、npx(牛皮癣广告)、qrcode(包含二维码)、programCode(包含小程序码)、ad(其他广告) |'."\n"
                .'| live      | 图片不良场景识别:适用于图片中涉及毒品、赌博、画中画等内容的识别。  | normal(正常图片)、meaningless(无意义图片)、PIP(画中画)、smoking(吸烟)、drivelive(车内直播)、drug(涉毒)、gamble(赌博)                                                                                                               |'."\n"
                .'| logo      | 图片Logo识别:适用于图片中含有台标、水印、商标等内容的检测。             | normal(正常图片)、TV(带有管控logo的图片)、trademark(商标)                                                                                                                                                                                                       |'."\n"
                ."\n"
                .'## 接入指引'."\n"
                .'1. 注册阿里云账号:打开[阿里云官网](https://www.aliyun.com),在阿里云官网右上角,单击**立即注册**,按照操作提示完成账号注册。'."\n"
                .'2. 开通能力:请确保您已开通[内容审核服务](https://vision.aliyun.com/imageaudit),若未开通服务请[立即开通](https://common-buy.aliyun.com/?commodityCode=viapi_imageaudit_public_cn#/open)。'."\n"
                .'3. 创建AccessKey:请确保您已[创建AccessKey](~~175144~~),如果您使用的是子账号AccessKey,您需要给子账号赋予AliyunVIAPIFullAccess权限,具体操作,请参见[RAM授权](~~145025~~)。'."\n"
                .'4. 在线调试(可选):您可以通过[OpenAPI Explorer](https://next.api.aliyun.com/api/imageaudit/2019-12-30/ScanImage?lang=JAVA)在线调试能力,查看完整的调用示例代码及SDK依赖信息,也可以下载完整的工程。'."\n"
                .'5. 开发接入步骤:'."\n"
                .'- 在[SDK总览](~~145033~~)中选择您要接入使用的SDK语言。'."\n"
                .'- 在对应语言的SDK文档中找到AI类目为内容审核(imageaudit)的SDK包进行安装。'."\n"
                .'- 参考文档中提供的示例代码进行适当修改后调用。'."\n"
                ."\n"
                .'6. 示例代码:该能力常用语言的示例代码,请参见[图片内容安全示例代码](~~478892~~)。'."\n"
                ."\n"
                .'7. 客户端直接调用:该能力常用的客户端调用方式包括以下几种。'."\n"
                .'- [Web前端直接调用](~~467779~~)'."\n"
                .'- [小程序场景下直接调用](~~467780~~)'."\n"
                .'- [Android端直接调用](~~467781~~)'."\n"
                .'- [iOS端直接调用](~~467782~~)'."\n"
                ."\n"
                .'## 输入限制'."\n"
                ."\n"
                .'- 图像格式:PNG、JPG、JPEG、BMP、GIF、WEBP。'."\n"
                .'- 图像大小:不超过9 MB。'."\n"
                .'- 图像分辨率:建议大于256×256像素,像素过低可能会影响识别效果。超长图的分辨率长或宽不能超过30000像素。GIF图总像素(长x宽)不超过4194304像素,超过该总像素值会报InvalidFile.Download(文件无法下载)错误。'."\n"
                .'- URL地址中不能包含中文字符。'."\n"
                ."\n"
                .'## 检测说明'."\n"
                ."\n"
                .'- 最长检测时间是6秒,如果在该时间范围内没有完成检测,系统会返回超时错误码。'."\n"
                ."\n"
                .'- 图片下载时间限制为3秒,如果下载时间超过3秒,则会返回下载超时。'."\n"
                ."\n"
                .'- 图片检测接口响应时间依赖图片的下载时间。请确保被检测图片所在的存储服务稳定可靠,建议您使用阿里云OSS存储或者CDN缓存。'."\n"
                ."\n"
                .'## 计费说明'."\n"
                .'关于图片内容安全的计费方式及报价,请参见[计费介绍](~~202478~~)。'."\n"
                ."\n"
                .'> 下方调试接口为付费接口,如需免费体验调试请前往体验中心,对应体验入口如下表所示。'."\n"
                ."\n\n"
                .'| 能力             | 体验中心                                                     |'."\n"
                .'| ---------------- | ------------------------------------------------------------ |'."\n"
                .'| 图片智能鉴黄     | [免费调试入口](https://vision.aliyun.com/experience/detail?&tagName=imageaudit&children=IdentifyPorn) |'."\n"
                .'| 图片敏感内容识别 | [免费调试入口](https://vision.aliyun.com/experience/detail?&tagName=imageaudit&children=IdentifyTerrorism) |'."\n"
                .'| 图片Logo识别     | [免费调试入口](https://vision.aliyun.com/experience/detail?&tagName=imageaudit&children=IdentifyLogo) |'."\n"
                .'| 图片垃圾广告识别 | [免费调试入口](https://vision.aliyun.com/experience/detail?&tagName=imageaudit&children=IdentifyAdvertisement) |'."\n"
                .'| 图片不良场景识别 | [免费调试入口](https://vision.aliyun.com/experience/detail?&tagName=imageaudit&children=IdentifyUnhealthyScene) |'."\n"
                .'| 图片风险人物识别 | [免费调试入口](https://vision.aliyun.com/experience/detail?&tagName=imageaudit&children=IdentifySensitiveFace) |'."\n"
                ."\n\n",
            'requestParamsDescription' => '> 最多指定10个检测对象,即最多同时对10张图片进行检测。',
            'responseParamsDescription' => '## SDK参考'."\n"
                .'阿里云视觉AI内容审核类目下的图片内容安全能力推荐使用SDK调用,支持多种编程语言,调用时请选择AI类目为内容审核(imageaudit)的SDK包,文件参数通过SDK调用可支持本地文件及任意URL,具体可参见[SDK总览](~~145033~~)。'."\n"
                ."\n"
                .'## 示例代码'."\n"
                .'该能力常用语言的示例代码,请参见[图片内容安全示例代码](~~478892~~)。',
            'extraInfo' => '## 错误码'."\n"
                .'关于图片内容安全的错误码,详情请参见[常见错误码](~~146773~~)。'."\n"
                ."\n"
                .'## 开源模型体验'."\n"
                .'更多开源免费模型体验及下载,详见魔搭社区:[内容审核模型-鉴黄](https://modelscope.cn/models/damo/cv_resnet50_image-classification_cc/summary)。'."\n"
                ."\n"
                .'## 安全声明'."\n"
                .'- 请确保上传的图片或文件来源符合相应的法律法规。'."\n"
                .'- 通过体验调试上传的临时文件有效期为1小时,在24小时后会被系统自动清理删除。',
        ],
        'ScanText' => [
            'methods' => [
                'post',
            ],
            'schemes' => [
                'http',
                'https',
            ],
            'security' => [
                [
                    'AK' => [],
                ],
            ],
            'operationType' => 'read',
            'deprecated' => false,
            'systemTags' => [],
            'parameters' => [
                [
                    'name' => 'Tasks',
                    'in' => 'formData',
                    'style' => 'repeatList',
                    'schema' => [
                        'description' => '1',
                        'type' => 'array',
                        'items' => [
                            'type' => 'object',
                            'properties' => [
                                'Content' => [
                                    'description' => '指定检测的对象,JSON数组中的每个元素是一个文字检测任务结构体。'."\n"
                                        ."\n"
                                        .'> - N个Task会折算为N次调用进行计费。'."\n"
                                        .'- 算法识别效果问题请通过钉钉群(23109592)加入阿里云视觉智能开放平台咨询群联系我们。',
                                    'type' => 'string',
                                    'required' => true,
                                    'example' => '维修管道,联系weixin',
                                ],
                            ],
                            'required' => false,
                        ],
                        'required' => true,
                        'maxItems' => 10,
                    ],
                ],
                [
                    'name' => 'Labels',
                    'in' => 'formData',
                    'style' => 'repeatList',
                    'schema' => [
                        'description' => '1',
                        'type' => 'array',
                        'items' => [
                            'type' => 'object',
                            'properties' => [
                                'Label' => [
                                    'description' => '指定文本检测的应用场景,可选值包括:'."\n"
                                        ."\n"
                                        .'- spam:文字垃圾内容识别'."\n"
                                        ."\n"
                                        .'- politics:文字敏感内容识别'."\n"
                                        ."\n"
                                        .'- abuse:文字辱骂内容识别'."\n"
                                        ."\n"
                                        .'- terrorism:文字暴恐内容识别'."\n"
                                        ."\n"
                                        .'- porn:文字鉴黄内容识别'."\n"
                                        ."\n"
                                        .'- flood:文字灌水内容识别'."\n"
                                        ."\n"
                                        .'- contraband:文字违禁内容识别'."\n"
                                        ."\n"
                                        .'- ad:文字广告内容识别',
                                    'type' => 'string',
                                    'required' => true,
                                    'example' => 'ad',
                                ],
                            ],
                            'required' => false,
                        ],
                        'required' => true,
                        'maxItems' => 10,
                    ],
                ],
            ],
            'responses' => [
                200 => [
                    'schema' => [
                        'type' => 'object',
                        'properties' => [
                            'RequestId' => [
                                'description' => '请求ID。',
                                'type' => 'string',
                                'example' => 'C7CD87E3-57A5-4E2F-8A44-809F3554692C',
                            ],
                            'Data' => [
                                'description' => '返回的结果数据内容。',
                                'type' => 'object',
                                'properties' => [
                                    'Elements' => [
                                        'description' => '检测结果的各个子元素。',
                                        'type' => 'array',
                                        'items' => [
                                            'type' => 'object',
                                            'properties' => [
                                                'TaskId' => [
                                                    'description' => '任务ID。',
                                                    'type' => 'string',
                                                    'example' => 'txt6Vh5Fv0DAFy5hgdVRt3pqf-1s82jj',
                                                ],
                                                'Results' => [
                                                    'description' => '检测结果。如果返回为空,表示系统识别命中了其他Label,扩大Label重新发起请求。',
                                                    'type' => 'array',
                                                    'items' => [
                                                        'type' => 'object',
                                                        'properties' => [
                                                            'Suggestion' => [
                                                                'description' => '建议您执行的操作,取值包括:'."\n"
                                                                    ."\n"
                                                                    .'- pass:文本正常。'."\n"
                                                                    ."\n"
                                                                    .'- review:需要人工审核。'."\n"
                                                                    ."\n"
                                                                    .'- block:文本违规,可以直接删除或者做限制处理。',
                                                                'type' => 'string',
                                                                'example' => 'block',
                                                            ],
                                                            'Label' => [
                                                                'description' => '检测结果的分类。',
                                                                'type' => 'string',
                                                                'example' => 'ad',
                                                            ],
                                                            'Rate' => [
                                                                'description' => '结果为该分类的概率,取值范围为`[0.00-100.00]`。值越高,表示越有可能属于该分类。',
                                                                'type' => 'number',
                                                                'format' => 'float',
                                                                'example' => '99.91',
                                                            ],
                                                            'Details' => [
                                                                'description' => '文本的检测结果。',
                                                                'type' => 'array',
                                                                'items' => [
                                                                    'type' => 'object',
                                                                    'properties' => [
                                                                        'Label' => [
                                                                            'description' => '命中风险文本的分类。',
                                                                            'type' => 'string',
                                                                            'example' => 'ad',
                                                                        ],
                                                                        'Contexts' => [
                                                                            'description' => '命中该风险的信息。',
                                                                            'type' => 'array',
                                                                            'items' => [
                                                                                'type' => 'object',
                                                                                'properties' => [
                                                                                    'Context' => [
                                                                                        'description' => '检测文本命中的风险内容。',
                                                                                        'type' => 'string',
                                                                                        'example' => '联系weixin',
                                                                                    ],
                                                                                ],
                                                                            ],
                                                                        ],
                                                                    ],
                                                                ],
                                                            ],
                                                        ],
                                                    ],
                                                ],
                                            ],
                                        ],
                                    ],
                                ],
                            ],
                        ],
                    ],
                ],
            ],
            'responseDemo' => '[{"type":"json","example":"{\\n  \\"RequestId\\": \\"C7CD87E3-57A5-4E2F-8A44-809F3554692C\\",\\n  \\"Data\\": {\\n    \\"Elements\\": [\\n      {\\n        \\"TaskId\\": \\"txt6Vh5Fv0DAFy5hgdVRt3pqf-1s82jj\\",\\n        \\"Results\\": [\\n          {\\n            \\"Suggestion\\": \\"block\\",\\n            \\"Label\\": \\"ad\\",\\n            \\"Rate\\": 99.91,\\n            \\"Details\\": [\\n              {\\n                \\"Label\\": \\"ad\\",\\n                \\"Contexts\\": [\\n                  {\\n                    \\"Context\\": \\"联系weixin\\"\\n                  }\\n                ]\\n              }\\n            ]\\n          }\\n        ]\\n      }\\n    ]\\n  }\\n}","errorExample":""},{"type":"xml","example":"<ScanTextResponse>\\n    <RequestId>4FCBCC61-6264-56DE-9CF3-44C014F63B75</RequestId>\\n    <Data>\\n        <Elements>\\n            <TaskId>txt4OFqbn2s4WQ6kVA$dQGn9X-1vvHuZ</TaskId>\\n            <Results>\\n                <Suggestion>block</Suggestion>\\n                <Details>\\n                    <Label>ad</Label>\\n                    <Contexts>\\n                        <Context>联系weixin </Context>\\n                    </Contexts>\\n                </Details>\\n                <Rate>99.91</Rate>\\n                <Label>ad</Label>\\n            </Results>\\n        </Elements>\\n    </Data>\\n</ScanTextResponse>","errorExample":""}]',
            'title' => '文本内容安全',
            'summary' => '本文为您介绍文本内容安全ScanText的语法及示例。',
            'description' => '## 功能描述'."\n"
                .'文本内容安全结合行为、内容,采用多维度、多模型、多检测手段,识别文本中的敏感信息,规避敏感人物姓名、敏感事件描述、敏感言论等内容风险。'."\n"
                .'支持检测的场景包括:文字垃圾内容识别、文字广告内容识别、文字敏感内容识别、文字暴恐内容识别、文字辱骂内容识别、文字鉴黄内容识别、文字灌水内容识别、文字违禁内容识别。'."\n"
                .'在提交检测任务时,您需要指定Labels参数,并且支持组合使用,即可对同一段文字进行多种风险检测。如果接口返回结果为空,表示未检测到Labels中的风险点。'."\n"
                ."\n"
                .'> - 在同时检测多个Task的情况下,将按照Task的个数进行累计计费。'."\n"
                .'- 您可以进入[在线咨询](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2)获取在线人工帮助。'."\n"
                .'- 阿里云视觉智能开放平台视觉AI能力API接入、接口使用或问题咨询等,请通过钉钉群(23109592)加入阿里云视觉智能开放平台咨询群联系我们。'."\n"
                ."\n"
                .'## 接入指引'."\n"
                .'1. 注册阿里云账号:打开[阿里云官网](https://www.aliyun.com),在阿里云官网右上角,单击**立即注册**,按照操作提示完成账号注册。'."\n"
                .'2. 开通能力:请确保您已开通[内容审核服务](https://vision.aliyun.com/imageaudit),若未开通服务请[立即开通](https://common-buy.aliyun.com/?commodityCode=viapi_imageaudit_public_cn#/open)。'."\n"
                .'3. 创建AccessKey:请确保您已[创建AccessKey](~~175144~~),如果您使用的是子账号AccessKey,您需要给子账号赋予AliyunVIAPIFullAccess权限,具体操作,请参见[RAM授权](~~145025~~)。'."\n"
                .'4. 在线调试(可选):您可以通过[OpenAPI Explorer](https://next.api.aliyun.com/api/imageaudit/2019-12-30/ScanText?lang=JAVA&sdkStyle=dara&params=%7B%22Tasks%22%3A%5B%7B%22Content%22%3A%22%E6%9C%AC%E6%A0%A1%E5%B0%8F%E9%A2%9D%E8%B4%B7%E6%AC%BE%EF%BC%8C%E5%AE%89%E5%85%A8%E3%80%81%E5%BF%AB%E6%8D%B7%E3%80%81%E6%96%B9%E4%BE%BF%E3%80%81%E6%97%A0%E6%8A%B5%E6%8A%BC%EF%BC%8C%E9%9A%8F%E6%9C%BA%E9%9A%8F%E8%B4%B7%EF%BC%8C%E5%BD%93%E5%A4%A9%E6%94%BE%E6%AC%BE%EF%BC%8C%E4%B8%8A%E9%97%A8%E6%9C%8D%E5%8A%A1%E3%80%82%E8%81%94%E7%B3%BBweixin%20123456%22%7D%5D%2C%22Labels%22%3A%5B%7B%22Label%22%3A%22spam%22%7D%2C%7B%22Label%22%3A%22politics%22%7D%2C%7B%22Label%22%3A%22abuse%22%7D%2C%7B%22Label%22%3A%22terrorism%22%7D%2C%7B%22Label%22%3A%22porn%22%7D%2C%7B%22Label%22%3A%22flood%22%7D%2C%7B%22Label%22%3A%22contraband%22%7D%2C%7B%22Label%22%3A%22ad%22%7D%5D%7D&tab=DEBUG)在线调试能力,查看完整的调用示例代码及SDK依赖信息,也可以下载完整的工程。'."\n"
                .'5. 开发接入步骤:'."\n"
                .'- 在[SDK总览](~~145033~~)中选择您要接入使用的SDK语言。'."\n"
                .'- 在对应语言的SDK文档中找到AI类目为内容审核(imageaudit)的SDK包进行安装。'."\n"
                .'- 参考文档中提供的示例代码进行适当修改后调用。'."\n"
                ."\n"
                .'6. 示例代码:该能力常用语言的示例代码,请参见[文本内容安全示例代码](~~477836~~)。'."\n"
                ."\n"
                .'7. 客户端直接调用:该能力常用的客户端调用方式包括以下几种。'."\n"
                .'- [Web前端直接调用](~~467779~~)'."\n"
                .'- [小程序场景下直接调用](~~467780~~)'."\n"
                .'- [Android端直接调用](~~467781~~)'."\n"
                .'- [iOS端直接调用](~~467782~~)'."\n"
                ."\n"
                .'## 限制说明'."\n"
                .'该接口每次可以检测的文本字符数最大为10000。'."\n"
                ."\n"
                .'## 计费说明'."\n"
                .'关于文本内容安全的计费方式及报价,请参见[计费介绍](~~202478~~)。'."\n"
                ."\n"
                .'> 下方调试接口为付费接口,如需免费体验调试请前往体验中心,对应体验入口如下表所示。'."\n"
                ."\n"
                .'| 能力             | 体验中心                                                     |'."\n"
                .'| ---------------- | ------------------------------------------------------------ |'."\n"
                .'| 文字垃圾内容识别 | [免费调试入口](https://vision.aliyun.com/experience/detail?&tagName=imageaudit&children=RecognizeSpamText) |'."\n"
                .'| 文字广告内容识别 | [免费调试入口](https://vision.aliyun.com/experience/detail?&tagName=imageaudit&children=RecognizeAdvertisingText) |'."\n"
                .'| 文字敏感内容识别 | [免费调试入口](https://vision.aliyun.com/experience/detail?&tagName=imageaudit&children=RecognizePoliticsText) |'."\n"
                .'| 文字暴恐内容识别 | [免费调试入口](https://vision.aliyun.com/experience/detail?&tagName=imageaudit&children=RecognizeTerrorismText) |'."\n"
                .'| 文字辱骂内容识别 | [免费调试入口](https://vision.aliyun.com/experience/detail?&tagName=imageaudit&children=RecognizeAbuseText) |'."\n"
                .'| 文字鉴黄内容识别 | [免费调试入口](https://vision.aliyun.com/experience/detail?&tagName=imageaudit&children=RecognizePornText) |'."\n"
                .'| 文字灌水内容识别 | [免费调试入口](https://vision.aliyun.com/experience/detail?&tagName=imageaudit&children=RecognizeFloodText) |'."\n"
                .'| 文字违禁内容识别 | [免费调试入口](https://vision.aliyun.com/experience/detail?&tagName=imageaudit&children=RecognizeContrabandText) |',
            'requestParamsDescription' => ' ',
            'responseParamsDescription' => '## SDK参考'."\n"
                .'阿里云视觉AI内容审核类目下的文本内容安全能力推荐使用SDK调用,支持多种编程语言,调用时请选择AI类目为内容审核(imageaudit)的SDK包,文件参数通过SDK调用可支持本地文件及任意URL,具体可参见[SDK总览](~~145033~~)。'."\n"
                ."\n"
                .'## 示例代码'."\n"
                .'该能力常用语言的示例代码,请参见[文本内容安全示例代码](~~477836~~)。',
            'extraInfo' => '## 错误码'."\n"
                .'关于文本内容安全的错误码,详情请参见[常见错误码](~~146773~~)。'."\n"
                ."\n"
                .'## 安全声明'."\n"
                .'- 请确保上传的图片或文件来源符合相应的法律法规。'."\n"
                .'- 通过体验调试上传的临时文件有效期为1小时,在24小时后会被系统自动清理删除。',
        ],
    ],
    'endpoints' => [
        [
            'regionId' => 'cn-shanghai',
            'endpoint' => 'imageaudit.cn-shanghai.aliyuncs.com',
        ],
    ],
];