@digipair/skill-sharp 0.96.0 → 0.97.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/package.json +1 -1
  2. package/schema.fr.json +692 -560
  3. package/schema.json +905 -520
package/schema.json CHANGED
@@ -24,615 +24,1000 @@
24
24
  "type": "string"
25
25
  }
26
26
  }
27
- ]
28
- }
29
- },
30
- "/stats": {
31
- "post": {
32
- "tags": [
33
- "service"
34
27
  ],
35
- "summary": "Stats",
36
- "description": "Returns image statistics like mean and standard deviation",
37
- "parameters": [
38
- {
39
- "name": "content",
40
- "required": true,
41
- "schema": {
42
- "type": "string"
28
+ "responses": {
29
+ "200": {
30
+ "description": "Image metadata object",
31
+ "content": {
32
+ "application/json": {
33
+ "schema": {
34
+ "type": "object",
35
+ "properties": {
36
+ "width": {
37
+ "type": "number",
38
+ "description": "Image width in pixels"
39
+ },
40
+ "height": {
41
+ "type": "number",
42
+ "description": "Image height in pixels"
43
+ },
44
+ "channels": {
45
+ "type": "number",
46
+ "description": "Number of color channels"
47
+ },
48
+ "format": {
49
+ "type": "string",
50
+ "description": "Image format (jpeg, png, webp, etc.)"
51
+ },
52
+ "space": {
53
+ "type": "string",
54
+ "description": "Color space (srgb, rgb16, cmyk, etc.)"
55
+ },
56
+ "density": {
57
+ "type": "number",
58
+ "description": "Image density in pixels per inch"
59
+ },
60
+ "hasProfile": {
61
+ "type": "boolean",
62
+ "description": "Whether the image has an embedded color profile"
63
+ },
64
+ "hasAlpha": {
65
+ "type": "boolean",
66
+ "description": "Whether the image has an alpha channel"
67
+ }
68
+ }
69
+ "width": 1920,
70
+ "height": 1080,
71
+ "channels": 3,
72
+ "format": "jpeg",
73
+ "space": "srgb",
74
+ "density": 72,
75
+ "hasProfile": false,
76
+ "hasAlpha": false
77
+ }
78
+ }
43
79
  }
44
80
  }
45
- ]
81
+ }
46
82
  }
47
- },
48
- "/raw": {
49
- "post": {
50
- "tags": [
51
- "service"
52
- ],
53
- "summary": "Raw",
54
- "description": "Returns raw image buffer as base64",
55
- "parameters": [
56
- {
57
- "name": "content",
58
- "required": true,
59
- "schema": {
60
- "type": "string"
83
+ }
84
+ },
85
+ "/stats": {
86
+ "post": {
87
+ "tags": [
88
+ "service"
89
+ ],
90
+ "summary": "Stats",
91
+ "description": "Returns image statistics like mean and standard deviation",
92
+ "parameters": [
93
+ {
94
+ "name": "content",
95
+ "required": true,
96
+ "schema": {
97
+ "type": "string"
98
+ }
99
+ }
100
+ ],
101
+ "responses": {
102
+ "200": {
103
+ "description": "Image statistics object",
104
+ "content": {
105
+ "application/json": {
106
+ "schema": {
107
+ "type": "object",
108
+ "properties": {
109
+ "channels": {
110
+ "type": "array",
111
+ "items": {
112
+ "type": "object",
113
+ "properties": {
114
+ "min": {
115
+ "type": "number",
116
+ "description": "Minimum pixel value"
117
+ },
118
+ "max": {
119
+ "type": "number",
120
+ "description": "Maximum pixel value"
121
+ },
122
+ "sum": {
123
+ "type": "number",
124
+ "description": "Sum of all pixel values"
125
+ },
126
+ "squaresSum": {
127
+ "type": "number",
128
+ "description": "Sum of squared pixel values"
129
+ },
130
+ "mean": {
131
+ "type": "number",
132
+ "description": "Mean pixel value"
133
+ },
134
+ "stdev": {
135
+ "type": "number",
136
+ "description": "Standard deviation of pixel values"
137
+ }
138
+ }
139
+ }
140
+ }
141
+ }
142
+ "channels": [
143
+ {
144
+ "min": 0,
145
+ "max": 255,
146
+ "sum": 12345678,
147
+ "squaresSum": 987654321,
148
+ "mean": 128.5,
149
+ "stdev": 64.2
150
+ }
151
+ ]
152
+ }
61
153
  }
62
154
  }
63
- ]
155
+ }
64
156
  }
65
- },
66
- "/resize": {
67
- "post": {
68
- "tags": [
69
- "service"
70
- ],
71
- "summary": "Resize",
72
- "description": "Resizes the image",
73
- "parameters": [
74
- {
75
- "name": "content",
76
- "required": true,
77
- "schema": {
78
- "type": "string"
79
- }
80
- },
81
- {
82
- "name": "width",
83
- "required": true,
84
- "schema": {
85
- "type": "number"
86
- }
87
- },
88
- {
89
- "name": "height",
90
- "required": true,
91
- "schema": {
92
- "type": "number"
93
- }
94
- },
95
- {
96
- "name": "options",
97
- "required": false,
157
+ }
158
+ }
159
+ },
160
+ "/raw": {
161
+ "post": {
162
+ "tags": [
163
+ "service"
164
+ ],
165
+ "summary": "Raw",
166
+ "description": "Returns raw image buffer as base64",
167
+ "parameters": [
168
+ {
169
+ "name": "content",
170
+ "required": true,
171
+ "schema": {
172
+ "type": "string"
173
+ }
174
+ }
175
+ ],
176
+ "responses": {
177
+ "200": {
178
+ "description": "Raw image buffer as base64 string (without data URL prefix)",
179
+ "content": {
180
+ "application/json": {
98
181
  "schema": {
99
- "type": "object"
182
+ "type": "string",
183
+ "description": "Base64-encoded raw image buffer"
100
184
  }
101
185
  }
102
- ]
186
+ }
103
187
  }
104
- },
105
- "/rotate": {
106
- "post": {
107
- "tags": [
108
- "service"
109
- ],
110
- "summary": "Rotate",
111
- "description": "Rotates the image (angle optional)",
112
- "parameters": [
113
- {
114
- "name": "content",
115
- "required": true,
116
- "schema": {
117
- "type": "string"
118
- }
119
- },
120
- {
121
- "name": "angle",
122
- "required": false,
188
+ }
189
+ }
190
+ },
191
+ "/resize": {
192
+ "post": {
193
+ "tags": [
194
+ "service"
195
+ ],
196
+ "summary": "Resize",
197
+ "description": "Resizes the image",
198
+ "parameters": [
199
+ {
200
+ "name": "content",
201
+ "required": true,
202
+ "schema": {
203
+ "type": "string"
204
+ }
205
+ },
206
+ {
207
+ "name": "width",
208
+ "required": true,
209
+ "schema": {
210
+ "type": "number"
211
+ }
212
+ },
213
+ {
214
+ "name": "height",
215
+ "required": true,
216
+ "schema": {
217
+ "type": "number"
218
+ }
219
+ },
220
+ {
221
+ "name": "options",
222
+ "required": false,
223
+ "schema": {
224
+ "type": "object"
225
+ }
226
+ }
227
+ ],
228
+ "responses": {
229
+ "200": {
230
+ "description": "Resized image as base64-encoded data URL",
231
+ "content": {
232
+ "application/json": {
123
233
  "schema": {
124
- "type": "number"
234
+ "type": "string",
235
+ "description": "Base64-encoded image with data URL prefix"
125
236
  }
126
237
  }
127
- ]
238
+ }
128
239
  }
129
- },
130
- "/extract": {
131
- "post": {
132
- "tags": [
133
- "service"
134
- ],
135
- "summary": "Extract",
136
- "description": "Extracts a region from the image",
137
- "parameters": [
138
- {
139
- "name": "content",
140
- "required": true,
141
- "schema": {
142
- "type": "string"
143
- }
144
- },
145
- {
146
- "name": "left",
147
- "required": true,
148
- "schema": {
149
- "type": "number"
150
- }
151
- },
152
- {
153
- "name": "top",
154
- "required": true,
155
- "schema": {
156
- "type": "number"
157
- }
158
- },
159
- {
160
- "name": "width",
161
- "required": true,
162
- "schema": {
163
- "type": "number"
164
- }
165
- },
166
- {
167
- "name": "height",
168
- "required": true,
240
+ }
241
+ }
242
+ },
243
+ "/rotate": {
244
+ "post": {
245
+ "tags": [
246
+ "service"
247
+ ],
248
+ "summary": "Rotate",
249
+ "description": "Rotates the image (angle optional)",
250
+ "parameters": [
251
+ {
252
+ "name": "content",
253
+ "required": true,
254
+ "schema": {
255
+ "type": "string"
256
+ }
257
+ },
258
+ {
259
+ "name": "angle",
260
+ "required": false,
261
+ "schema": {
262
+ "type": "number"
263
+ }
264
+ }
265
+ ],
266
+ "responses": {
267
+ "200": {
268
+ "description": "Rotated image as base64-encoded data URL",
269
+ "content": {
270
+ "application/json": {
169
271
  "schema": {
170
- "type": "number"
272
+ "type": "string",
273
+ "description": "Base64-encoded image with data URL prefix"
171
274
  }
172
275
  }
173
- ]
276
+ }
174
277
  }
175
- },
176
- "/flip": {
177
- "post": {
178
- "tags": [
179
- "service"
180
- ],
181
- "summary": "Flip",
182
- "description": "Flips the image vertically",
183
- "parameters": [
184
- {
185
- "name": "content",
186
- "required": true,
278
+ }
279
+ }
280
+ },
281
+ "/extract": {
282
+ "post": {
283
+ "tags": [
284
+ "service"
285
+ ],
286
+ "summary": "Extract",
287
+ "description": "Extracts a region from the image",
288
+ "parameters": [
289
+ {
290
+ "name": "content",
291
+ "required": true,
292
+ "schema": {
293
+ "type": "string"
294
+ }
295
+ },
296
+ {
297
+ "name": "left",
298
+ "required": true,
299
+ "schema": {
300
+ "type": "number"
301
+ }
302
+ },
303
+ {
304
+ "name": "top",
305
+ "required": true,
306
+ "schema": {
307
+ "type": "number"
308
+ }
309
+ },
310
+ {
311
+ "name": "width",
312
+ "required": true,
313
+ "schema": {
314
+ "type": "number"
315
+ }
316
+ },
317
+ {
318
+ "name": "height",
319
+ "required": true,
320
+ "schema": {
321
+ "type": "number"
322
+ }
323
+ }
324
+ ],
325
+ "responses": {
326
+ "200": {
327
+ "description": "Extracted image region as base64-encoded data URL",
328
+ "content": {
329
+ "application/json": {
187
330
  "schema": {
188
- "type": "string"
331
+ "type": "string",
332
+ "description": "Base64-encoded image with data URL prefix"
189
333
  }
190
334
  }
191
- ]
335
+ }
192
336
  }
193
- },
194
- "/flop": {
195
- "post": {
196
- "tags": [
197
- "service"
198
- ],
199
- "summary": "Flop",
200
- "description": "Flips the image horizontally",
201
- "parameters": [
202
- {
203
- "name": "content",
204
- "required": true,
337
+ }
338
+ }
339
+ },
340
+ "/flip": {
341
+ "post": {
342
+ "tags": [
343
+ "service"
344
+ ],
345
+ "summary": "Flip",
346
+ "description": "Flips the image vertically",
347
+ "parameters": [
348
+ {
349
+ "name": "content",
350
+ "required": true,
351
+ "schema": {
352
+ "type": "string"
353
+ }
354
+ }
355
+ ],
356
+ "responses": {
357
+ "200": {
358
+ "description": "Vertically flipped image as base64-encoded data URL",
359
+ "content": {
360
+ "application/json": {
205
361
  "schema": {
206
- "type": "string"
362
+ "type": "string",
363
+ "description": "Base64-encoded image with data URL prefix"
207
364
  }
208
365
  }
209
- ]
366
+ }
210
367
  }
211
- },
212
- "/autoOrient": {
213
- "post": {
214
- "tags": [
215
- "service"
216
- ],
217
- "summary": "Auto Orient",
218
- "description": "Automatically orients the image based on EXIF data",
219
- "parameters": [
220
- {
221
- "name": "content",
222
- "required": true,
368
+ }
369
+ }
370
+ },
371
+ "/flop": {
372
+ "post": {
373
+ "tags": [
374
+ "service"
375
+ ],
376
+ "summary": "Flop",
377
+ "description": "Flips the image horizontally",
378
+ "parameters": [
379
+ {
380
+ "name": "content",
381
+ "required": true,
382
+ "schema": {
383
+ "type": "string"
384
+ }
385
+ }
386
+ ],
387
+ "responses": {
388
+ "200": {
389
+ "description": "Horizontally flipped image as base64-encoded data URL",
390
+ "content": {
391
+ "application/json": {
223
392
  "schema": {
224
- "type": "string"
393
+ "type": "string",
394
+ "description": "Base64-encoded image with data URL prefix"
225
395
  }
226
396
  }
227
- ]
397
+ }
228
398
  }
229
- },
230
- "/grayscale": {
231
- "post": {
232
- "tags": [
233
- "service"
234
- ],
235
- "summary": "Grayscale",
236
- "description": "Converts the image to grayscale",
237
- "parameters": [
238
- {
239
- "name": "content",
240
- "required": true,
399
+ }
400
+ }
401
+ },
402
+ "/autoOrient": {
403
+ "post": {
404
+ "tags": [
405
+ "service"
406
+ ],
407
+ "summary": "Auto Orient",
408
+ "description": "Automatically orients the image based on EXIF data",
409
+ "parameters": [
410
+ {
411
+ "name": "content",
412
+ "required": true,
413
+ "schema": {
414
+ "type": "string"
415
+ }
416
+ }
417
+ ],
418
+ "responses": {
419
+ "200": {
420
+ "description": "Auto-oriented image as base64-encoded data URL",
421
+ "content": {
422
+ "application/json": {
241
423
  "schema": {
242
- "type": "string"
424
+ "type": "string",
425
+ "description": "Base64-encoded image with data URL prefix"
243
426
  }
244
427
  }
245
- ]
428
+ }
246
429
  }
247
- },
248
- "/linear": {
249
- "post": {
250
- "tags": [
251
- "service"
252
- ],
253
- "summary": "Linear",
254
- "description": "Applies a linear transformation to the image",
255
- "parameters": [
256
- {
257
- "name": "content",
258
- "required": true,
259
- "schema": {
260
- "type": "string"
261
- }
262
- },
263
- {
264
- "name": "multiplier",
265
- "required": true,
266
- "schema": {
267
- "type": "number"
268
- }
269
- },
270
- {
271
- "name": "offset",
272
- "required": true,
430
+ }
431
+ }
432
+ },
433
+ "/grayscale": {
434
+ "post": {
435
+ "tags": [
436
+ "service"
437
+ ],
438
+ "summary": "Grayscale",
439
+ "description": "Converts the image to grayscale",
440
+ "parameters": [
441
+ {
442
+ "name": "content",
443
+ "required": true,
444
+ "schema": {
445
+ "type": "string"
446
+ }
447
+ }
448
+ ],
449
+ "responses": {
450
+ "200": {
451
+ "description": "Grayscale image as base64-encoded data URL",
452
+ "content": {
453
+ "application/json": {
273
454
  "schema": {
274
- "type": "number"
455
+ "type": "string",
456
+ "description": "Base64-encoded image with data URL prefix"
275
457
  }
276
458
  }
277
- ]
459
+ }
278
460
  }
279
- },
280
- "/threshold": {
281
- "post": {
282
- "tags": [
283
- "service"
284
- ],
285
- "summary": "Threshold",
286
- "description": "Applies a threshold to the image to convert it to black and white.",
287
- "parameters": [
288
- {
289
- "name": "content",
290
- "required": true,
291
- "schema": {
292
- "type": "string"
293
- }
294
- },
295
- {
296
- "name": "level",
297
- "required": false,
298
- "schema": {
299
- "type": "number",
300
- "default": 128
301
- }
302
- },
303
- {
304
- "name": "option",
305
- "required": false,
461
+ }
462
+ }
463
+ },
464
+ "/linear": {
465
+ "post": {
466
+ "tags": [
467
+ "service"
468
+ ],
469
+ "summary": "Linear",
470
+ "description": "Applies a linear transformation to the image",
471
+ "parameters": [
472
+ {
473
+ "name": "content",
474
+ "required": true,
475
+ "schema": {
476
+ "type": "string"
477
+ }
478
+ },
479
+ {
480
+ "name": "multiplier",
481
+ "required": true,
482
+ "schema": {
483
+ "type": "number"
484
+ }
485
+ },
486
+ {
487
+ "name": "offset",
488
+ "required": true,
489
+ "schema": {
490
+ "type": "number"
491
+ }
492
+ }
493
+ ],
494
+ "responses": {
495
+ "200": {
496
+ "description": "Linear transformed image as base64-encoded data URL",
497
+ "content": {
498
+ "application/json": {
306
499
  "schema": {
307
- "type": "object"
500
+ "type": "string",
501
+ "description": "Base64-encoded image with data URL prefix"
308
502
  }
309
503
  }
310
- ]
504
+ }
311
505
  }
312
- },
313
- "/negate": {
314
- "post": {
315
- "tags": [
316
- "service"
317
- ],
318
- "summary": "Negate",
319
- "description": "Inverts the image colors",
320
- "parameters": [
321
- {
322
- "name": "content",
323
- "required": true,
506
+ }
507
+ }
508
+ },
509
+ "/threshold": {
510
+ "post": {
511
+ "tags": [
512
+ "service"
513
+ ],
514
+ "summary": "Threshold",
515
+ "description": "Applies a threshold to the image to convert it to black and white.",
516
+ "parameters": [
517
+ {
518
+ "name": "content",
519
+ "required": true,
520
+ "schema": {
521
+ "type": "string"
522
+ }
523
+ },
524
+ {
525
+ "name": "level",
526
+ "required": false,
527
+ "schema": {
528
+ "type": "number",
529
+ "default": 128
530
+ }
531
+ },
532
+ {
533
+ "name": "option",
534
+ "required": false,
535
+ "schema": {
536
+ "type": "object"
537
+ }
538
+ }
539
+ ],
540
+ "responses": {
541
+ "200": {
542
+ "description": "Thresholded black and white image as base64-encoded data URL",
543
+ "content": {
544
+ "application/json": {
324
545
  "schema": {
325
- "type": "string"
546
+ "type": "string",
547
+ "description": "Base64-encoded image with data URL prefix"
326
548
  }
327
549
  }
328
- ]
550
+ }
329
551
  }
330
- },
331
- "/tint": {
332
- "post": {
333
- "tags": [
334
- "service"
335
- ],
336
- "summary": "Tint",
337
- "description": "Applies a color tint",
338
- "parameters": [
339
- {
340
- "name": "content",
341
- "required": true,
342
- "schema": {
343
- "type": "string"
344
- }
345
- },
346
- {
347
- "name": "r",
348
- "required": true,
349
- "schema": {
350
- "type": "number"
351
- }
352
- },
353
- {
354
- "name": "g",
355
- "required": true,
356
- "schema": {
357
- "type": "number"
358
- }
359
- },
360
- {
361
- "name": "b",
362
- "required": true,
552
+ }
553
+ }
554
+ },
555
+ "/negate": {
556
+ "post": {
557
+ "tags": [
558
+ "service"
559
+ ],
560
+ "summary": "Negate",
561
+ "description": "Inverts the image colors",
562
+ "parameters": [
563
+ {
564
+ "name": "content",
565
+ "required": true,
566
+ "schema": {
567
+ "type": "string"
568
+ }
569
+ }
570
+ ],
571
+ "responses": {
572
+ "200": {
573
+ "description": "Color-inverted image as base64-encoded data URL",
574
+ "content": {
575
+ "application/json": {
363
576
  "schema": {
364
- "type": "number"
577
+ "type": "string",
578
+ "description": "Base64-encoded image with data URL prefix"
365
579
  }
366
580
  }
367
- ]
581
+ }
368
582
  }
369
- },
370
- "/modulate": {
371
- "post": {
372
- "tags": [
373
- "service"
374
- ],
375
- "summary": "Modulate",
376
- "description": "Adjusts brightness, saturation and hue",
377
- "parameters": [
378
- {
379
- "name": "content",
380
- "required": true,
381
- "schema": {
382
- "type": "string"
383
- }
384
- },
385
- {
386
- "name": "brightness",
387
- "required": false,
388
- "schema": {
389
- "type": "number"
390
- }
391
- },
392
- {
393
- "name": "saturation",
394
- "required": false,
395
- "schema": {
396
- "type": "number"
397
- }
398
- },
399
- {
400
- "name": "hue",
401
- "required": false,
583
+ }
584
+ }
585
+ },
586
+ "/tint": {
587
+ "post": {
588
+ "tags": [
589
+ "service"
590
+ ],
591
+ "summary": "Tint",
592
+ "description": "Applies a color tint",
593
+ "parameters": [
594
+ {
595
+ "name": "content",
596
+ "required": true,
597
+ "schema": {
598
+ "type": "string"
599
+ }
600
+ },
601
+ {
602
+ "name": "r",
603
+ "required": true,
604
+ "schema": {
605
+ "type": "number"
606
+ }
607
+ },
608
+ {
609
+ "name": "g",
610
+ "required": true,
611
+ "schema": {
612
+ "type": "number"
613
+ }
614
+ },
615
+ {
616
+ "name": "b",
617
+ "required": true,
618
+ "schema": {
619
+ "type": "number"
620
+ }
621
+ }
622
+ ],
623
+ "responses": {
624
+ "200": {
625
+ "description": "Color-tinted image as base64-encoded data URL",
626
+ "content": {
627
+ "application/json": {
402
628
  "schema": {
403
- "type": "number"
629
+ "type": "string",
630
+ "description": "Base64-encoded image with data URL prefix"
404
631
  }
405
632
  }
406
- ]
633
+ }
407
634
  }
408
- },
409
- "/blur": {
410
- "post": {
411
- "tags": [
412
- "service"
413
- ],
414
- "summary": "Blur",
415
- "description": "Applies a blur effect",
416
- "parameters": [
417
- {
418
- "name": "content",
419
- "required": true,
420
- "schema": {
421
- "type": "string"
422
- }
423
- },
424
- {
425
- "name": "radius",
426
- "required": false,
635
+ }
636
+ }
637
+ },
638
+ "/modulate": {
639
+ "post": {
640
+ "tags": [
641
+ "service"
642
+ ],
643
+ "summary": "Modulate",
644
+ "description": "Adjusts brightness, saturation and hue",
645
+ "parameters": [
646
+ {
647
+ "name": "content",
648
+ "required": true,
649
+ "schema": {
650
+ "type": "string"
651
+ }
652
+ },
653
+ {
654
+ "name": "brightness",
655
+ "required": false,
656
+ "schema": {
657
+ "type": "number"
658
+ }
659
+ },
660
+ {
661
+ "name": "saturation",
662
+ "required": false,
663
+ "schema": {
664
+ "type": "number"
665
+ }
666
+ },
667
+ {
668
+ "name": "hue",
669
+ "required": false,
670
+ "schema": {
671
+ "type": "number"
672
+ }
673
+ }
674
+ ],
675
+ "responses": {
676
+ "200": {
677
+ "description": "Modulated image with adjusted brightness/saturation/hue as base64-encoded data URL",
678
+ "content": {
679
+ "application/json": {
427
680
  "schema": {
428
- "type": "number"
681
+ "type": "string",
682
+ "description": "Base64-encoded image with data URL prefix"
429
683
  }
430
684
  }
431
- ]
685
+ }
432
686
  }
433
- },
434
- "/sharpen": {
435
- "post": {
436
- "tags": [
437
- "service"
438
- ],
439
- "summary": "Sharpen",
440
- "description": "Sharpens the image",
441
- "parameters": [
442
- {
443
- "name": "content",
444
- "required": true,
687
+ }
688
+ }
689
+ },
690
+ "/blur": {
691
+ "post": {
692
+ "tags": [
693
+ "service"
694
+ ],
695
+ "summary": "Blur",
696
+ "description": "Applies a blur effect",
697
+ "parameters": [
698
+ {
699
+ "name": "content",
700
+ "required": true,
701
+ "schema": {
702
+ "type": "string"
703
+ }
704
+ },
705
+ {
706
+ "name": "radius",
707
+ "required": false,
708
+ "schema": {
709
+ "type": "number"
710
+ }
711
+ }
712
+ ],
713
+ "responses": {
714
+ "200": {
715
+ "description": "Blurred image as base64-encoded data URL",
716
+ "content": {
717
+ "application/json": {
445
718
  "schema": {
446
- "type": "string"
719
+ "type": "string",
720
+ "description": "Base64-encoded image with data URL prefix"
447
721
  }
448
722
  }
449
- ]
723
+ }
450
724
  }
451
- },
452
- "/toFormat": {
453
- "post": {
454
- "tags": [
455
- "service"
456
- ],
457
- "summary": "To Format",
458
- "description": "Converts the image to a different format",
459
- "parameters": [
460
- {
461
- "name": "content",
462
- "required": true,
463
- "schema": {
464
- "type": "string"
465
- }
466
- },
467
- {
468
- "name": "format",
469
- "required": true,
470
- "description": "jpeg, png, webp, avif",
725
+ }
726
+ }
727
+ },
728
+ "/sharpen": {
729
+ "post": {
730
+ "tags": [
731
+ "service"
732
+ ],
733
+ "summary": "Sharpen",
734
+ "description": "Sharpens the image",
735
+ "parameters": [
736
+ {
737
+ "name": "content",
738
+ "required": true,
739
+ "schema": {
740
+ "type": "string"
741
+ }
742
+ }
743
+ ],
744
+ "responses": {
745
+ "200": {
746
+ "description": "Sharpened image as base64-encoded data URL",
747
+ "content": {
748
+ "application/json": {
471
749
  "schema": {
472
750
  "type": "string",
473
- "enum": [
474
- "jpeg",
475
- "png",
476
- "webp",
477
- "avif"
478
- ]
751
+ "description": "Base64-encoded image with data URL prefix"
479
752
  }
480
753
  }
481
- ]
754
+ }
482
755
  }
483
- },
484
- "/jpeg": {
485
- "post": {
486
- "tags": [
487
- "service"
488
- ],
489
- "summary": "JPEG",
490
- "description": "Exports the image as JPEG",
491
- "parameters": [
492
- {
493
- "name": "content",
494
- "required": true,
495
- "schema": {
496
- "type": "string"
497
- }
498
- },
499
- {
500
- "name": "quality",
501
- "required": false,
756
+ }
757
+ }
758
+ },
759
+ "/toFormat": {
760
+ "post": {
761
+ "tags": [
762
+ "service"
763
+ ],
764
+ "summary": "To Format",
765
+ "description": "Converts the image to a different format",
766
+ "parameters": [
767
+ {
768
+ "name": "content",
769
+ "required": true,
770
+ "schema": {
771
+ "type": "string"
772
+ }
773
+ },
774
+ {
775
+ "name": "format",
776
+ "required": true,
777
+ "description": "jpeg, png, webp, avif",
778
+ "schema": {
779
+ "type": "string",
780
+ "enum": [
781
+ "jpeg",
782
+ "png",
783
+ "webp",
784
+ "avif"
785
+ ]
786
+ }
787
+ }
788
+ ],
789
+ "responses": {
790
+ "200": {
791
+ "description": "Format-converted image as base64-encoded data URL",
792
+ "content": {
793
+ "application/json": {
502
794
  "schema": {
503
- "type": "number",
504
- "default": 80
795
+ "type": "string",
796
+ "description": "Base64-encoded image with data URL prefix in the specified format"
505
797
  }
506
798
  }
507
- ]
799
+ }
508
800
  }
509
- },
510
- "/png": {
511
- "post": {
512
- "tags": [
513
- "service"
514
- ],
515
- "summary": "PNG",
516
- "description": "Exports the image as PNG",
517
- "parameters": [
518
- {
519
- "name": "content",
520
- "required": true,
521
- "schema": {
522
- "type": "string"
523
- }
524
- },
525
- {
526
- "name": "compressionLevel",
527
- "required": false,
801
+ }
802
+ }
803
+ },
804
+ "/jpeg": {
805
+ "post": {
806
+ "tags": [
807
+ "service"
808
+ ],
809
+ "summary": "JPEG",
810
+ "description": "Exports the image as JPEG",
811
+ "parameters": [
812
+ {
813
+ "name": "content",
814
+ "required": true,
815
+ "schema": {
816
+ "type": "string"
817
+ }
818
+ },
819
+ {
820
+ "name": "quality",
821
+ "required": false,
822
+ "schema": {
823
+ "type": "number",
824
+ "default": 80
825
+ }
826
+ }
827
+ ],
828
+ "responses": {
829
+ "200": {
830
+ "description": "JPEG-encoded image as base64-encoded data URL",
831
+ "content": {
832
+ "application/json": {
528
833
  "schema": {
529
- "type": "number",
530
- "default": 6
834
+ "type": "string",
835
+ "description": "Base64-encoded JPEG image with data URL prefix"
531
836
  }
532
837
  }
533
- ]
838
+ }
534
839
  }
535
- },
536
- "/webp": {
537
- "post": {
538
- "tags": [
539
- "service"
540
- ],
541
- "summary": "WebP",
542
- "description": "Exports the image as WebP",
543
- "parameters": [
544
- {
545
- "name": "content",
546
- "required": true,
547
- "schema": {
548
- "type": "string"
549
- }
550
- },
551
- {
552
- "name": "quality",
553
- "required": false,
840
+ }
841
+ }
842
+ },
843
+ "/png": {
844
+ "post": {
845
+ "tags": [
846
+ "service"
847
+ ],
848
+ "summary": "PNG",
849
+ "description": "Exports the image as PNG",
850
+ "parameters": [
851
+ {
852
+ "name": "content",
853
+ "required": true,
854
+ "schema": {
855
+ "type": "string"
856
+ }
857
+ },
858
+ {
859
+ "name": "compressionLevel",
860
+ "required": false,
861
+ "schema": {
862
+ "type": "number",
863
+ "default": 6
864
+ }
865
+ }
866
+ ],
867
+ "responses": {
868
+ "200": {
869
+ "description": "PNG-encoded image as base64-encoded data URL",
870
+ "content": {
871
+ "application/json": {
554
872
  "schema": {
555
- "type": "number",
556
- "default": 80
873
+ "type": "string",
874
+ "description": "Base64-encoded PNG image with data URL prefix"
557
875
  }
558
876
  }
559
- ]
877
+ }
560
878
  }
561
- },
562
- "/avif": {
563
- "post": {
564
- "tags": [
565
- "service"
566
- ],
567
- "summary": "AVIF",
568
- "description": "Exports the image as AVIF",
569
- "parameters": [
570
- {
571
- "name": "content",
572
- "required": true,
573
- "schema": {
574
- "type": "string"
575
- }
576
- },
577
- {
578
- "name": "quality",
579
- "required": false,
879
+ }
880
+ }
881
+ },
882
+ "/webp": {
883
+ "post": {
884
+ "tags": [
885
+ "service"
886
+ ],
887
+ "summary": "WebP",
888
+ "description": "Exports the image as WebP",
889
+ "parameters": [
890
+ {
891
+ "name": "content",
892
+ "required": true,
893
+ "schema": {
894
+ "type": "string"
895
+ }
896
+ },
897
+ {
898
+ "name": "quality",
899
+ "required": false,
900
+ "schema": {
901
+ "type": "number",
902
+ "default": 80
903
+ }
904
+ }
905
+ ],
906
+ "responses": {
907
+ "200": {
908
+ "description": "WebP-encoded image as base64-encoded data URL",
909
+ "content": {
910
+ "application/json": {
580
911
  "schema": {
581
- "type": "number",
582
- "default": 50
912
+ "type": "string",
913
+ "description": "Base64-encoded WebP image with data URL prefix"
583
914
  }
584
915
  }
585
- ]
916
+ }
586
917
  }
587
- },
588
- "/composite": {
589
- "post": {
590
- "tags": [
591
- "service"
592
- ],
593
- "summary": "Composite",
594
- "description": "Overlays other images (e.g. watermark)",
595
- "parameters": [
596
- {
597
- "name": "content",
598
- "required": true,
918
+ }
919
+ }
920
+ },
921
+ "/avif": {
922
+ "post": {
923
+ "tags": [
924
+ "service"
925
+ ],
926
+ "summary": "AVIF",
927
+ "description": "Exports the image as AVIF",
928
+ "parameters": [
929
+ {
930
+ "name": "content",
931
+ "required": true,
932
+ "schema": {
933
+ "type": "string"
934
+ }
935
+ },
936
+ {
937
+ "name": "quality",
938
+ "required": false,
939
+ "schema": {
940
+ "type": "number",
941
+ "default": 50
942
+ }
943
+ }
944
+ ],
945
+ "responses": {
946
+ "200": {
947
+ "description": "AVIF-encoded image as base64-encoded data URL",
948
+ "content": {
949
+ "application/json": {
599
950
  "schema": {
600
- "type": "string"
951
+ "type": "string",
952
+ "description": "Base64-encoded AVIF image with data URL prefix"
601
953
  }
602
- },
603
- {
604
- "name": "overlays",
605
- "required": true,
606
- "description": "Array of { input (base64), top, left }",
607
- "schema": {
608
- "type": "array",
609
- "items": {
610
- "type": "object",
611
- "properties": {
612
- "input": {
613
- "type": "string"
614
- },
615
- "top": {
616
- "type": "number"
617
- },
618
- "left": {
619
- "type": "number"
620
- }
621
- },
622
- "required": [
623
- "input",
624
- "top",
625
- "left"
626
- ]
954
+ }
955
+ }
956
+ }
957
+ }
958
+ }
959
+ },
960
+ "/composite": {
961
+ "post": {
962
+ "tags": [
963
+ "service"
964
+ ],
965
+ "summary": "Composite",
966
+ "description": "Overlays other images (e.g. watermark)",
967
+ "parameters": [
968
+ {
969
+ "name": "content",
970
+ "required": true,
971
+ "schema": {
972
+ "type": "string"
973
+ }
974
+ },
975
+ {
976
+ "name": "overlays",
977
+ "required": true,
978
+ "description": "Array of { input (base64), top, left }",
979
+ "schema": {
980
+ "type": "array",
981
+ "items": {
982
+ "type": "object",
983
+ "properties": {
984
+ "input": {
985
+ "type": "string"
986
+ },
987
+ "top": {
988
+ "type": "number"
989
+ },
990
+ "left": {
991
+ "type": "number"
627
992
  }
993
+ },
994
+ "required": [
995
+ "input",
996
+ "top",
997
+ "left"
998
+ ]
999
+ }
1000
+ }
1001
+ }
1002
+ ],
1003
+ "responses": {
1004
+ "200": {
1005
+ "description": "Composite image with overlays as base64-encoded data URL",
1006
+ "content": {
1007
+ "application/json": {
1008
+ "schema": {
1009
+ "type": "string",
1010
+ "description": "Base64-encoded image with overlays applied and data URL prefix"
628
1011
  }
629
1012
  }
630
- ]
1013
+ }
631
1014
  }
632
1015
  }
633
- },
634
- "components": {
635
- "schemas": {}
636
- },
637
- "x-scene-blocks": {}
1016
+ }
1017
+ }
1018
+ },
1019
+ "components": {
1020
+ "schemas": {}
1021
+ },
1022
+ "x-scene-blocks": {}
638
1023
  }