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
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
|
<?php return [
'version' => '1.0',
'info' => ['style' => 'RPC', 'product' => 'imageenhan', 'version' => '2019-09-30'],
'directories' => [
[
'children' => ['ImageBlindCharacterWatermark', 'ImageBlindPicWatermark'],
'type' => 'directory',
'title' => 'Watermark',
],
[
'children' => ['ErasePerson', 'RemoveImageSubtitles', 'RemoveImageWatermark'],
'type' => 'directory',
'title' => 'Erasure',
],
[
'children' => ['AssessComposition', 'AssessExposure', 'AssessSharpness'],
'type' => 'directory',
'title' => 'Scoring',
],
[
'children' => ['ChangeImageSize', 'ColorizeImage', 'EnhanceImageColor', 'ImitatePhotoStyle', 'IntelligentComposition', 'MakeSuperResolutionImage'],
'type' => 'directory',
'title' => 'Other capabilities',
],
[
'children' => ['GenerateCartoonizedImage', 'GenerateSuperResolutionImage', 'GetAsyncJobResult'],
'title' => 'Others',
'type' => 'directory',
],
],
'components' => [
'schemas' => [],
],
'apis' => [
'AssessComposition' => [
'methods' => ['post'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'ImageURL',
'in' => 'formData',
'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) URL in the Shanghai region. If the file is stored locally or the OSS URL is in a region other than Shanghai, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/AssessComposition/AssessComposition1.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'description' => '1',
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'CCAD9435-AEDB-49E4-BCCC-99B65ECC6693', 'title' => ''],
'Data' => [
'description' => 'The returned result data.',
'type' => 'object',
'properties' => [
'Score' => ['description' => 'The composition aesthetic score of the image. Valid values: 0 to 5. A higher score indicates better composition. A score of 3.8 or above is considered a good composition score.', 'type' => 'number', 'format' => 'float', 'example' => '4.2551436', 'title' => ''],
],
'title' => '',
'example' => '',
],
],
'title' => '',
'example' => '',
],
],
],
'errorCodes' => [
400 => [
['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''],
],
403 => [
['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''],
],
408 => [
['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"CCAD9435-AEDB-49E4-BCCC-99B65ECC6693\\",\\n \\"Data\\": {\\n \\"Score\\": 4.2551436\\n }\\n}","type":"json"}]',
'title' => 'Image composition aesthetic scoring',
'summary' => 'Describes the syntax and provides examples for the AssessComposition operation for image composition aesthetic scoring.',
'description' => '## Feature description'."\n"
.'The image composition aesthetic scoring feature scores the composition aesthetics of an input image. A higher score indicates better composition.'."\n"
."\n"
.'> - You can join [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get help from online support.'."\n"
.'- You can try this feature for free on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=AssessComposition) to experience this feature or purchase it online.'."\n"
.'- For questions about API integration, usage, or consultation regarding the Alibaba Cloud Visual Intelligence Open Platform, contact us by joining the DingTalk group (23109592).'."\n"
."\n"
.'## Integration guide'."\n"
.'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete the registration.'."\n"
.'2. Activate the feature: Make sure you have activated the [Image Production service](https://vision.aliyun.com/imageenhan). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n"
.'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/AssessComposition?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FAssessComposition%2FAssessComposition1.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development integration steps:'."\n"
.'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
.'- Find and install the SDK package for the Image Production (imageenhan) category in the corresponding SDK documentation.'."\n"
.'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
."\n"
.'6. Sample code: For sample code in commonly used languages, see [Image composition aesthetic scoring sample code](~~601518~~).'."\n"
."\n"
.'7. Direct client calls: Common client call methods for this feature include the following.'."\n"
.'- [Direct call from web frontend](~~467779~~)'."\n"
.'- [Direct call from mini programs](~~467780~~)'."\n"
.'- [Direct call from Android](~~467781~~)'."\n"
.'- [Direct call from iOS](~~467782~~).'."\n"
."\n"
.'## Input limits'."\n"
.'- Image format: JPG, JPEG, BMP, PNG, or WEBP.'."\n"
.'- Image size: Less than 3 MB.'."\n"
.'- Image resolution: Must be greater than 32 × 32 pixels. There is no upper limit, but excessively large images may cause download timeouts.'."\n"
.'- The URL cannot contain Chinese characters.'."\n"
."\n"
.'## Billing description'."\n"
.'For the billable methods and pricing of image composition aesthetic scoring, see [Billing overview](~~202482~~).'."\n"
."\n"
.'> The API operation below is a paid operation. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=AssessComposition). The debug operation below is a paid operation.',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## SDK reference'."\n"
.'To use the image composition aesthetic scoring feature under the Visual AI Image Production category, we recommend that you call the operation by using an SDK. The SDK supports multiple programming languages. Select the SDK package for the Image Production (imageenhan) category. The SDK supports local files and arbitrary URLs for file parameters. For more information, see [SDK overview](~~145033~~).'."\n"
."\n"
.'## Sample code'."\n"
.'For sample code in commonly used languages, see [Image composition aesthetic scoring sample code](~~601518~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes of image composition aesthetic scoring, see [Common error codes](~~145023~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the experience debugging feature are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [
['createdAt' => '2022-05-06T10:48:02.000Z', 'description' => 'Error codes changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AssessComposition'],
],
],
'ramActions' => [
[
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:AssessComposition',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'AssessExposure' => [
'methods' => ['post'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'ImageURL',
'in' => 'formData',
'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) URL in the Shanghai region. If the file is stored locally or the OSS URL is not in the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/AssessExposure/AssessExposure1.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'description' => '1',
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '4EF3C65B-C3CC-425B-AFB3-2FE6B98C578B', 'title' => ''],
'Data' => [
'description' => 'The returned data.',
'type' => 'object',
'properties' => [
'Exposure' => ['description' => 'The image exposure score. Valid values: 0 to 1. A higher score indicates greater exposure.', 'type' => 'number', 'format' => 'float', 'example' => '0.1', 'title' => ''],
],
'title' => '',
'example' => '',
],
],
'title' => '',
'example' => '',
],
],
],
'errorCodes' => [
400 => [
['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''],
],
403 => [
['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''],
],
408 => [
['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"4EF3C65B-C3CC-425B-AFB3-2FE6B98C578B\\",\\n \\"Data\\": {\\n \\"Exposure\\": 0.1\\n }\\n}","type":"json"}]',
'title' => 'Image exposure scoring',
'summary' => 'This topic describes the syntax and examples of the AssessExposure operation for image exposure scoring.',
'description' => '## Description'."\n"
.'The image exposure scoring feature scores the exposure level of an input image. A higher score indicates greater exposure.'."\n"
."\n"
.'> - You can join [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get help from online support.'."\n"
.'- You can try the full product experience for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=AssessExposure) to try this feature or purchase it online.'."\n"
.'- For questions about API integration, usage, or consultation regarding Alibaba Cloud Vision Intelligence Open Platform, contact us by joining the DingTalk group (23109592).'."\n"
."\n"
.'## Getting started'."\n"
.'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete account registration.'."\n"
.'2. Activate the service: Make sure you have activated the [Intelligent Image Production service](https://vision.aliyun.com/imageenhan). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n"
.'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using an AccessKey pair of a RAM user, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/AssessExposure?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FAssessExposure%2FAssessExposure1.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development integration steps:'."\n"
.'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
.'- Find the SDK package for the AI category Intelligent Image Production (imageenhan) in the corresponding SDK documentation and install it.'."\n"
.'- Modify the sample code provided in the references as needed and invoke it.'."\n"
."\n"
.'6. Sample code: For sample code in commonly used languages, see [AssessExposure sample code](~~601404~~).'."\n"
."\n"
.'7. Direct client calls: Common client call methods for this feature include the following.'."\n"
.'- [Direct call from web frontend](~~467779~~)'."\n"
.'- [Direct call from mini programs](~~467780~~)'."\n"
.'- [Direct call from Android](~~467781~~)'."\n"
.'- [Direct call from iOS](~~467782~~).'."\n"
."\n"
.'## Input limits'."\n"
.'- Image format: JPG, JPEG, BMP, or PNG.'."\n"
.'- Image size: Less than 3 MB.'."\n"
.'- Image resolution: Must be greater than 32 × 32 pixels. There is no upper limit, but excessively large images may cause download timeouts.'."\n"
.'- The URL cannot contain Chinese characters.'."\n"
."\n"
.'## Billing description'."\n"
.'For the billable methods and pricing of image exposure scoring, see [Billing overview](~~202482~~).'."\n"
."\n"
.'> The debugging API below is a paid API. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=AssessExposure).',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## SDK reference'."\n"
.'For the image exposure scoring feature under the Alibaba Cloud Vision AI Intelligent Image Production category, we recommend that you use the SDK. The SDK supports multiple programming languages. When making calls, select the SDK package for the AI category Intelligent Image Production (imageenhan). File parameters passed through the SDK support both local files and arbitrary URLs. For more information, see [SDK overview](~~145033~~).'."\n"
."\n"
.'## Sample code'."\n"
.'For sample code in commonly used languages, see [AssessExposure sample code](~~601404~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes of image exposure scoring, see [Common error codes](~~145023~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [
['createdAt' => '2022-05-06T10:48:02.000Z', 'description' => 'Error codes changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AssessExposure'],
],
],
'ramActions' => [
[
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:AssessExposure',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'AssessSharpness' => [
'methods' => ['post'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'ImageURL',
'in' => 'formData',
'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) URL in the Shanghai region. If the file is stored locally or the OSS URL is not in the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/AssessSharpness/AssessSharpness1.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'description' => '1',
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'C0B594A1-383E-4F97-A740-0D51CF8E37D2', 'title' => ''],
'Data' => [
'description' => 'The returned data.',
'type' => 'object',
'properties' => [
'Sharpness' => ['description' => 'The sharpness score of the image. Valid values: 0 to 1. A higher score indicates a clearer image.', 'type' => 'number', 'format' => 'float', 'example' => '0.1', 'title' => ''],
],
'title' => '',
'example' => '',
],
],
'title' => '',
'example' => '',
],
],
],
'errorCodes' => [
400 => [
['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''],
],
403 => [
['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''],
],
408 => [
['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"C0B594A1-383E-4F97-A740-0D51CF8E37D2\\",\\n \\"Data\\": {\\n \\"Sharpness\\": 0.1\\n }\\n}","type":"json"}]',
'title' => 'Image sharpness scoring',
'summary' => 'This topic describes the syntax and examples of the image sharpness scoring feature (AssessSharpness).',
'description' => '## Feature description'."\n"
.'The image sharpness scoring feature scores the sharpness of an input image. A higher score indicates a clearer image.'."\n"
."\n"
.'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
.'- You can try the full product experience for free on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=AssessSharpness) to try this feature or purchase it online.'."\n"
.'- For questions about API integration or usage of Alibaba Cloud Visual Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
."\n"
.'## Integration guide'."\n"
.'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete registration.'."\n"
.'2. Activate the service: Make sure you have activated the [Image Production service](https://vision.aliyun.com/imageenhan). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n"
.'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/AssessSharpness?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FAssessSharpness%2FAssessSharpness1.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development integration steps:'."\n"
.'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
.'- Find the SDK package for the Image Production (imageenhan) AI category in the corresponding SDK documentation and install it.'."\n"
.'- Modify the sample code provided in the References as needed and invoke it.'."\n"
."\n"
.'6. Sample code: For sample code in commonly used languages, see [Image sharpness scoring sample code](~~601409~~).'."\n"
."\n"
.'7. Direct client calls: Common client call methods for this feature include the following.'."\n"
.'- [Direct call from web frontend](~~467779~~)'."\n"
.'- [Direct call from mini programs](~~467780~~)'."\n"
.'- [Direct call from Android](~~467781~~)'."\n"
.'- [Direct call from iOS](~~467782~~).'."\n"
."\n"
.'## Input limits'."\n"
.'- Image format: JPG, JPEG, BMP, or PNG.'."\n"
.'- Image size: Less than 3 MB.'."\n"
.'- Image resolution: Must be greater than 32 × 32 pixels. There is no upper limit, but excessively large images may cause download timeouts.'."\n"
.'- The URL cannot contain Chinese characters.'."\n"
."\n"
.'## Billing description'."\n"
.'For the billable methods and pricing of image sharpness scoring, see [Billing overview](~~202482~~).'."\n"
."\n"
.'> The debugging API below is a paid API. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=AssessSharpness).',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## SDK reference'."\n"
.'For the image sharpness scoring feature under the Alibaba Cloud Visual AI Image Production category, we recommend using the SDK. The SDK supports multiple programming languages. When making calls, select the SDK package for the Image Production (imageenhan) AI category. File parameters passed through the SDK support both local files and arbitrary URLs. For more information, see [SDK overview](~~145033~~).'."\n"
."\n"
.'## Sample code'."\n"
.'For sample code in commonly used languages, see [Image sharpness scoring sample code](~~601409~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes of image sharpness scoring, see [Common error codes](~~145023~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [
['createdAt' => '2021-06-22T08:16:40.000Z', 'description' => 'OpenAPI offline'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AssessSharpness'],
],
],
'ramActions' => [
[
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:AssessSharpness',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'ChangeImageSize' => [
'methods' => ['post'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => ['operationType' => 'update'],
'parameters' => [
[
'name' => 'Width',
'in' => 'formData',
'schema' => ['description' => 'The target width. Unit: pixels.', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'maximum' => '2000', 'minimum' => '10', 'example' => '800', 'title' => ''],
],
[
'name' => 'Height',
'in' => 'formData',
'schema' => ['description' => 'The target height. Unit: pixels.', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'maximum' => '2000', 'minimum' => '10', 'example' => '600', 'title' => ''],
],
[
'name' => 'Url',
'in' => 'formData',
'schema' => ['description' => 'The URL of the image. We recommend that you use an OSS URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/ChangeImageSize/ChangeImageSize5.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '2833446F-A431-40EB-A502-6EC9DFEEEEB0', 'title' => ''],
'Data' => [
'description' => 'The returned result data.',
'type' => 'object',
'properties' => [
'Url' => ['description' => 'The URL of the resized image.'."\n"
.'> This URL is a temporary address that is valid for 30 minutes. After it expires, the URL is no longer accessible. To save the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://ivpd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/upload/result_filter/2019-11-21/invi_filter_015743271470661000112_NVKmET.png?Expires=1574586347&OSSAccessKeyId=LTAI4FeJ8qKkYn6SrHhQ****&Signature=QqRAiqvyXsVlZ77M8yFc5QKJDE****', 'title' => ''],
'RetainLocation' => [
'description' => 'The coordinate information of the original image data in the generated image.',
'type' => 'object',
'properties' => [
'Width' => ['description' => 'The width of the original image after proportional scaling based on the specified width. Unit: pixels.', 'type' => 'integer', 'format' => 'int32', 'example' => '298', 'title' => ''],
'Height' => ['description' => 'The height of the original image after proportional scaling based on the specified height. Unit: pixels.', 'type' => 'integer', 'format' => 'int32', 'example' => '224', 'title' => ''],
'Y' => ['description' => 'The y-coordinate of the upper-left corner of the original image.', 'type' => 'integer', 'format' => 'int32', 'example' => '0', 'title' => ''],
'X' => ['description' => 'The x-coordinate of the upper-left corner of the original image.', 'type' => 'integer', 'format' => 'int32', 'example' => '0', 'title' => ''],
],
'title' => '',
'example' => '',
],
],
'title' => '',
'example' => '',
],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'errorCodes' => [
400 => [
['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''],
],
403 => [
['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''],
],
408 => [
['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"2833446F-A431-40EB-A502-6EC9DFEEEEB0\\",\\n \\"Data\\": {\\n \\"Url\\": \\"http://ivpd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/upload/result_filter/2019-11-21/invi_filter_015743271470661000112_NVKmET.png?Expires=1574586347&OSSAccessKeyId=LTAI4FeJ8qKkYn6SrHhQ****&Signature=QqRAiqvyXsVlZ77M8yFc5QKJDE****\\",\\n \\"RetainLocation\\": {\\n \\"Width\\": 298,\\n \\"Height\\": 224,\\n \\"Y\\": 0,\\n \\"X\\": 0\\n }\\n }\\n}","type":"json"}]',
'title' => 'Image cropping',
'summary' => 'This topic describes the syntax and examples of the image cropping feature ChangeImageSize.',
'description' => '## Feature description'."\n"
.'The image cropping feature can transform an input image to specified dimensions. It supports automatic detection of the subject area position and uses an optimal cropping method to crop the image.'."\n"
."\n"
.'> - You can join [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get help from our support team.'."\n"
.'- You can try the full product experience for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=ChangeImageSize) to try this feature or purchase it online.'."\n"
.'- For questions about API integration, usage, or consultation regarding the Alibaba Cloud Vision Intelligence Open Platform, contact us by joining the DingTalk group (23109592).'."\n"
."\n"
.'## Integration guide'."\n"
.'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete account registration.'."\n"
.'2. Activate the service: Make sure you have activated [Intelligent Image Production](https://vision.aliyun.com/imageenhan). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n"
.'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/ChangeImageSize?lang=JAVA&sdkStyle=dara¶ms=%7B%22Url%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FChangeImageSize%2FChangeImageSize1.jpg%22%2C%22Width%22%3A612%2C%22Height%22%3A344%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development integration steps:'."\n"
.'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
.'- Find the SDK package for the AI category Intelligent Image Production (imageenhan) in the corresponding SDK documentation and install it.'."\n"
.'- Modify the sample code provided in the References as needed and invoke it.'."\n"
."\n"
.'6. Sample code: For sample code in commonly used languages, see [Image cropping sample code](~~601512~~).'."\n"
."\n"
.'7. Direct client calls: Common client call methods for this feature include the following.'."\n"
.'- [Direct call from web frontend](~~467779~~)'."\n"
.'- [Direct call from mini programs](~~467780~~)'."\n"
.'- [Direct call from Android](~~467781~~)'."\n"
.'- [Direct call from iOS](~~467782~~).'."\n"
."\n"
.'## Input limits'."\n"
."\n"
.'- Image format: JPEG, JPG, PNG, BMP, or WEBP.'."\n"
.'- Image size: up to 3.5 MB.'."\n"
.'- Image resolution: The content image and style image must not exceed 2000 × 2000 pixels.'."\n"
.'- Images must be in RGB 3-channel format.'."\n"
.'- The URL must not contain Chinese characters.'."\n"
."\n"
.'## Billing description'."\n"
.'For the billable methods and pricing of image cropping, see [Billing overview](~~202482~~).'."\n"
."\n"
.'> The debugging interface below is a paid interface. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=ChangeImageSize).',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## SDK reference'."\n"
.'For the image cropping feature under the Alibaba Cloud Vision AI Intelligent Image Production category, we recommend that you use the SDK. The SDK supports multiple programming languages. When making calls, select the SDK package for the AI category Intelligent Image Production (imageenhan). File parameters passed through the SDK support both local files and arbitrary URLs. For more information, see [SDK overview](~~145033~~).'."\n"
."\n"
.'## Sample code'."\n"
.'For sample code in commonly used languages, see [Image cropping sample code](~~601512~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes of image cropping, see [Common error codes](~~145023~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [
['createdAt' => '2022-05-06T10:48:02.000Z', 'description' => 'Error codes changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ChangeImageSize'],
],
],
'ramActions' => [
[
'operationType' => 'update',
'ramAction' => [
'action' => 'viapi-imageenhan:ChangeImageSize',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'ColorizeImage' => [
'methods' => ['post'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'ImageURL',
'in' => 'formData',
'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) URL in the Shanghai region. If the file is stored locally or the OSS URL is not in the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/ColorizeImage/ColorizeImage1.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '124A4B09-68EF-4178-B98D-319089D4268B', 'title' => ''],
'Data' => [
'description' => 'The returned data.',
'type' => 'object',
'properties' => [
'ImageURL' => ['description' => 'The URL of the processed image.'."\n"
.'> This URL is a temporary URL that is valid for 30 minutes. After it expires, the URL is no longer accessible. To store the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://algo-app-aic-vc-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/face-enhancement/2020_11_26/20201126_182812286268_079260.jpg?Expires=1606388292&OSSAccessKeyId=LTAI****************&Signature=f71Bx37g%2BGhM%2B6FOXM0EbNL8W4****', 'title' => ''],
],
'title' => '',
'example' => '',
],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'errorCodes' => [
400 => [
['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''],
],
403 => [
['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''],
],
408 => [
['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"124A4B09-68EF-4178-B98D-319089D4268B\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://algo-app-aic-vc-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/face-enhancement/2020_11_26/20201126_182812286268_079260.jpg?Expires=1606388292&OSSAccessKeyId=LTAI****************&Signature=f71Bx37g%2BGhM%2B6FOXM0EbNL8W4****\\"\\n }\\n}","type":"json"}]',
'title' => 'Colorize images',
'summary' => 'This topic describes the syntax and provides examples of the ColorizeImage operation.',
'description' => '## Description'."\n"
.'The image colorization feature automatically colorizes black-and-white photos and images.'."\n"
.'The following figures show examples of this operation:'."\n"
."\n"
.'- Black-and-white image:'."\n"
.''."\n"
.'- Processed image:'."\n"
.''."\n"
."\n\n"
.'> - You can join [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get help from our support team.'."\n"
.'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=ColorizeImage) to experience this feature or purchase it online.'."\n"
.'- To consult about API integration, usage, or issues related to Alibaba Cloud Vision Intelligence Open Platform, contact us by joining the DingTalk group (23109592).'."\n"
."\n"
.'## Common scenarios'."\n"
."\n"
.'- Old black-and-white photo revert: Black-and-white photos taken in the last century can be automatically converted to color photos by using the image colorization feature.'."\n"
.'- Automatic painting colorization: Paintings and graphic designs can be automatically colorized by using the image colorization feature, which accelerates the production process.'."\n"
."\n"
.'## Features'."\n"
."\n"
.'- Realistic restoration: Realistically restores the original colors of the scene captured in the photo.'."\n"
.'- Suitable for various scenarios: Suitable for various shooting scenarios such as portraits, landscapes, and street views.'."\n"
."\n"
.'## Integration guide'."\n"
.'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete account registration.'."\n"
.'2. Activate the service: Make sure that you have activated [Intelligent Visual Production](https://vision.aliyun.com/imageenhan). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n"
.'3. Create an AccessKey pair: Make sure that you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/ColorizeImage?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FColorizeImage%2FColorizeImage1.jpg%22%7D&tab=DEMO) to debug this operation online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development integration steps:'."\n"
.'- Select the SDK language you want to use from [SDK overview](~~145033~~).'."\n"
.'- Find the SDK package for the Intelligent Visual Production (imageenhan) category in the corresponding SDK documentation and install it.'."\n"
.'- Modify the sample code provided in the references as needed and invoke the operation.'."\n"
."\n"
.'6. Sample code: For sample code in commonly used languages, see [ColorizeImage sample code](~~480089~~).'."\n"
."\n"
.'7. Direct client calls: Common client-side calling methods for this feature include the following.'."\n"
.'- [Direct call from web frontend](~~467779~~)'."\n"
.'- [Direct call from mini programs](~~467780~~)'."\n"
.'- [Direct call from Android](~~467781~~)'."\n"
.'- [Direct call from iOS](~~467782~~).'."\n"
."\n"
.'## Input limits'."\n"
."\n"
.'- Image format: JPG, JPEG, BMP, or PNG.'."\n"
.'- Image size: up to 10 MB.'."\n"
.'- Image resolution: less than 3000 × 3000 pixels.'."\n"
.'- The URL cannot contain Chinese characters.'."\n"
."\n"
.'## Billing description'."\n"
.'For information about the billable methods and pricing of image colorization, see [Billing overview](~~202482~~).'."\n"
."\n"
.'> The debugging operation below is a paid operation. To try it for free, go to [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=ColorizeImage).',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## SDK reference'."\n"
.'To use the image colorization feature of Alibaba Cloud Vision AI Intelligent Visual Production, we recommend that you call the operation by using an SDK. SDKs for multiple programming languages are supported. Select the SDK package for the Intelligent Visual Production (imageenhan) category. File parameters support local files and arbitrary URLs when called through the SDK. For more information, see [SDK overview](~~145033~~).'."\n"
."\n"
.'## Sample code'."\n"
.'For sample code in commonly used languages, see [ColorizeImage sample code](~~480089~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes of image colorization, see [Common error codes](~~145023~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ColorizeImage'],
],
],
'ramActions' => [
[
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:ColorizeImage',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'EnhanceImageColor' => [
'methods' => ['post'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'ImageURL',
'in' => 'formData',
'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).'."\n"
.'Input limits:'."\n"
."\n"
.'- Image format: JPG, PNG, or BMP.'."\n"
.'- Image size: Less than 3 MB.'."\n"
.'- Image resolution: Greater than 64 × 64 pixels and less than 3840 × 2160 pixels. The shortest side must be less than 2160 pixels and the longest side must be less than 3840 pixels.'."\n"
.'- The URL cannot contain Chinese characters.', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/EnhanceImageColor/EnhanceImageColor1.jpg', 'title' => ''],
],
[
'name' => 'OutputFormat',
'in' => 'formData',
'schema' => ['description' => 'The format of the output image. Valid values: `png`, `jpg`, and `bmp`.', 'type' => 'string', 'required' => true, 'example' => 'png', 'title' => ''],
],
[
'name' => 'Mode',
'in' => 'formData',
'schema' => ['description' => 'The rendering intent mode. Valid values: LogC, Rec709, and ln17_256.'."\n"
."\n"
.'- LogC: suitable for gray footage (low-contrast raw images) input. Significantly adjusts the image color appearance to restore SDR-domain color quality.'."\n"
.'- Rec709: suitable for images captured under normal conditions. Moderately enhances image brightness and saturation with conservative adjustments.'."\n"
.'- ln17_256: suitable for images captured under normal conditions. Significantly adjusts image brightness, saturation, and contrast to enhance color quality.', 'type' => 'string', 'required' => true, 'example' => 'LogC', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '2F306ABD-5BC3-4FA0-89CF-0DED5B3654EB', 'title' => ''],
'Data' => [
'description' => 'The returned data.',
'type' => 'object',
'properties' => [
'ImageURL' => ['description' => 'The URL of the processed image.'."\n"
.'> This URL is a temporary URL that is valid for 30 minutes. After it expires, the URL is no longer accessible. To save the file for a longer period or permanently, access the URL within 30 minutes, download the file, and store it in your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://algo-app-aic-vd-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/image-recolor/2020-06-23-10/24%3A14-3cf26e84-a5d2-49b0-8332-0e139e20c49e.png?Expires=1592909654&OSSAccessKeyId=LTAI****************&Signature=fHrYvitvm0qZJ9nrWYa%2Fjd4pQS****', 'title' => ''],
],
'title' => '',
'example' => '',
],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'errorCodes' => [
400 => [
['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''],
],
403 => [
['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''],
],
408 => [
['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"2F306ABD-5BC3-4FA0-89CF-0DED5B3654EB\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://algo-app-aic-vd-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/image-recolor/2020-06-23-10/24%3A14-3cf26e84-a5d2-49b0-8332-0e139e20c49e.png?Expires=1592909654&OSSAccessKeyId=LTAI****************&Signature=fHrYvitvm0qZJ9nrWYa%2Fjd4pQS****\\"\\n }\\n}","type":"json"}]',
'title' => 'Image color enhancement',
'summary' => 'This topic describes the syntax and provides examples of the EnhanceImageColor operation.',
'description' => '## Feature description'."\n"
.'The image color enhancement feature intelligently analyzes the content of an input image, automatically adjusts parameters based on the image content, optimizes multiple dimensions such as saturation, brightness, and contrast, and outputs the enhanced image.'."\n"
.'The following figures show examples of this operation:'."\n"
.'- Input image:'."\n"
.''."\n"
.'- Output enhanced image:'."\n"
.''."\n"
."\n"
.'> - You can join [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get help from our support team.'."\n"
.'- You can try the full product experience for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=EnhanceImageColor) to try this feature or purchase it online.'."\n"
.'- To learn more about API access, usage, or consultation for Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
."\n"
.'## Common scenarios'."\n"
.'- Design material enhancement: Intelligently analyzes and enhances design images for creative design purposes.'."\n"
.'- Photo enhancement: Intelligently enhances photos for sharing and distribution.'."\n"
."\n"
.'## Advantages'."\n"
.'- High quality: Enhances image color across multiple dimensions such as saturation, exposure, and contrast for better visual results.'."\n"
.'- Adaptive enhancement: Automatically selects appropriate processing parameters through scene recognition and content analysis.'."\n"
."\n"
.'## Getting started'."\n"
.'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Sign Up** in the upper-right corner, and follow the instructions to create an account.'."\n"
.'2. Activate the service: Make sure you have activated the [Intelligent Visual Production](https://vision.aliyun.com/imageenhan) service. If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n"
.'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using an AccessKey pair of a RAM user, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/EnhanceImageColor?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FEnhanceImageColor%2FEnhanceImageColor1.jpg%22%2C%22Mode%22%3A%22LogC%22%2C%22OutputFormat%22%3A%22png%22%7D&tab=DEMO) to debug the feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development and integration steps:'."\n"
.'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
.'- Find the SDK package for the Intelligent Visual Production (imageenhan) category in the corresponding SDK documentation and install it.'."\n"
.'- Modify the sample code provided in the references as needed and invoke the operation.'."\n"
."\n"
.'6. Sample code: For sample code in commonly used languages, see [EnhanceImageColor sample code](~~601517~~).'."\n"
."\n"
.'7. Direct client calls: Common client call methods for this feature include the following:'."\n"
.'- [Direct call from web frontend](~~467779~~)'."\n"
.'- [Direct call from mini programs](~~467780~~)'."\n"
.'- [Direct call from Android](~~467781~~)'."\n"
.'- [Direct call from iOS](~~467782~~).'."\n"
."\n"
.'## Input limits'."\n"
."\n"
.'- Image format: JPG, PNG, or BMP.'."\n"
.'- Image size: Less than 3 MB.'."\n"
.'- Image resolution: Greater than 64 × 64 pixels and less than 3840 × 2160 pixels. The shortest side must be less than 2160 pixels and the longest side must be less than 3840 pixels.'."\n"
.'- The URL cannot contain Chinese characters.'."\n"
."\n"
.'## Billable methods'."\n"
.'For information about the billable methods and pricing of image color enhancement, see [Billing overview](~~202482~~).'."\n"
."\n"
.'> The debugging operation below is a paid operation. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=EnhanceImageColor).',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## SDK reference'."\n"
.'We recommend that you use an SDK to call the image color enhancement feature under the Alibaba Cloud Vision AI Intelligent Visual Production category. The SDK supports multiple programming languages. When calling the operation, select the SDK package for the Intelligent Visual Production (imageenhan) category. File parameters support local files and arbitrary URLs through SDK calls. For more information, see [SDK overview](~~145033~~).'."\n"
."\n"
.'## Sample code'."\n"
.'For sample code in commonly used languages, see [EnhanceImageColor sample code](~~601517~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes of image color enhancement, see [Common error codes](~~145023~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the debugging feature are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [
['createdAt' => '2022-03-30T03:15:40.000Z', 'description' => 'Error codes changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'EnhanceImageColor'],
],
],
'ramActions' => [
[
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:EnhanceImageColor',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'ErasePerson' => [
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'ImageURL',
'in' => 'formData',
'schema' => ['description' => 'The URL of the image. We recommend that you use an OSS URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing (generate a URL by using the explicit viapiutils scheme)](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/ErasePerson/ErasePerson1.jpg', 'title' => ''],
],
[
'name' => 'UserMask',
'in' => 'formData',
'schema' => ['description' => 'The URL of the mask image. We recommend that you use an OSS URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing (generate a URL by using the explicit viapiutils scheme)](~~155645~~).'."\n"
."\n"
.'>The mask image is an RGB 3-channel image, not an alpha channel transparent image.', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/ErasePerson/ErasePerson6.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '2FEDA495-9A5D-48B5-8922-98A4FE01D381', 'title' => ''],
'Data' => [
'description' => 'The returned result data.',
'type' => 'object',
'properties' => [
'ImageUrl' => ['description' => 'The URL of the output image.'."\n"
.'> This URL is a temporary URL that is valid for 30 minutes. After the URL expires, you can no longer access it. To store the file for an extended period of time or permanently, access the URL within 30 minutes, download the file, and then save it to your OSS bucket or another storage location.', 'type' => 'string', 'example' => 'http://algo-app-isr-lab-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/remove-person/2020-10-29_10%3A59%3A21.421276_img19.png?Expires=1603970961&OSSAccessKeyId=LTAI****************&Signature=9lBakx0r6FOssTEYTcKs5pk8ta****', 'title' => ''],
],
'title' => '',
'example' => '',
],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'errorCodes' => [
400 => [
['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''],
],
403 => [
['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''],
['errorCode' => 'NeedOpen', 'errorMessage' => 'Please activate the service first.', 'description' => ''],
],
408 => [
['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
500 => [
['errorCode' => 'InternalServerError', 'errorMessage' => 'A server error occurred while processing your request.', 'description' => ''],
],
503 => [
['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"2FEDA495-9A5D-48B5-8922-98A4FE01D381\\",\\n \\"Data\\": {\\n \\"ImageUrl\\": \\"http://algo-app-isr-lab-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/remove-person/2020-10-29_10%3A59%3A21.421276_img19.png?Expires=1603970961&OSSAccessKeyId=LTAI****************&Signature=9lBakx0r6FOssTEYTcKs5pk8ta****\\"\\n }\\n}","type":"json"}]',
'title' => 'Erase human figures from images',
'summary' => 'This topic describes the syntax and examples of the ErasePerson feature for erasing human figures from images.',
'description' => '## Feature description'."\n"
.'The image human figure erasure feature can erase human figures from specified regions in an image and automatically fill in the background.'."\n"
."\n"
.'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
.'- To inquire about Alibaba Cloud Vision Intelligence Open Platform visual AI API integration, usage, or other questions, join the DingTalk group (23109592) to contact us.'."\n"
."\n"
.'## Common scenarios'."\n"
."\n"
.'- Travel photo restoration: The image human figure erasure feature helps you remove passersby from the background to restore your travel photos.'."\n"
.'- Post-production fix for unwanted appearances: During the film and television production procedure, if a person who should not appear is captured in a shot, the image human figure erasure feature can help you batch-process and fix these shots.'."\n"
."\n"
.'## Advantages'."\n"
."\n"
.'- Preserve original photo content as much as possible: By specifying a region mask, the automatic background fill range is narrowed to erase background figures and reduce visual inconsistency in the processed photo. For the human figure region mask, use the human body segmentation algorithm provided by Alibaba Cloud Vision Intelligence Open Platform for better results.'."\n"
.'- Automatically generate and fill backgrounds occluded by human figures: Based on deep learning algorithms, the image human figure erasure feature can infer and restore background content occluded by human figures, producing realistic results without visual inconsistency.'."\n"
."\n"
.'## Getting started'."\n"
.'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **China Site Registration** in the upper-right corner, and follow the on-screen instructions to complete account registration.'."\n"
.'2. Activate the service: Make sure you have activated [Intelligent Image Production](https://vision.aliyun.com/imageenhan). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n"
.'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Debug online (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/ErasePerson?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FErasePerson%2FErasePerson1.jpg%22%2C%22UserMask%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FErasePerson%2FErasePerson6.jpg%22%7D&tab=DEMO) to debug the feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development integration steps:'."\n"
.'- Select the SDK language you want to use from the [Overview](~~145033~~).'."\n"
.'- Find the SDK package for the AI category Intelligent Image Production (imageenhan) in the corresponding SDK documentation and install it.'."\n"
.'- Modify the sample code provided in the References as needed and invoke the API.'."\n"
."\n"
.'6. Direct invocation from clients: Common client invocation methods for this feature include the following.'."\n"
.'- [Direct invocation from a frontend web application](~~467779~~)'."\n"
.'- [Direct invocation from a mini program](~~467780~~)'."\n"
.'- [Direct invocation from Android](~~467781~~)'."\n"
.'- [Direct invocation from iOS](~~467782~~)'."\n"
."\n"
.'## Input limits'."\n"
."\n"
.'- Image format: JPG, JPEG, BMP, PNG, WEBP, and TIF.'."\n"
.'- Image size: up to 3 MB.'."\n"
.'- Image resolution: greater than 5 × 5 pixels and less than 2048 × 2048 pixels.'."\n"
.'- The URL cannot contain Chinese characters.'."\n"
.'- The specified region in the image should closely fit the human figure and can be represented by a rectangle, polygon, or irregular area. The area to be erased cannot exceed 25% of the total image area.'."\n"
."\n"
.'## Billing description'."\n"
.'For information about the billable methods and pricing of the image human figure erasure feature, see [Billing overview](~~202482~~).'."\n"
."\n"
.'> The following debug API operation is a paid API operation.',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## SDK reference'."\n"
.'For the image human figure erasure feature under the Alibaba Cloud Vision AI Intelligent Image Production category, we recommend that you use the SDK. The SDK supports multiple programming languages. When you invoke the SDK, select the SDK package for the AI category Intelligent Image Production (imageenhan). File parameters can be passed as local files or URLs of any origin through the SDK. For more information, see [Overview](~~145033~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes of the image human figure erasure feature, see [Common error codes](~~145023~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the debug feature are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [
['createdAt' => '2022-12-09T07:25:57.000Z', 'description' => 'Request parameters changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ErasePerson'],
],
],
'ramActions' => [
[
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:ErasePerson',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'GenerateCartoonizedImage' => [
'summary' => 'This topic describes the syntax and provides examples of the GenerateCartoonizedImage operation in the image production (imageenhan) category.',
'methods' => ['post'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'ImageUrl',
'in' => 'formData',
'schema' => ['description' => 'The URL of the input image. We recommend that you use an Object Storage Service (OSS) URL in the Shanghai region. If the file is stored locally or the OSS URL is in a region other than Shanghai, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/test-team/xxxxx.jpg', 'title' => ''],
],
[
'name' => 'ImageType',
'in' => 'formData',
'schema' => ['description' => 'This field is deprecated.', 'type' => 'string', 'required' => false, 'example' => 'null', 'title' => ''],
],
[
'name' => 'Index',
'in' => 'formData',
'schema' => ['description' => 'The cartoon effect. Valid values:'."\n"
.'- 0: retro comic (default)'."\n"
.'- 1: 3D fairy tale'."\n"
.'- 2: anime'."\n"
.'- 3: fresh and clean'."\n"
.'- 4: futuristic tech'."\n"
.'- 5: traditional Chinese painting'."\n"
.'- 6: battle general'."\n"
.'- 7: colorful cartoon'."\n"
.'- 8: elegant Chinese.', 'type' => 'string', 'required' => true, 'example' => '0', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'title' => '',
'description' => 'Schema of Response',
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '48f38719-f0c2-4784-a9cc-30df95e393a9', 'title' => ''],
'Data' => [
'description' => 'The returned result data. After the asynchronous task is executed successfully, call the [GetAsyncJobResult](~~607824~~) operation and perform JSON deserialization on the Result field to obtain this data.',
'type' => 'object',
'properties' => [
'ResultUrl' => ['description' => 'The URL of the output image.'."\n"
."\n"
.'> This URL is a temporary address that is valid for 30 minutes. After it expires, the URL is no longer accessible. To save the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://vibktprfx-prod-prod-damo-eas-cn-shanghai.oss-cn-shanghai.aliyuncs.com/generative-cartoon/2023-02-02/5a3e5760-ff27-4321-8976-d05656fb716a/20230202_154009511910_pclb0gomva.jpg?Expires=1675325422&OSSAccessKeyId=LTAI****************&Signature=UmAa7HxeumVkDfrdoL02dtztwS****', 'title' => ''],
],
'title' => '',
'example' => '',
],
'Message' => ['description' => 'The message returned after the asynchronous task is submitted.', 'type' => 'string', 'example' => '该调用为异步调用,任务已提交成功,请以requestId的值作为jobId参数调用同类目下GetAsyncJobResult接口查询任务执行状态和结果。', 'title' => ''],
],
'example' => '',
],
],
],
'errorCodes' => [
400 => [
['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''],
],
403 => [
['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''],
],
408 => [
['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
],
],
'staticInfo' => ['returnType' => 'synchronous'],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"48f38719-f0c2-4784-a9cc-30df95e393a9\\",\\n \\"Data\\": {\\n \\"ResultUrl\\": \\"http://vibktprfx-prod-prod-damo-eas-cn-shanghai.oss-cn-shanghai.aliyuncs.com/generative-cartoon/2023-02-02/5a3e5760-ff27-4321-8976-d05656fb716a/20230202_154009511910_pclb0gomva.jpg?Expires=1675325422&OSSAccessKeyId=LTAI****************&Signature=UmAa7HxeumVkDfrdoL02dtztwS****\\"\\n },\\n \\"Message\\": \\"该调用为异步调用,任务已提交成功,请以requestId的值作为jobId参数调用同类目下GetAsyncJobResult接口查询任务执行状态和结果。\\"\\n}","type":"json"}]',
'title' => 'Generative image cartoonization',
'description' => '## Feature description'."\n"
.'Generates images in various effect styles based on a generative foundation model. Provide an input image and select the desired cartoonization style to generate a cartoonized image with the same resolution as the input image in the specified style.'."\n"
.'The following figure shows the feature (the left image is the original, and the right image is the processed result):'."\n"
.''."\n"
.'The following describes each style in detail (the left image is the original, and the right image is the processed result):'."\n"
."\n"
.'- Retro comic style'."\n"
.'This style simulates the retro comic style of the 1980s and 1990s. It can stylize various real-world scenes into comic style, including people, animals, landscapes, and furniture. The overall style features clear lines and vivid colors.'."\n"
.''."\n"
."\n"
.'- 3D fairy tale style'."\n"
.'This style simulates a 3D fairy tale look. It can stylize various real-world scenes into 3D animation style, including people, animals, landscapes, and furniture. The overall style is soft and elegant. This style preserves most features of the original image while generating new elements for added creativity.'."\n"
.''."\n"
."\n"
.'- Anime style'."\n"
.'This style simulates the anime art style. It can stylize various real-world scenes into anime style, including people, animals, landscapes, and furniture. This style features vivid colors and can transform landscape images into anime-like scenes. It preserves most features of the original image while generating new elements for added creativity.'."\n"
.''."\n"
."\n"
.'- Fresh and clean style'."\n"
.'This style features soft and elegant colors overall. It is primarily designed for portraits but can also be used for other types of images. The generated images resemble the style of GD illustrators, making it suitable for users who prefer illustration styles.'."\n"
.''."\n"
."\n"
.'- Futuristic tech style'."\n"
.'This style simulates a futuristic mecha sci-fi look. It produces dramatic transformations with high creativity, making it ideal for users interested in futuristic technology aesthetics.'."\n"
.''."\n"
."\n"
.'- Traditional Chinese painting style'."\n"
.'This style simulates the traditional Chinese meticulous painting style. It transforms characters into classical Chinese attire, creating a realistic classical Chinese painting. It is suitable for users who enjoy traditional Chinese aesthetics.'."\n"
.''."\n"
."\n"
.'- Battle general style'."\n"
.'This style simulates an ancient battlefield look, combining characters with armor elements for a classical atmosphere.'."\n"
.''."\n"
."\n"
.'- Colorful cartoon style'."\n"
.'This style simulates the look of hand-drawn watercolor and crayon art, creating a handcrafted feel.'."\n"
.''."\n"
."\n"
.'- Elegant Chinese style'."\n"
.'This style simulates an elegant classical Chinese aesthetic. It transforms characters into classical Chinese attire with a 2.5D style, making it ideal for users who enjoy traditional Chinese aesthetics.'."\n"
.''."\n"
."\n"
.'> - You can access [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for human assistance.'."\n"
.'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?tagName=imageenhan&children=GenerateCartoonizedImage) to experience the feature and make online purchases.'."\n"
.'- For questions about Alibaba Cloud Vision Intelligence Open Platform visual AI API integration, usage, or consultation, join the DingTalk group (23109592) to contact us.'."\n"
."\n"
.'## Common scenarios'."\n"
.'Social media avatar generation: Users can upload selfies, pet photos, or landscape photos, specify a preferred cartoon style, and generate corresponding images with high creativity.'."\n"
."\n"
.'## Advantages'."\n"
.'- Broad cartoonization coverage: Based on a generative foundation model, the feature can process portraits, pets, scenes, and other elements to generate detailed and vivid cartoonized effects.'."\n"
.'- Diverse styles: Supports multiple generation styles to meet different user preferences and needs.'."\n"
.'- Intelligent processing: Automatically recognizes the gender of characters, scene categories, and other attributes in the input image, ensuring that the output image is both entertaining and aesthetically pleasing while staying close to the original.'."\n"
.'- High quality: Generates high-quality images with minimal artifacts.'."\n"
."\n"
.'## Integration guide'."\n"
.'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com). In the upper-right corner, click **Register Now** and follow the instructions to create an account.'."\n"
.'2. Activate the service: Make sure you have activated the [Image Production service](https://vision.aliyun.com/imageenhan). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n"
.'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/GenerateImageWithText?lang=JAVA) to debug the feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development integration:'."\n"
.'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
.'- Find the SDK package for the Image Production (imageenhan) AI category in the corresponding SDK documentation and install it.'."\n"
.'- Modify the sample code provided in the references as needed and invoke it.'."\n"
."\n"
.'6. Sample code: For sample code in common languages for this feature, see [GenerateCartoonizedImage sample code](~~602271~~). For sample code to query asynchronous task results in common languages, see [Query asynchronous task result sample code](~~607974~~).'."\n"
."\n"
.'7. Direct client invocations: Common client invocation methods for this feature include the following:'."\n"
.'- [Direct invocation from web frontend](~~467779~~)'."\n"
.'- [Direct invocation from mini programs](~~467780~~)'."\n"
.'- [Direct invocation from Android](~~467781~~)'."\n"
.'- [Direct invocation from iOS](~~467782~~).'."\n"
."\n"
.'## Input limits'."\n"
."\n"
.'- The image size cannot exceed 10 MB.'."\n"
.'- Supported image formats: JPEG, PNG, JPG, BMP, and WEBP.'."\n"
.'- The input image dimensions must be at least 256 × 256 pixels and at most 5760 × 3240 pixels.'."\n"
.'- The short side of the output image is 1536 pixels. When the ratio of the long side to the short side of the input image is less than or equal to 1.5:1, the original aspect ratio is preserved. When the ratio exceeds 1.5:1, adaptive cropping is applied to produce an output aspect ratio of 1.5:1.'."\n"
."\n"
.'## Call procedure'."\n"
.'This feature is asynchronous and requires two steps to call.'."\n"
.'Step 1: Call the GenerateCartoonizedImage operation to submit a task. After the request succeeds, a task ID is returned.'."\n"
.'Step 2: Call the [GetAsyncJobResult](~~607824~~) operation to query the result. Use the task ID to query the task execution status and result. If the task is still being processed, wait a moment before querying again.'."\n"
."\n"
.'## Billing description'."\n"
.'For the billable methods and pricing of generative image cartoonization, see [Billing overview](~~202482~~).'."\n"
."\n"
.'> The debugging operation below is a paid operation. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?tagName=imageenhan&children=GenerateCartoonizedImage).',
'responseParamsDescription' => '## Query results'."\n"
.'This is an asynchronous operation that does not return the actual result immediately. Use the returned RequestId to call the GetAsyncJobResult operation to obtain the actual result. For more information, see [GetAsyncJobResult](~~607824~~).'."\n"
."\n"
.'## SDK reference'."\n"
.'For the text-to-image feature under the Alibaba Cloud Vision AI Image Production category, we recommend using the SDK. The SDK supports multiple programming languages. When calling the SDK, select the SDK package for the Image Production (imageenhan) AI category. File parameters can be passed as local files or arbitrary URLs through the SDK. For more information, see [SDK overview](~~145033~~).'."\n"
."\n"
.'## Sample code'."\n"
.'For sample code in common languages for this feature, see [GenerateCartoonizedImage sample code](~~602271~~). For sample code to query asynchronous task results in common languages, see [Query asynchronous task result sample code](~~607974~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes of generative image cartoonization, see [Common error codes](~~145023~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the debugging feature are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [
['createdAt' => '2024-02-20T02:45:44.000Z', 'description' => 'Response parameters changed'],
['createdAt' => '2023-12-27T06:30:12.000Z', 'description' => 'Request parameters changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GenerateCartoonizedImage'],
],
],
'ramActions' => [
[
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:GenerateCartoonizedImage',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'GenerateSuperResolutionImage' => [
'summary' => 'This topic describes the syntax and provides examples of the GenerateSuperResolutionImage operation in the image production (imageenhan) category.',
'methods' => ['post'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'ImageUrl',
'in' => 'formData',
'schema' => ['description' => 'The URL of the input image. We recommend that you use an Object Storage Service (OSS) URL in the China (Shanghai) region. If the file is stored locally or the OSS URL is not in the China (Shanghai) region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/test/xxx/1025.jpg', 'title' => ''],
],
[
'name' => 'Scale',
'in' => 'formData',
'schema' => ['description' => 'The image upscaling factor. Valid values: 1, 2, 3, and 4. Default value: 2.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '2', 'title' => ''],
],
[
'name' => 'UserData',
'in' => 'formData',
'schema' => ['description' => 'This parameter is a reserved field. You do not need to specify this parameter.', 'type' => 'string', 'required' => false, 'example' => '无', 'title' => ''],
],
[
'name' => 'OutputFormat',
'in' => 'formData',
'schema' => ['description' => 'The storage format of the output image. Valid values: `png`, `jpg`, and `bmp`. Default value: `png`.', 'type' => 'string', 'required' => false, 'example' => 'jpg', 'title' => ''],
],
[
'name' => 'OutputQuality',
'in' => 'formData',
'schema' => ['description' => 'The quality factor of the output image. A larger value indicates higher quality. Valid values: \\[30,100]. Default value: 95. This parameter takes effect only when `outputFormat` is set to `jpg`.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '95', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'title' => '',
'description' => 'Schema of Response',
'type' => 'object',
'properties' => [
'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '4ad5c3ef-5ac4-4e1c-b14f-90d939aa73eb'],
'Data' => [
'description' => 'The returned result data. After the asynchronous task is executed successfully, invoke the [GetAsyncJobResult](~~607824~~) operation and perform JSON deserialization on the Result field to obtain this data.',
'type' => 'object',
'properties' => [
'ResultUrl' => ['description' => 'The OSS URL of the output image.'."\n"
."\n"
.'> This URL is a temporary URL that is valid for 30 minutes. After the URL expires, you can no longer access it. To save the file for an extended period or permanently, access the URL within 30 minutes, download the file, and save it to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://vibktprfx-prod-prod-damo-eas-cn-shanghai.oss-cn-shanghai.aliyuncs.com/diffusion-sr/2023-02-07/d01cede5-28bf-4719-96d9-77198d51c2f2/20230207_150650515242_3dbctnjy5f.jpg?Expires=1675755681&OSSAccessKeyId=LTAI****************&Signature=4FeDXpp0DilXsHdt7qc%2Ffh3zoC****', 'title' => ''],
],
'title' => '',
'example' => '',
],
'Message' => ['description' => 'The message returned after the asynchronous task is submitted.', 'type' => 'string', 'example' => '该调用为异步调用,任务已提交成功,请以requestId的值作为jobId参数调用同类目下GetAsyncJobResult接口查询任务执行状态和结果。', 'title' => ''],
],
'example' => '',
],
],
],
'errorCodes' => [
400 => [
['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''],
],
403 => [
['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''],
],
408 => [
['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
],
],
'staticInfo' => ['returnType' => 'synchronous'],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"4ad5c3ef-5ac4-4e1c-b14f-90d939aa73eb\\",\\n \\"Data\\": {\\n \\"ResultUrl\\": \\"http://vibktprfx-prod-prod-damo-eas-cn-shanghai.oss-cn-shanghai.aliyuncs.com/diffusion-sr/2023-02-07/d01cede5-28bf-4719-96d9-77198d51c2f2/20230207_150650515242_3dbctnjy5f.jpg?Expires=1675755681&OSSAccessKeyId=LTAI****************&Signature=4FeDXpp0DilXsHdt7qc%2Ffh3zoC****\\"\\n },\\n \\"Message\\": \\"该调用为异步调用,任务已提交成功,请以requestId的值作为jobId参数调用同类目下GetAsyncJobResult接口查询任务执行状态和结果。\\"\\n}","type":"json"}]',
'title' => 'Generative image super-resolution',
'description' => '## Feature description'."\n"
.'Based on a generative foundation model, this operation enhances image resolution details, repairs images, and scales up images by a specified factor, significantly improving image detail richness and making images clearer. Compared with the [standard image super-resolution algorithm](~~151947~~), this operation generates more realistic and natural details.'."\n"
.'The following figure shows an example of this operation (the left image is the original, and the right image is the processed result):'."\n"
.''."\n"
."\n"
.'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
.'- To learn more about Alibaba Cloud Vision Intelligence Open Platform visual AI API integration, usage, or consultation, join the DingTalk group (23109592) to contact us.'."\n"
."\n"
.'## Common scenarios'."\n"
."\n"
.'- Generate more details: Uses a generative foundation model to generate more detail textures for images, significantly improving image quality for various types of images.'."\n"
.'- 4x upscaling: Supports up to 4x upscaling, transforming low-resolution images into high-resolution images.'."\n"
."\n"
.'## Benefits'."\n"
."\n"
.'- Print quality enhancement: Enhances images intended for print publication to meet the high DPI, high resolution, and high clarity requirements for print delivery.'."\n"
.'- Legacy material enhancement: Enhances important classic legacy images, making blurry low-resolution materials clearer.'."\n"
."\n"
.'## Getting started'."\n"
.'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **China Site Account** in the upper-right corner, and follow the instructions to complete account registration.'."\n"
.'2. Activate the service: Make sure you have activated the [Image Production service](https://vision.aliyun.com/imageenhan). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n"
.'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/GenerateImageWithText?lang=JAVA) to debug the operation online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development integration:'."\n"
.'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
.'- Find the SDK package for the AI category Image Production (imageenhan) in the corresponding SDK documentation and install it.'."\n"
.'- Modify the sample code provided in the references as needed and invoke the operation.'."\n"
."\n"
.'6. Sample code: For sample code in common programming languages, see [Generative image super resolution sample code](~~608846~~). For sample code to query asynchronous task results in common programming languages, see [Query asynchronous task result sample code](~~607974~~).'."\n"
."\n"
.'7. Direct client invocations: Common client invocation methods for this operation include the following:'."\n"
.'- [Direct invocation from web frontend](~~467779~~)'."\n"
.'- [Direct invocation from mini programs](~~467780~~)'."\n"
.'- [Direct invocation from Android](~~467781~~)'."\n"
.'- [Direct invocation from iOS](~~467782~~).'."\n"
."\n"
.'## Input limits'."\n"
."\n"
.'- Supported image types: JPEG, PNG, JPG, and BMP.'."\n"
.'- Input image resolution: The short side must not exceed 1080 pixels, and the long side must not exceed 5000 pixels. If the short side exceeds 1080 pixels, no error is returned and the algorithm automatically adjusts the image. If the long side exceeds 5000 pixels, the algorithm returns an error. The minimum image resolution is 64 × 64.'."\n"
.'- Input image aspect ratio: The aspect ratio must not exceed 2:1.'."\n"
.'- The image size must not exceed 20 MB.'."\n"
."\n"
.'## Procedure'."\n"
.'This is an asynchronous operation that requires two steps.'."\n"
.'Step 1: Call the GenerateSuperResolutionImage operation to submit a task. If the request is successful, a task ID is returned.'."\n"
.'Step 2: Call the [GetAsyncJobResult](~~607824~~) operation to query the result based on the task ID. If the task is still being processed, wait a moment before querying again. Do not submit duplicate tasks while the same task is still being processed.'."\n"
."\n"
.'## Billing'."\n"
.'For information about the billable methods and pricing of generative image super resolution, see [Billing](~~202482~~).',
'responseParamsDescription' => '## Query results'."\n"
.'This is an asynchronous operation that does not return actual results. You must call the GetAsyncJobResult operation with the returned RequestId to obtain the actual results. For more information, see [GetAsyncJobResult](~~607824~~).'."\n"
."\n"
.'## SDK reference'."\n"
.'For the text-to-image generation feature under the Alibaba Cloud Vision AI Image Production category, we recommend that you use the SDK. The SDK supports multiple programming languages. When calling the SDK, select the SDK package for the AI category Image Production (imageenhan). The SDK supports local files and URLs for file parameters. For more information, see [SDK overview](~~145033~~).'."\n"
."\n"
.'## Sample code'."\n"
.'For sample code in common programming languages, see [Generative image super-resolution sample code](~~608846~~). For sample code to query asynchronous task results in common programming languages, see [Query asynchronous task result sample code](~~607974~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes of generative image super-resolution, see [Common error codes](~~145023~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the debugging console are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [
['createdAt' => '2024-02-20T02:48:43.000Z', 'description' => 'Response parameters changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GenerateSuperResolutionImage'],
],
],
'ramActions' => [
[
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:GenerateSuperResolutionImage',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'GetAsyncJobResult' => [
'methods' => ['post'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
'name' => 'JobId',
'in' => 'formData',
'schema' => ['description' => 'The RequestId returned by the asynchronous operation. You can use this parameter to query the actual result of the asynchronous operation.', 'type' => 'string', 'required' => true, 'example' => '11A898F7-29D7-4AB3-B639-8BBDE671BBD5', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'description' => '1',
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '6B4B827E-1CAA-43CD-BBDF-BB572E035976', 'title' => ''],
'Data' => [
'description' => 'The returned result data.',
'type' => 'object',
'properties' => [
'Status' => ['description' => 'The status of the asynchronous task. Valid values:'."\n"
."\n"
.'- QUEUING: The task is queuing.'."\n"
."\n"
.'- PROCESSING: The task is being processed.'."\n"
."\n"
.'- PROCESS_SUCCESS: The task was processed.'."\n"
."\n"
.'- PROCESS_FAILED: The task failed to be processed.'."\n"
."\n"
.'- TIMEOUT_FAILED: The task timed out.'."\n"
."\n"
.'- LIMIT_RETRY_FAILED: The maximum number of retries was exceeded.', 'type' => 'string', 'example' => 'PROCESS_SUCCESS', 'title' => ''],
'ErrorMessage' => ['description' => 'The error message of the asynchronous task.', 'type' => 'string', 'example' => 'paramsIllegal', 'title' => ''],
'Result' => ['description' => 'The actual result returned by the asynchronous task.', 'type' => 'string', 'example' => 'http://viapi-cn-shanghai-dha-filter.oss-cn-shanghai.aliyuncs.com/upload/recoloring-hd-2020-06-22-19-39-25-798c9cb57f-v6pj4/2020-6-23/invi_filter_015928997797691000043_tIPX7W.jpg?Expires=1592901579&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSRp****&Signature=qelgcQJBnzRogPybEPDDrDIjHd****', 'title' => ''],
'ErrorCode' => ['description' => 'The error code of the asynchronous task.', 'type' => 'string', 'example' => 'InvalidParameter', 'title' => ''],
'JobId' => ['description' => 'The asynchronous task ID.', 'type' => 'string', 'example' => '7435839A-5B92-4AA1-B2DE-5B6C98C04DDE', 'title' => ''],
],
'title' => '',
'example' => '',
],
],
'title' => '',
'example' => '',
],
],
],
'errorCodes' => [
400 => [
['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''],
],
403 => [
['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''],
],
408 => [
['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"6B4B827E-1CAA-43CD-BBDF-BB572E035976\\",\\n \\"Data\\": {\\n \\"Status\\": \\"PROCESS_SUCCESS\\",\\n \\"ErrorMessage\\": \\"paramsIllegal\\",\\n \\"Result\\": \\"http://viapi-cn-shanghai-dha-filter.oss-cn-shanghai.aliyuncs.com/upload/recoloring-hd-2020-06-22-19-39-25-798c9cb57f-v6pj4/2020-6-23/invi_filter_015928997797691000043_tIPX7W.jpg?Expires=1592901579&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSRp****&Signature=qelgcQJBnzRogPybEPDDrDIjHd****\\",\\n \\"ErrorCode\\": \\"InvalidParameter\\",\\n \\"JobId\\": \\"7435839A-5B92-4AA1-B2DE-5B6C98C04DDE\\"\\n }\\n}","type":"json"}]',
'title' => 'Query asynchronous task results',
'summary' => 'This topic describes the syntax and examples of the GetAsyncJobResult operation for querying asynchronous task results.',
'description' => '## Feature description'."\n"
.'For asynchronous operations, the response returned after you invoke an API operation does not contain the actual result. Save the RequestId from the response, and then invoke GetAsyncJobResult to obtain the actual result.'."\n"
."\n"
.'> - Files generated by asynchronous tasks expire after 30 minutes. To retain them for long-term use, download the files to a local server or store them in Object Storage Service (OSS) promptly. For more information about OSS operations, see [Upload objects](~~31886~~).'."\n"
.'> - To learn more about accessing Alibaba Cloud Vision Intelligence Open Platform visual AI API operations, using the operations, or consulting on related issues, join the DingTalk group (23109592) to contact us.'."\n"
."\n\n"
.'All operations in the video production category are asynchronous. You must invoke GetAsyncJobResult to obtain the actual results.',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## SDK reference'."\n"
.'We recommend that you use an SDK to call Alibaba Cloud Vision AI operations. SDKs are available for multiple programming languages. You can use an SDK to pass file parameters as local files or URLs. For more information, see [SDK overview](~~145033~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes related to querying asynchronous task results, see [Common error codes](~~145023~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Make sure that the images or files you upload comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the debugging console expire after 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [
['createdAt' => '2022-04-24T08:14:08.000Z', 'description' => 'Error codes changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetAsyncJobResult'],
],
],
'ramActions' => [
[
'operationType' => 'get',
'ramAction' => [
'action' => 'viapi-imageenhan:GetAsyncJobResult',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'ImageBlindCharacterWatermark' => [
'methods' => ['post'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'FunctionType',
'in' => 'formData',
'schema' => ['description' => 'The function type. Valid values:'."\n"
.'- encode_text: adds a text watermark by using the legacy model.'."\n"
."\n"
.'- encode_text_plus: adds a text watermark by using the new model 1.'."\n"
."\n"
.'- encode_text_bold: adds a text watermark by using the new model 2.'."\n"
."\n"
.'- decode_text: decodes the text watermark in an image by using the legacy model. This corresponds to the encode_text watermark method.'."\n"
."\n"
.'- decode_text_plus: decodes the text watermark in an image by using the new model 1. This corresponds to the encode_text_plus watermark method.'."\n"
."\n"
.'- decode_text_bold: decodes the text watermark in an image by using the new model 2. This corresponds to the encode_text_bold watermark method.', 'type' => 'string', 'required' => true, 'example' => 'encode_text', 'title' => ''],
],
[
'name' => 'Text',
'in' => 'formData',
'schema' => ['description' => 'The watermark text to be added. The text can contain up to 16 characters. Exceeding this limit affects the watermark quality.'."\n"
.'>- This parameter is required when FunctionType is set to `encode_text`, `encode_text_plus`, or `encode_text_bold`.'."\n"
.'- Do not set this parameter when FunctionType is set to `decode_text`, `decode_text_plus`, or `decode_text_bold`.', 'type' => 'string', 'required' => false, 'example' => '阿里云版权所有一二三四五六七八九', 'title' => ''],
],
[
'name' => 'WatermarkImageURL',
'in' => 'formData',
'schema' => ['description' => 'The URL of the image to be parsed, which is the composite image that contains the text watermark. We recommend that you use an Object Storage Service (OSS) URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).'."\n"
.'>- This parameter is required when FunctionType is set to `decode_text`, `decode_text_plus`, or `decode_text_bold`.'."\n"
.'- Do not set this parameter when FunctionType is set to `encode_text`, `encode_text_plus`, or `encode_text_bold`.', 'type' => 'string', 'required' => false, 'isFileTransferUrl' => true, 'example' => 'https://viapi-doc.oss-cn-shanghai.aliyuncs.com/imageenhan/xxxxx.jpg', 'title' => ''],
],
[
'name' => 'OutputFileType',
'in' => 'formData',
'schema' => ['description' => 'The output image format. Valid values: `png`, `jpg`, and `bmp`. Default value: `png`.'."\n"
.'>- This parameter is required when FunctionType is set to `encode_text`, `encode_text_plus`, or `encode_text_bold`.'."\n"
.'- Do not set this parameter when FunctionType is set to `decode_text`, `decode_text_plus`, or `decode_text_bold`.', 'type' => 'string', 'required' => false, 'example' => 'jpg', 'title' => ''],
],
[
'name' => 'QualityFactor',
'in' => 'formData',
'schema' => ['description' => 'The quality of the output image. A larger value indicates higher quality. Valid values: 1 to 100. Default value: 100.'."\n"
.'>This parameter takes effect only when OutputFileType is set to `jpg`.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '100', 'title' => ''],
],
[
'name' => 'OriginImageURL',
'in' => 'formData',
'schema' => ['description' => 'The URL of the original image. We recommend that you use an OSS URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).'."\n"
.'>- This parameter is required when FunctionType is set to `encode_text`, `encode_text_plus`, `encode_text_bold`, or `decode_text`.'."\n"
.'- Do not set this parameter when FunctionType is set to `decode_text_plus` or `decode_text_bold`.', 'type' => 'string', 'required' => false, 'isFileTransferUrl' => true, 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/test-team/xxxxx.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '2457E1ED-9C76-4386-B9A2-7E41B7D6E849', 'title' => ''],
'Data' => [
'description' => 'The returned data.',
'type' => 'object',
'properties' => [
'WatermarkImageURL' => ['description' => 'The URL of the watermarked image. This parameter is returned when the function type is set to `encode_text` or `encode_text_plus`.'."\n"
.'> This is a temporary URL that is valid for 30 minutes. After it expires, the URL is no longer accessible. To retain the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI****************&Expires=158340****&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****', 'title' => ''],
'TextImageURL' => ['description' => 'The URL of the image that contains only the parsed text. This parameter is returned when the function type is set to `decode_text` or `decode_text_plus`.'."\n"
.'> This is a temporary URL that is valid for 30 minutes. After it expires, the URL is no longer accessible. To retain the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI****************&Expires=158340****&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****', 'title' => ''],
],
'title' => '',
'example' => '',
],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'errorCodes' => [
400 => [
['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''],
],
403 => [
['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''],
],
408 => [
['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"2457E1ED-9C76-4386-B9A2-7E41B7D6E849\\",\\n \\"Data\\": {\\n \\"WatermarkImageURL\\": \\"http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI****************&Expires=158340****&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****\\",\\n \\"TextImageURL\\": \\"http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI****************&Expires=158340****&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****\\"\\n }\\n}","type":"json"}]',
'title' => 'Invisible character watermark for images',
'summary' => 'This topic describes the syntax and provides examples of the invisible character watermark feature (ImageBlindCharacterWatermark).',
'description' => '## Feature description'."\n"
.'The invisible character watermark feature allows you to add or parse specified text watermarks in images.'."\n"
.'The following figure shows an example of this feature:'."\n"
.''."\n"
."\n"
.'> - You can join [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get help from our support team.'."\n"
.'- You can try this feature for free on the Visual Intelligence Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=ImageBlindCharacterWatermark) to experience this feature or purchase it online.'."\n"
.'- For questions about API integration, usage, or consultation regarding the Alibaba Cloud Visual Intelligence Platform, join the DingTalk group (23109592) to contact us.'."\n"
."\n"
.'## Common scenarios'."\n"
.'- Copyright protection: Image authors are entitled to copyrights by law. Adding invisible watermarks to images helps authors or parties with authorization prove copyright ownership and prevents unauthorized access and illegal use of images.'."\n"
.'- Information leak prevention: In images containing confidential information, different invisible watermarks can be applied for different parties that access the images. If an image is leaked, the invisible watermark can be parsed to trace the source of the leak.'."\n"
."\n"
.'## Advantages'."\n"
.'Compared with traditional stamp watermarks, invisible watermarks cannot be perceived by viewers and do not affect the visual quality of images. The watermarks cannot be detected by users or removed by common watermark removal methods. However, the watermarks can be parsed by the invisible character watermark feature to prove copyright ownership of images.'."\n"
."\n"
.'## Integration guide'."\n"
.'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **China Site Account** in the upper-right corner, and follow the instructions to complete the registration.'."\n"
.'2. Activate the service: Make sure that you have activated the [Image Production service](https://vision.aliyun.com/imageenhan). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n"
.'3. Create an AccessKey pair: Make sure that you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/ImageBlindCharacterWatermark?lang=JAVA&sdkStyle=dara¶ms=%7B%22OriginImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FImageBlindCharacterWatermark%2FImageBlindCharacterWatermark1.png%22%2C%22Text%22%3A%22%E9%98%BF%E9%87%8C%E4%BA%91%E7%89%88%E6%9D%83%E6%89%80%E6%9C%89%22%2C%22FunctionType%22%3A%22encode_text_plus%22%2C%22QualityFactor%22%3A100%2C%22OutputFileType%22%3A%22jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development integration steps:'."\n"
.'- Select the SDK language that you want to use from the [SDK overview](~~145033~~).'."\n"
.'- Find the SDK package for the Image Production (imageenhan) category in the corresponding SDK documentation and install it.'."\n"
.'- Modify the sample code provided in the references as needed and invoke the API operation.'."\n"
."\n"
.'6. Direct client calls: Common client call methods for this feature include the following:'."\n"
.'- [Direct call from web frontend](~~467779~~)'."\n"
.'- [Direct call from mini programs](~~467780~~)'."\n"
.'- [Direct call from Android](~~467781~~)'."\n"
.'- [Direct call from iOS](~~467782~~).'."\n"
."\n"
.'## Input limits'."\n"
."\n"
.'- Image format: JPEG, JPG, PNG, or BMP.'."\n"
.'- Image size: up to 3 MB.'."\n"
.'- Image resolution: greater than 5 × 5 pixels.'."\n"
.'- The URL cannot contain Chinese characters.'."\n"
."\n"
.'## Billable methods'."\n"
.'For information about the billable methods and pricing of the invisible character watermark feature, see [Billing overview](~~202482~~).'."\n"
."\n"
.'> The debugging API operation below is a paid operation. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=ImageBlindCharacterWatermark).',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## SDK reference'."\n"
.'We recommend that you use an SDK to call the invisible character watermark feature under the Visual AI Image Production category. SDKs are available in multiple programming languages. When calling this feature, select the SDK package for the Image Production (imageenhan) category. File parameters support local files and URLs of any type when called through the SDK. For more information, see [SDK overview](~~145033~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes of the invisible character watermark feature, see [Common error codes](~~145023~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [
['createdAt' => '2022-09-29T07:58:12.000Z', 'description' => 'Request parameters changed'],
['createdAt' => '2022-03-30T03:15:40.000Z', 'description' => 'Error codes changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ImageBlindCharacterWatermark'],
],
],
'ramActions' => [
[
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:ImageBlindCharacterWatermark',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'ImageBlindPicWatermark' => [
'methods' => ['post'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'FunctionType',
'in' => 'formData',
'schema' => ['description' => 'The function type. Valid values:'."\n"
."\n"
.'- encode_pic: adds an image watermark by using the legacy model.'."\n"
."\n"
.'- encode_pic_plus: adds an image watermark by using the new model 1.'."\n"
."\n"
.'- encode_pic_bold: adds an image watermark by using the new model 2.'."\n"
."\n"
.'- decode_pic: decodes the image watermark from an image by using the legacy model. This corresponds to the encode_pic watermark method.'."\n"
."\n"
.'- decode_pic_plus: decodes the image watermark from an image by using the new model 1. This corresponds to the encode_pic_plus watermark method.'."\n"
."\n"
.'- decode_pic_bold: decodes the image watermark from an image by using the new model 2. This corresponds to the encode_pic_bold watermark method.', 'type' => 'string', 'required' => true, 'example' => 'encode_pic', 'title' => ''],
],
[
'name' => 'LogoURL',
'in' => 'formData',
'schema' => ['description' => 'The URL of the watermark image to be added. We recommend that you use an OSS URL in the China (Shanghai) region. If the file is stored locally or in an OSS bucket outside the China (Shanghai) region, see [File URL processing](~~155645~~).'."\n"
."\n"
.'>- This parameter is required when FunctionType is set to `encode_pic`, `encode_pic_plus`, or `encode_pic_bold`.'."\n"
.'- Do not set this parameter when FunctionType is set to `decode_pic`, `decode_pic_plus`, or `decode_pic_bold`.', 'type' => 'string', 'required' => false, 'isFileTransferUrl' => true, 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/test-team/xxxxx.jpg', 'title' => ''],
],
[
'name' => 'WatermarkImageURL',
'in' => 'formData',
'schema' => ['description' => 'The URL of the image to be decoded, which is the composite image that contains the image watermark. We recommend that you use an OSS URL in the China (Shanghai) region. If the file is stored locally or in an OSS bucket outside the China (Shanghai) region, see [File URL processing](~~155645~~).'."\n"
.'>- This parameter is required when FunctionType is set to `decode_pic`, `decode_pic_plus`, or `decode_pic_bold`.'."\n"
.'- Do not set this parameter when FunctionType is set to `encode_pic`, `encode_pic_plus`, or `encode_pic_bold`.', 'type' => 'string', 'required' => false, 'isFileTransferUrl' => true, 'example' => 'https://viapi-doc.oss-cn-shanghai.aliyuncs.com/imageenhan/xxxxx.jpg', 'title' => ''],
],
[
'name' => 'OutputFileType',
'in' => 'formData',
'schema' => ['description' => 'The format of the output image. Valid values: `jpeg`, `png`, `jpg`, and `bmp`. Default value: `png`.'."\n"
.'>- This parameter is required when FunctionType is set to `encode_pic`, `encode_pic_plus`, or `encode_pic_bold`.'."\n"
.'- Do not set this parameter when FunctionType is set to `decode_pic`, `decode_pic_plus`, or `decode_pic_bold`.', 'type' => 'string', 'required' => false, 'example' => 'jpg', 'title' => ''],
],
[
'name' => 'QualityFactor',
'in' => 'formData',
'schema' => ['description' => 'The quality of the output image. A larger value indicates higher quality. Valid values: 1 to 100. Default value: 100.'."\n"
.'>This parameter takes effect only when OutputFileType is set to `jpg`.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '100', 'title' => ''],
],
[
'name' => 'OriginImageURL',
'in' => 'formData',
'schema' => ['description' => 'The URL of the original image. We recommend that you use an OSS URL in the China (Shanghai) region. If the file is stored locally or in an OSS bucket outside the China (Shanghai) region, see [File URL processing](~~155645~~).'."\n"
.'>- This parameter is required when FunctionType is set to `encode_pic`, `encode_pic_plus`, `encode_pic_bold`, or `decode_pic`.'."\n"
.'- Do not set this parameter when FunctionType is set to `decode_pic_plus` or `decode_pic_bold`.', 'type' => 'string', 'required' => false, 'isFileTransferUrl' => true, 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/test-team/xxxxx.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'description' => '1',
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'DE7869E4-0ACE-4C02-8B98-540B49F49205', 'title' => ''],
'Data' => [
'description' => 'The returned data.',
'type' => 'object',
'properties' => [
'WatermarkImageURL' => ['description' => 'The URL of the watermarked image. This parameter is returned when the function type is `encode_pic` or `encode_pic_plus`.'."\n"
.'> This URL is a temporary URL that is valid for 30 minutes. After the URL expires, it can no longer be accessed. To store the file for a longer period or permanently, access the URL within 30 minutes, download the file, and save it to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI4Fmdm1gQonFLrghJ****&Expires=158340****&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****', 'title' => ''],
'LogoURL' => ['description' => 'The URL of the decoded watermark image. This parameter is returned when the function type is `decode_pic` or `decode_pic_plus`.'."\n"
.'> This URL is a temporary URL that is valid for 30 minutes. After the URL expires, it can no longer be accessed. To store the file for a longer period or permanently, access the URL within 30 minutes, download the file, and save it to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI4Fmdm1gQonFLrghJ****&Expires=158340****&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****', 'title' => ''],
],
'title' => '',
'example' => '',
],
],
'title' => '',
'example' => '',
],
],
],
'errorCodes' => [
400 => [
['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''],
],
403 => [
['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''],
],
408 => [
['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"DE7869E4-0ACE-4C02-8B98-540B49F49205\\",\\n \\"Data\\": {\\n \\"WatermarkImageURL\\": \\"http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI4Fmdm1gQonFLrghJ****&Expires=158340****&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****\\",\\n \\"LogoURL\\": \\"http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI4Fmdm1gQonFLrghJ****&Expires=158340****&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****\\"\\n }\\n}","type":"json"}]',
'title' => 'Invisible image watermark',
'summary' => 'This topic describes the syntax and provides examples of the invisible image watermark feature (ImageBlindPicWatermark).',
'description' => '## Feature description'."\n"
.'The invisible image watermark feature allows you to add or extract image watermarks from images.'."\n"
.'For example, if you have an image A, you can call the encode_pic parameter to add an invisible image watermark and obtain image B. Alternatively, you can set image A as OriginImageURL and image B as WatermarkImageURL, and then call the decode_pic parameter to extract the watermark image.'."\n"
."\n"
.'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get online assistance.'."\n"
.'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=ImageBlindPicWatermark) to experience this feature or purchase it online.'."\n"
.'- To learn more about API integration, usage, or consultation for Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
."\n"
.'## Common scenarios'."\n"
.'- Copyright protection: Image authors are entitled to copyrights by law. Adding invisible watermarks to images helps authors or authorized parties prove copyright ownership and prevents unauthorized use of images.'."\n"
."\n"
.'- Information leak prevention: For images that contain confidential information, different invisible watermarks can be applied for different viewers. If an image is leaked, the invisible watermark can be extracted to trace the source of the leak.'."\n"
."\n"
.'## Advantages'."\n"
.'Compared with traditional visible watermarks, invisible watermarks cannot be perceived by viewers and do not affect the visual quality of images. Users cannot detect the watermarks or remove them by using common watermark removal methods. However, the watermarks can be extracted through the invisible image watermark API to prove copyright ownership of the images.'."\n"
."\n"
.'## Integration guide'."\n"
.'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete account registration.'."\n"
.'2. Activate the service: Make sure that you have activated the [Intelligent Visual Production](https://vision.aliyun.com/imageenhan) service. If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n"
.'3. Create an AccessKey pair: Make sure that you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/ImageBlindPicWatermark?lang=JAVA&sdkStyle=dara¶ms=%7B%22OriginImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FImageBlindPicWatermark%2FImageBlindPicWatermark-tj1.jpg%22%2C%22LogoURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FImageBlindPicWatermark%2FImageBlindPicWatermark-tj6.jpg%22%2C%22FunctionType%22%3A%22encode_pic_plus%22%2C%22QualityFactor%22%3A100%2C%22OutputFileType%22%3A%22jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development integration steps:'."\n"
.'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
.'- Find the SDK package for the AI category Intelligent Visual Production (imageenhan) in the corresponding SDK documentation and install it.'."\n"
.'- Modify the sample code provided in the references as needed and invoke the API.'."\n"
."\n"
.'6. Direct client calls: Common client call methods for this feature include the following.'."\n"
.'- [Direct call from web frontend](~~467779~~)'."\n"
.'- [Direct call from mini programs](~~467780~~)'."\n"
.'- [Direct call from Android](~~467781~~)'."\n"
.'- [Direct call from iOS](~~467782~~).'."\n"
."\n"
.'## Input limits'."\n"
.'- Image format: JPEG, JPG, PNG, or BMP.'."\n"
.'- Image size: up to 3 MB.'."\n"
.'- Image resolution: greater than 5 × 5 pixels.'."\n"
.'- The URL cannot contain Chinese characters.'."\n"
."\n"
.'## Billing description'."\n"
.'For information about the billable methods and pricing of the invisible image watermark feature, see [Billing overview](~~202482~~).'."\n"
."\n"
.'> The debugging API below is a paid API. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=ImageBlindPicWatermark).',
'responseParamsDescription' => '## SDK reference'."\n"
.'We recommend that you use an SDK to call the invisible image watermark feature under the Alibaba Cloud Vision AI Intelligent Visual Production category. Multiple programming languages are supported. When calling the API, select the SDK package for the AI category Intelligent Visual Production (imageenhan). The SDK supports both local files and arbitrary URLs for file parameters. For more information, see [SDK overview](~~145033~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes of the invisible image watermark feature, see [Common error codes](~~145023~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [
['createdAt' => '2022-09-29T07:58:12.000Z', 'description' => 'Request parameters changed'],
['createdAt' => '2022-03-30T03:15:40.000Z', 'description' => 'Error codes changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ImageBlindPicWatermark'],
],
],
'ramActions' => [
[
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:ImageBlindPicWatermark',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'ImitatePhotoStyle' => [
'methods' => ['post'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'StyleUrl',
'in' => 'formData',
'schema' => ['description' => 'The URL of the reference image. We recommend that you use an OSS URL in the Shanghai region. If the file is stored locally or the OSS URL is in a region other than Shanghai, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/ImitatePhotoStyle/ImitatePhotoStyle7.jpg', 'title' => ''],
],
[
'name' => 'ImageURL',
'in' => 'formData',
'schema' => ['description' => 'The URL of the image to which you want to apply the style transfer. We recommend that you use an OSS URL in the Shanghai region. If the file is stored locally or the OSS URL is in a region other than Shanghai, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/ImitatePhotoStyle/ImitatePhotoStyle1.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'A880432B-6D9A-4EF4-B7B7-863F38A930D9', 'title' => ''],
'Data' => [
'description' => 'The returned data.',
'type' => 'object',
'properties' => [
'ImageURL' => ['description' => 'The URL of the result image after style transfer.'."\n"
.'> This URL is a temporary address and is valid for 30 minutes. After it expires, the URL is no longer accessible.', 'type' => 'string', 'example' => 'http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/photo-style-imitation/7c4c0809-5e15-4ca7-84b3-ba16711e3255__5cb220200622-075203.jpg?Expires=1592814125&OSSAccessKeyId=LTAI****************&Signature=DNhhRFPbMBwpHCEhrLdL%2BBF%2BXs****', 'title' => ''],
],
'title' => '',
'example' => '',
],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'errorCodes' => [
400 => [
['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''],
],
403 => [
['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''],
],
408 => [
['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"A880432B-6D9A-4EF4-B7B7-863F38A930D9\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/photo-style-imitation/7c4c0809-5e15-4ca7-84b3-ba16711e3255__5cb220200622-075203.jpg?Expires=1592814125&OSSAccessKeyId=LTAI****************&Signature=DNhhRFPbMBwpHCEhrLdL%2BBF%2BXs****\\"\\n }\\n}","type":"json"}]',
'title' => 'Imitate photo style',
'summary' => 'This topic describes the syntax and examples of ImitatePhotoStyle.',
'description' => '## Feature description'."\n"
.'The ImitatePhotoStyle feature performs style transfer of the lighting, color, and other attributes that do not affect the original image structure from a reference image to a target image.'."\n"
.'You can try this feature in the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=ImitatePhotoStyle). The following images show examples of this feature:'."\n"
."\n"
.'- Original image'."\n"
.''."\n"
."\n"
.'- Reference image'."\n"
.''."\n"
."\n"
.'- Result image'."\n"
.''."\n"
."\n"
.'> To request access to Alibaba Cloud Vision Intelligence Open Platform visual AI APIs, learn about API usage, or consult on related issues, join the DingTalk group (23109592) to contact us.'."\n"
."\n"
.'## Getting started'."\n"
.'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to create an account.'."\n"
.'2. Activate the service: Make sure you have activated the [Image Production service](https://vision.aliyun.com/imageenhan). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n"
.'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/ImitatePhotoStyle?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FImitatePhotoStyle%2FImitatePhotoStyle1.jpg%22%2C%22StyleUrl%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FImitatePhotoStyle%2FImitatePhotoStyle6.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development integration steps:'."\n"
.'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
.'- Find the SDK package for the Image Production (imageenhan) AI category in the corresponding SDK documentation and install it.'."\n"
.'- Modify the sample code provided in the References as needed and invoke the API.'."\n"
."\n"
.'6. Direct client calls: Common client call methods for this feature include the following:'."\n"
.'- [Direct call from web frontend](~~467779~~)'."\n"
.'- [Direct call from a mini program](~~467780~~)'."\n"
.'- [Direct call from Android](~~467781~~)'."\n"
.'- [Direct call from iOS](~~467782~~).'."\n"
."\n"
.'## Input limits'."\n"
.'- Image format: JPG, JPEG, or PNG.'."\n"
.'- Image size: Less than 3 MB.'."\n"
.'- Image resolution: Greater than 32 × 32 pixels and less than 3000 × 3000 pixels.'."\n"
.'- The URL cannot contain Chinese characters.'."\n"
."\n"
.'## Billing description'."\n"
.'For information about the billable methods and pricing of ImitatePhotoStyle, see [Billing overview](~~202482~~).'."\n"
."\n"
.'> The debugging API below is a paid API. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=ImitatePhotoStyle).',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## SDK reference'."\n"
.'We recommend that you use an SDK to call the ImitatePhotoStyle feature under the Image Production category of Alibaba Cloud Vision AI. Multiple programming languages are supported. When making the call, select the SDK package for the Image Production (imageenhan) AI category. File parameters support local files and arbitrary URLs through SDK calls. For more information, see [SDK overview](~~145033~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes of ImitatePhotoStyle, see [Common error codes](~~145023~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the experience debugging feature are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [
['createdAt' => '2022-12-14T07:02:24.000Z', 'description' => 'Request parameters changed'],
['createdAt' => '2022-03-30T03:15:40.000Z', 'description' => 'Error codes changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ImitatePhotoStyle'],
],
],
'ramActions' => [
[
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:ImitatePhotoStyle',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'IntelligentComposition' => [
'methods' => ['post'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'NumBoxes',
'in' => 'formData',
'schema' => ['description' => 'The number of output bounding boxes. Default value: 5. Valid values: 1 to 10. Values outside this range are truncated.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'isFileTransferUrl' => false, 'example' => '5', 'title' => ''],
],
[
'name' => 'ImageURL',
'in' => 'formData',
'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) URL in the Shanghai region. For images stored locally or in OSS regions other than Shanghai, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/IntelligentComposition/IntelligentComposition3.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'C1D52018-D67A-46AD-9AAA-031750A6E770', 'title' => ''],
'Data' => [
'description' => 'The returned data.',
'type' => 'object',
'properties' => [
'Elements' => [
'description' => 'The intelligent composition results.',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'MinX' => ['description' => 'The X coordinate of the upper-left corner of the output bounding box.', 'type' => 'integer', 'format' => 'int32', 'example' => '43', 'title' => ''],
'Score' => ['description' => 'The score of the output bounding box. Valid values: 0 to 5. A higher score indicates a better composition. A score of 3.8 or higher is recommended as a good composition score.', 'type' => 'number', 'format' => 'float', 'example' => '3.6567564', 'title' => ''],
'MaxY' => ['description' => 'The Y coordinate of the lower-right corner of the output bounding box.', 'type' => 'integer', 'format' => 'int32', 'example' => '672', 'title' => ''],
'MaxX' => ['description' => 'The X coordinate of the lower-right corner of the output bounding box.', 'type' => 'integer', 'format' => 'int32', 'example' => '981', 'title' => ''],
'MinY' => ['description' => 'The Y coordinate of the upper-left corner of the output bounding box.', 'type' => 'integer', 'format' => 'int32', 'example' => '96', 'title' => ''],
],
'description' => '',
'title' => '',
'example' => '',
],
'title' => '',
'example' => '',
],
],
'title' => '',
'example' => '',
],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'errorCodes' => [
400 => [
['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''],
],
403 => [
['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''],
],
408 => [
['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"C1D52018-D67A-46AD-9AAA-031750A6E770\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"MinX\\": 43,\\n \\"Score\\": 3.6567564,\\n \\"MaxY\\": 672,\\n \\"MaxX\\": 981,\\n \\"MinY\\": 96\\n }\\n ]\\n }\\n}","type":"json"}]',
'title' => 'Intelligent composition',
'summary' => 'Performs intelligent composition by evaluating the aesthetics of an image and outputting bounding boxes that can be used to crop the original image into better compositions.',
'description' => '## Description'."\n"
.'The intelligent composition feature evaluates the aesthetics of an input image and outputs bounding boxes. You can use these bounding boxes to crop the original image into better compositions.'."\n"
."\n"
.'> - You can join the Chinese-language DingTalk group (China only, China-language only, group ID 23109592) for Chinese-language technical support from Alibaba Cloud Vision Intelligence Open Platform.'."\n"
.'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Chinese-language China-only Free Trial](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=IntelligentComposition) to try this feature or purchase it online.'."\n"
.'- For China-site Chinese-language help, use [Chinese-language online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2).'."\n"
."\n"
.'## Getting started'."\n"
.'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **China-site Sign Up** in the upper-right corner, and follow the on-screen instructions to create an account.'."\n"
.'2. Activate the service: Make sure you have activated the [Intelligent Visual Production service](https://vision.aliyun.com/imageenhan). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n"
.'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using an AccessKey pair of a RAM user, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/IntelligentComposition?lang=JAVA&sdkStyle=dara¶ms={%22ImageURL%22:%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FIntelligentComposition%2FIntelligentComposition1.jpg%22,%22NumBoxes%22:5}&tab=DEBUG) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development integration steps:'."\n"
.'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
.'- Find the SDK package for the Intelligent Visual Production (imageenhan) category in the corresponding SDK documentation and install it.'."\n"
.'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
."\n"
.'6. Direct client calls: Common client call methods for this feature include the following:'."\n"
.'- [Direct call from web frontend](~~467779~~)'."\n"
.'- [Direct call from a mini program](~~467780~~)'."\n"
.'- [Direct call from Android](~~467781~~)'."\n"
.'- [Direct call from iOS](~~467782~~).'."\n"
."\n"
.'## Input limits'."\n"
.'- Image format: JPEG, JPG, PNG, BMP, or WEBP.'."\n"
.'- Image size: less than 3 MB.'."\n"
.'- Image resolution: greater than 32 × 32 pixels.'."\n"
.'- The URL cannot contain Chinese characters.'."\n"
."\n"
.'## Billing description'."\n"
.'For information about the billable methods and pricing of intelligent composition, see [Billing overview](~~202482~~).'."\n"
."\n"
.'> The debugging operation below is a paid operation. To try it for free, go to the [Chinese-language China-only Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=IntelligentComposition).',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## SDK reference'."\n"
.'We recommend that you use an SDK to call the intelligent composition feature under the Alibaba Cloud Vision AI Intelligent Visual Production category. SDKs are available in multiple programming languages. When making calls, select the SDK package for the Intelligent Visual Production (imageenhan) category. File parameters support local files and arbitrary URLs when called through the SDK. For more information, see [SDK overview](~~145033~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes of intelligent composition, see [Common error codes](~~145023~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the debugging feature are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [
['createdAt' => '2022-03-30T03:15:40.000Z', 'description' => 'Error codes changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'IntelligentComposition'],
],
],
'ramActions' => [
[
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:IntelligentComposition',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'MakeSuperResolutionImage' => [
'methods' => ['post'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'Url',
'in' => 'formData',
'schema' => ['description' => 'The URL of the image. We recommend that you use an OSS URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).'."\n"
.'Input limits:'."\n"
.'- Image format: JPEG, JPG, PNG, BMP, WEBP, or HEIC.'."\n"
.'- Image size: Up to 5 MB.'."\n"
.'- Image resolution: At least 32 × 32 pixels. The long side cannot exceed 1920 pixels, and the short side cannot exceed 1080 pixels.'."\n"
.'- The URL cannot contain Chinese characters.', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/MakeSuperResolutionImage/MakeSuperResolutionImage5.png', 'title' => ''],
],
[
'name' => 'Mode',
'in' => 'formData',
'schema' => ['description' => 'The image output mode. Default value: `base`. Valid values:'."\n"
."\n"
.'- base: normal mode, which provides stable super-resolution effects.'."\n"
.'- enhancement: enhancement mode, which provides more prominent enhancement effects compared to normal mode, further improving the clarity and sharpness of the output image.'."\n"
."\n\n"
.'> This field is deprecated. The mode value does not affect the super-resolution result.', 'type' => 'string', 'default' => 'base', 'required' => false, 'example' => 'base', 'title' => ''],
],
[
'name' => 'UpscaleFactor',
'in' => 'formData',
'schema' => ['description' => 'The upscaling factor. Valid values: 1, 2, 3, and 4. Default value: 2.', 'type' => 'integer', 'format' => 'int64', 'default' => '2', 'required' => false, 'example' => '2', 'title' => ''],
],
[
'name' => 'OutputFormat',
'in' => 'formData',
'schema' => ['description' => 'The storage format of the output image. Valid values: `png`, `jpg`, and `bmp`. Default value: `jpg`.'."\n"
."\n"
.'> - If the input image is in RGBA format, the output format is forced to `png` to preserve the RGBA format and the accuracy of the alpha channel.'."\n"
.'- If the output image resolution exceeds 3840 × 2160, the output format is automatically set to `jpg`.', 'type' => 'string', 'required' => false, 'example' => 'png', 'title' => ''],
],
[
'name' => 'OutputQuality',
'in' => 'formData',
'schema' => ['description' => 'The quality factor of the output image. A higher value indicates higher quality. Valid values: \\[30,100]. Default value: 95. This parameter takes effect only when **OutputFormat** is set to `jpg`.', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '95', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '47DD87F1-D077-499A-8D96-C82F006A6839', 'title' => ''],
'Data' => [
'description' => 'The returned data.',
'type' => 'object',
'properties' => [
'Url' => ['description' => 'The URL of the image with enhanced resolution.'."\n"
.'> This URL is a temporary address that is valid for 30 minutes. After it expires, the URL becomes inaccessible. To save the file for a longer period or permanently, access the URL within 30 minutes, download the file, and store it in your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://ivpd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/upload/ai-gateway_prod/ds%253D20191121/sisrx2_157433961551387538.jpg?Expires=1574598816&OSSAccessKeyId=LTAI****************&Signature=8phY6dOz4U889nHfHC1g51nwAi****', 'title' => ''],
],
'title' => '',
'example' => '',
],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'errorCodes' => [
400 => [
['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''],
],
403 => [
['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''],
],
408 => [
['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"47DD87F1-D077-499A-8D96-C82F006A6839\\",\\n \\"Data\\": {\\n \\"Url\\": \\"http://ivpd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/upload/ai-gateway_prod/ds%253D20191121/sisrx2_157433961551387538.jpg?Expires=1574598816&OSSAccessKeyId=LTAI****************&Signature=8phY6dOz4U889nHfHC1g51nwAi****\\"\\n }\\n}","type":"json"}]',
'title' => 'Image super-resolution',
'summary' => 'Enhances image resolution and clarity through super-resolution.',
'description' => '## Feature description'."\n"
.'Image super-resolution enlarges image resolution while enhancing image detail and texture, and reducing image noise. It supports 1x to 4x resolution upscaling, original resolution enhancement, and multiple modes for different output effects.'."\n"
.'The following figures show examples of this feature:'."\n"
."\n"
.'See the following figures.'."\n"
."\n"
.'- Input image'."\n"
.''."\n"
.'- Normal mode output'."\n"
.''."\n"
.'- Enhancement mode output'."\n"
.''."\n"
."\n"
.'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for assistance.'."\n"
.'- You can try this feature for free on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=MakeSuperResolutionImage) to experience this feature or purchase it online.'."\n"
.'- For questions about API access, usage, or consultation regarding the Alibaba Cloud Visual Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
."\n"
.'## Common scenarios'."\n"
.'- Design asset optimization: Optimizes design asset images for subsequent design and production workflows.'."\n"
.'- Photo clarity enhancement: Enhances the clarity of previously captured photos.'."\n"
."\n"
.'## Advantages'."\n"
.'- Outstanding results: Multiple enhancement modes provide differentiated super-resolution effects for different image assets.'."\n"
.'- Multiple upscaling factors: Supports 2x to 4x resolution upscaling and original resolution enhancement output. Select the appropriate factor based on your business requirements.'."\n"
."\n"
.'## Getting started'."\n"
.'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Sign Up** in the upper-right corner, and follow the instructions to complete registration.'."\n"
.'2. Activate the service: Make sure you have activated the [Image Production service](https://vision.aliyun.com/imageenhan). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n"
.'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/MakeSuperResolutionImage?lang=JAVA&sdkStyle=dara¶ms={%22Url%22:%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FMakeSuperResolutionImage%2FMakeSuperResolutionImage1.png%22,%22Mode%22:%22base%22,%22UpscaleFactor%22:2}&tab=DEBUG) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development and integration steps:'."\n"
.'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
.'- Find and install the SDK package for the Image Production (imageenhan) AI category in the corresponding SDK documentation.'."\n"
.'- Modify the sample code provided in the references as needed and invoke the API.'."\n"
."\n"
.'6. Sample code: For sample code in common programming languages, see [Image super resolution sample code](~~601502~~).'."\n"
."\n"
.'7. Direct client calls: Common client call methods for this feature include the following.'."\n"
.'- [Direct call from web frontend](~~467779~~)'."\n"
.'- [Direct call from mini programs](~~467780~~)'."\n"
.'- [Direct call from Android](~~467781~~)'."\n"
.'- [Direct call from iOS](~~467782~~).'."\n"
."\n"
.'## Input limits'."\n"
.'- Image format: JPEG, JPG, PNG, BMP, WEBP, or HEIC.'."\n"
.'- Image size: Up to 5 MB.'."\n"
.'- Image resolution: At least 32 × 32 pixels. The long side cannot exceed 1920 pixels, and the short side cannot exceed 1080 pixels.'."\n"
.'- The URL cannot contain Chinese characters.'."\n"
."\n"
.'## Billing description'."\n"
.'For the billable methods and pricing of image super resolution, see [Billing overview](~~202482~~).'."\n"
."\n"
.'> The debugging API below is a paid API. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=MakeSuperResolutionImage).',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## SDK reference'."\n"
.'For the image super-resolution feature under the Alibaba Cloud Visual AI Image Production category, we recommend that you use the SDK. The SDK supports multiple programming languages. When calling the SDK, select the SDK package for the Image Production (imageenhan) AI category. The SDK supports local files and arbitrary URLs for file parameters. For more information, see [SDK overview](~~145033~~).'."\n"
."\n"
.'## Sample code'."\n"
.'For sample code in common programming languages, see [Image super-resolution sample code](~~601502~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes of image super-resolution, see [Common error codes](~~145023~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [
['createdAt' => '2022-06-20T02:51:39.000Z', 'description' => 'Request parameters changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'MakeSuperResolutionImage'],
],
],
'ramActions' => [
[
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:MakeSuperResolutionImage',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'RemoveImageSubtitles' => [
'methods' => ['post'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'ImageURL',
'in' => 'formData',
'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).'."\n"
."\n"
.'> The URL cannot contain Chinese characters.', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/RemoveImageSubtitles/RemoveImageSubtitles1.jpg', 'title' => ''],
],
[
'name' => 'BX',
'in' => 'formData',
'schema' => ['description' => 'The ratio of the x-coordinate of the upper-left corner of the subtitle area to the image width. Valid values: 0 to 1.', 'type' => 'number', 'format' => 'float', 'required' => false, 'example' => '0', 'title' => ''],
],
[
'name' => 'BY',
'in' => 'formData',
'schema' => ['description' => 'The ratio of the y-coordinate of the upper-left corner of the subtitle area to the image height. Valid values: 0 to 1.', 'type' => 'number', 'format' => 'float', 'required' => false, 'example' => '0.75', 'title' => ''],
],
[
'name' => 'BW',
'in' => 'formData',
'schema' => ['description' => 'The ratio of the width of the subtitle area to the image width. Valid values: 0 to 1.', 'type' => 'number', 'format' => 'float', 'required' => false, 'example' => '1', 'title' => ''],
],
[
'name' => 'BH',
'in' => 'formData',
'schema' => ['description' => 'The ratio of the height of the subtitle area to the image height. Valid values: 0 to 1.', 'type' => 'number', 'format' => 'float', 'required' => false, 'example' => '0.25', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '939B2103-EE28-4F2D-9773-9A37AD00E5B7', 'title' => ''],
'Data' => [
'description' => 'The returned data.',
'type' => 'object',
'properties' => [
'ImageURL' => ['description' => 'The URL of the output image with subtitles removed.'."\n"
.'> This URL is a temporary URL that is valid for 30 minutes. After it expires, the URL is no longer accessible. To save the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://algo-app-aic-vd-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/image-desubtitle/2020-03-23-08/02%3A50-e8af2ea3-bddc-4ec8-b21c-493ee687465e.jpg?Expires=1584952370&OSSAccessKeyId=LTAI****************&Signature=qVnfWZJ2QtI9NRWQ410FsEFioq****', 'title' => ''],
],
'title' => '',
'example' => '',
],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'errorCodes' => [
400 => [
['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''],
],
403 => [
['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''],
],
408 => [
['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"939B2103-EE28-4F2D-9773-9A37AD00E5B7\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://algo-app-aic-vd-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/image-desubtitle/2020-03-23-08/02%3A50-e8af2ea3-bddc-4ec8-b21c-493ee687465e.jpg?Expires=1584952370&OSSAccessKeyId=LTAI****************&Signature=qVnfWZJ2QtI9NRWQ410FsEFioq****\\"\\n }\\n}","type":"json"}]',
'title' => 'Subtitle removal',
'summary' => 'This topic describes the syntax and examples of the subtitle removal feature (RemoveImageSubtitles).',
'description' => '## Feature description'."\n"
.'The subtitle removal feature can remove standard subtitles from images.'."\n"
."\n"
.'> - You can join [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get online help.'."\n"
.'- You can try this feature for free on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=RemoveImageSubtitles) to experience this feature or purchase it online.'."\n"
.'- For questions about API integration and usage of Alibaba Cloud Visual Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
."\n"
.'## Integration guide'."\n"
.'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete registration.'."\n"
.'2. Activate the service: Make sure you have activated the [Image Production service](https://vision.aliyun.com/imageenhan). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n"
.'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/RemoveImageSubtitles?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FRemoveImageSubtitles%2FRemoveImageSubtitles1.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development integration steps:'."\n"
.'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
.'- Find the SDK package for the Image Production (imageenhan) AI category in the corresponding SDK documentation and install it.'."\n"
.'- Modify the sample code provided in the References as needed and invoke the API.'."\n"
."\n"
.'6. Sample code: For sample code in commonly used languages, see [Subtitle removal sample code](~~601539~~).'."\n"
."\n"
.'7. Direct client calls: Common client call methods for this feature include the following.'."\n"
.'- [Direct call from web frontend](~~467779~~)'."\n"
.'- [Direct call from mini programs](~~467780~~)'."\n"
.'- [Direct call from Android](~~467781~~)'."\n"
.'- [Direct call from iOS](~~467782~~).'."\n"
."\n"
.'## Input limits'."\n"
."\n"
.'- Image format: JPG, JPEG, BMP, or PNG.'."\n"
.'- Image size: up to 3 MB.'."\n"
.'- The URL cannot contain Chinese characters.'."\n"
."\n"
.'## Billing description'."\n"
.'For information about the billable methods and pricing of subtitle removal, see [Billing overview](~~202482~~).'."\n"
."\n"
.'> The API operation below is a paid operation. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=RemoveImageSubtitles). The debug interface is a paid interface.',
'requestParamsDescription' => '> If you do not specify these parameters, bx, by, bw, and bh default to the bottom area of the video: bx=0, by=0.75, bw=1, bh=0.25.',
'responseParamsDescription' => '## SDK reference'."\n"
.'We recommend that you use an SDK to call the subtitle removal feature under the Visual AI Image Production category. Multiple programming languages are supported. Select the SDK package for the Image Production (imageenhan) AI category. File parameters support local files and URLs of any region when called through the SDK. For more information, see [SDK overview](~~145033~~).'."\n"
."\n"
.'## Sample code'."\n"
.'For sample code in commonly used languages, see [Subtitle removal sample code](~~601539~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes of the subtitle removal feature, see [Common error codes](~~145023~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the experience debugging feature are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [
['createdAt' => '2022-03-30T03:15:40.000Z', 'description' => 'Error codes changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RemoveImageSubtitles'],
],
],
'ramActions' => [
[
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:RemoveImageSubtitles',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'RemoveImageWatermark' => [
'methods' => ['post'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'ImageURL',
'in' => 'formData',
'schema' => ['description' => 'The URL of the image. We recommend that you use an OSS URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).'."\n"
."\n"
.'> The URL cannot contain Chinese characters.', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/RemoveImageWatermark/RemoveImageWatermark3.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '885070A7-E721-4062-99A0-80C0EBBF9406', 'title' => ''],
'Data' => [
'description' => 'The returned data.',
'type' => 'object',
'properties' => [
'ImageURL' => ['description' => 'The URL of the result image after logo removal.'."\n"
.'> This URL is a temporary URL that is valid for 30 minutes. After it expires, the URL is no longer accessible. To save the file for a longer period or permanently, access the URL within 30 minutes, download the file, and store it in your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://algo-app-aic-vd-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/image-delogo/2020-03-27-03/00%3A06-5a6f0a0f-c940-4955-af75-79e8267f1699.jpg?Expires=1585279806&OSSAccessKeyId=LTAI****************&Signature=R4OC2R5%2Fkw08XYFXmCWjgk7Y9N****', 'title' => ''],
],
'title' => '',
'example' => '',
],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'errorCodes' => [
400 => [
['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''],
],
403 => [
['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''],
],
408 => [
['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"885070A7-E721-4062-99A0-80C0EBBF9406\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://algo-app-aic-vd-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/image-delogo/2020-03-27-03/00%3A06-5a6f0a0f-c940-4955-af75-79e8267f1699.jpg?Expires=1585279806&OSSAccessKeyId=LTAI****************&Signature=R4OC2R5%2Fkw08XYFXmCWjgk7Y9N****\\"\\n }\\n}","type":"json"}]',
'title' => 'Remove image logos',
'summary' => 'Describes the syntax and provides examples for the RemoveImageWatermark operation for image logo removal.',
'description' => '## Feature description'."\n"
.'The image logo removal feature removes common logos from images, such as TV channel logos and Internet platform logos.'."\n"
."\n"
.'> - You can join [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get help from online support.'."\n"
.'- You can try this feature for free on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=RemoveImageWatermark) to try this feature or purchase it online.'."\n"
.'- To get help with API integration, usage, or other questions about the Alibaba Cloud Visual Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
."\n"
.'## Getting started'."\n"
.'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Sign Up** in the upper-right corner, and follow the instructions to create an account.'."\n"
.'2. Activate the service: Make sure you have activated the [Image Production service](https://vision.aliyun.com/imageenhan). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n"
.'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
.'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/RemoveImageWatermark?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FRemoveImageWatermark%2FRemoveImageWatermark1.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
.'5. Development integration steps:'."\n"
.'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
.'- Find the SDK package for the Image Production (imageenhan) AI category in the corresponding SDK documentation and install it.'."\n"
.'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
."\n"
.'6. Sample code: For sample code in common programming languages, see [Image flag removal sample code](~~601564~~).'."\n"
."\n"
.'7. Direct client calls: Common client call methods for this feature include the following.'."\n"
.'- [Direct call from web frontend](~~467779~~)'."\n"
.'- [Direct call from mini programs](~~467780~~)'."\n"
.'- [Direct call from Android](~~467781~~)'."\n"
.'- [Direct call from iOS](~~467782~~).'."\n"
."\n"
.'## Input limits'."\n"
."\n"
.'- Image format: JPG, JPEG, BMP, PNG, or WEBP.'."\n"
.'- Image size: up to 3 MB.'."\n"
.'- The URL cannot contain Chinese characters.'."\n"
."\n"
.'## Billing description'."\n"
.'For the billable methods and pricing of image flag removal, see [Billing overview](~~202482~~).'."\n"
."\n"
.'> The debugging operation below is a paid operation. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=RemoveImageWatermark).',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## SDK reference'."\n"
.'For the image logo removal feature under the Visual AI Image Production category, we recommend that you use the SDK. The SDK supports multiple programming languages. When calling the operation, select the SDK package for the Image Production (imageenhan) AI category. File parameters passed through the SDK support both local files and URLs. For more information, see [SDK overview](~~145033~~).'."\n"
."\n"
.'## Sample code'."\n"
.'For sample code in common programming languages, see [Image logo removal sample code](~~601564~~).',
'extraInfo' => '## Error codes'."\n"
.'For error codes of image logo removal, see [Common error codes](~~145023~~).'."\n"
."\n"
.'## Security notice'."\n"
.'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
.'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
'changeSet' => [
['createdAt' => '2022-03-30T03:15:40.000Z', 'description' => 'Error codes changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RemoveImageWatermark'],
],
],
'ramActions' => [
[
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:RemoveImageWatermark',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
],
'endpoints' => [
['regionId' => 'cn-shanghai', 'regionName' => 'China (Shanghai)', 'areaId' => 'asiaPacific', 'areaName' => 'Asia Pacific', 'public' => 'imageenhan.cn-shanghai.aliyuncs.com', 'endpoint' => 'imageenhan.cn-shanghai.aliyuncs.com', 'vpc' => 'imageenhan-vpc.cn-shanghai.aliyuncs.com'],
],
'errorCodes' => [],
'changeSet' => [
[
'apis' => [
['description' => 'Response parameters changed', 'api' => 'GenerateImageWithTextAndImage'],
['description' => 'Response parameters changed', 'api' => 'GenerateSuperResolutionImage'],
],
'createdAt' => '2024-02-20T02:48:46.000Z',
'description' => '',
],
[
'apis' => [
['description' => 'Response parameters changed', 'api' => 'GenerateCartoonizedImage'],
],
'createdAt' => '2024-02-20T02:45:47.000Z',
'description' => '',
],
[
'apis' => [
['description' => 'Request parameters changed', 'api' => 'GenerateCartoonizedImage'],
],
'createdAt' => '2023-12-27T06:30:21.000Z',
'description' => '',
],
[
'apis' => [
['description' => 'Request parameters changed', 'api' => 'ImitatePhotoStyle'],
],
'createdAt' => '2022-12-14T07:02:51.000Z',
'description' => '更改入参支持本地文件上传',
],
[
'apis' => [
['description' => 'Request parameters changed', 'api' => 'ErasePerson'],
],
'createdAt' => '2022-12-09T07:28:02.000Z',
'description' => '支持ErasePerson的UserMask字段本地上传',
],
[
'apis' => [
['description' => 'Response parameters changed', 'api' => 'RecolorHDImage'],
],
'createdAt' => '2022-10-17T02:06:53.000Z',
'description' => '修改异步任务Message为可见',
],
[
'apis' => [
['description' => 'Request parameters changed', 'api' => 'ExtendImageStyle'],
['description' => 'Request parameters changed', 'api' => 'ImageBlindCharacterWatermark'],
['description' => 'Request parameters changed', 'api' => 'ImageBlindPicWatermark'],
['description' => 'Request parameters changed', 'api' => 'RecolorImage'],
],
'createdAt' => '2022-09-29T07:58:31.000Z',
'description' => '多url参数支持本地文件上传',
],
[
'apis' => [
['description' => 'Request parameters changed', 'api' => 'MakeSuperResolutionImage'],
],
'createdAt' => '2022-06-20T02:52:08.000Z',
'description' => '新增入参参数',
],
[
'apis' => [
['description' => 'Error codes changed', 'api' => 'AssessComposition'],
['description' => 'Error codes changed', 'api' => 'AssessExposure'],
['description' => 'Error codes changed', 'api' => 'ChangeImageSize'],
],
'createdAt' => '2022-05-06T10:48:27.000Z',
'description' => '调整用户调用频率',
],
[
'apis' => [
['description' => 'Error codes changed', 'api' => 'GetAsyncJobResult'],
],
'createdAt' => '2022-04-24T08:16:49.000Z',
'description' => '调整GetAsyncJobResult单用户调用频率',
],
[
'apis' => [
['description' => 'Error codes changed', 'api' => 'EnhanceImageColor'],
['description' => 'Error codes changed', 'api' => 'ExtendImageStyle'],
['description' => 'Error codes changed', 'api' => 'ImageBlindCharacterWatermark'],
['description' => 'Error codes changed', 'api' => 'ImageBlindPicWatermark'],
['description' => 'Error codes changed', 'api' => 'ImitatePhotoStyle'],
['description' => 'Error codes changed', 'api' => 'IntelligentComposition'],
['description' => 'Error codes changed', 'api' => 'RecolorImage'],
['description' => 'Error codes changed', 'api' => 'RemoveImageSubtitles'],
['description' => 'Error codes changed', 'api' => 'RemoveImageWatermark'],
],
'createdAt' => '2022-03-30T09:08:05.000Z',
'description' => '调整用户调用频率',
],
[
'apis' => [
['description' => 'Error codes changed', 'api' => 'RecolorHDImage'],
],
'createdAt' => '2022-03-30T09:07:53.000Z',
'description' => '调整用户调用频率',
],
[
'apis' => [
['description' => 'OpenAPI offline', 'api' => 'AssessSharpness'],
],
'createdAt' => '2021-06-22T08:17:22.000Z',
'description' => 'api调用频率1000, 单用户频率100',
],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ExtendImageStyle'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GenerateCartoonizedImage'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ImageBlindCharacterWatermark'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GenerateSuperResolutionImage'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RemoveImageWatermark'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ImageBlindPicWatermark'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RemoveImageSubtitles'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecolorHDImage'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ColorizeImage'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecolorImage'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AssessComposition'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AssessSharpness'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ErasePerson'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetAsyncJobResult'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ImitatePhotoStyle'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ChangeImageSize'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'EnhanceImageColor'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AssessExposure'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'MakeSuperResolutionImage'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'IntelligentComposition'],
],
],
'ram' => [
'productCode' => 'VisualIntelligenceAPI',
'productName' => 'Visual Intelligence API',
'ramCodes' => ['viapi-imageseg', 'viapi-imageaudit', 'viapi-ocr', 'viapi-objectdet', 'viapi-imageenhan', 'viapi-videorecog', 'viapi-imageprocess', 'viapi', 'viapi-ekyc', 'viapi-imgsearch', 'viapi-goodstech', 'viapi-facebody', 'viapi-threedvision', 'viapi-videoenhan', 'viapi-imagerecog', 'viapi-videoseg', 'viapi-regen', 'viapi-aigen'],
'ramLevel' => 'SERVICE',
'ramConditions' => [],
'ramActions' => [
[
'apiName' => 'AssessSharpness',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:AssessSharpness',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'ColorizeImage',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:ColorizeImage',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'ImageBlindCharacterWatermark',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:ImageBlindCharacterWatermark',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'GenerateSuperResolutionImage',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:GenerateSuperResolutionImage',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'RemoveImageWatermark',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:RemoveImageWatermark',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'AssessExposure',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:AssessExposure',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'ImitatePhotoStyle',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:ImitatePhotoStyle',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'RecolorHDImage',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:RecolorHDImage',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'EnhanceImageColor',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:EnhanceImageColor',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'ImageBlindPicWatermark',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:ImageBlindPicWatermark',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'GetAsyncJobResult',
'description' => '',
'operationType' => 'get',
'ramAction' => [
'action' => 'viapi-imageenhan:GetAsyncJobResult',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'MakeSuperResolutionImage',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:MakeSuperResolutionImage',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'AssessComposition',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:AssessComposition',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'ChangeImageSize',
'description' => '',
'operationType' => 'update',
'ramAction' => [
'action' => 'viapi-imageenhan:ChangeImageSize',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'RemoveImageSubtitles',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:RemoveImageSubtitles',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'ExtendImageStyle',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:ExtendImageStyle',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'IntelligentComposition',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:IntelligentComposition',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'ErasePerson',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:ErasePerson',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'RecolorImage',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:RecolorImage',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'GenerateCartoonizedImage',
'description' => '',
'operationType' => '',
'ramAction' => [
'action' => 'viapi-imageenhan:GenerateCartoonizedImage',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
'resourceTypes' => [],
],
];
|