@digipair/skill-sharp 0.95.7 → 0.97.0

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.
package/schema.json CHANGED
@@ -24,597 +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
- "/grayscale": {
213
- "post": {
214
- "tags": [
215
- "service"
216
- ],
217
- "summary": "Grayscale",
218
- "description": "Converts the image to grayscale",
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
- "/linear": {
231
- "post": {
232
- "tags": [
233
- "service"
234
- ],
235
- "summary": "Linear",
236
- "description": "Applies a linear transformation to the image",
237
- "parameters": [
238
- {
239
- "name": "content",
240
- "required": true,
241
- "schema": {
242
- "type": "string"
243
- }
244
- },
245
- {
246
- "name": "multiplier",
247
- "required": true,
248
- "schema": {
249
- "type": "number"
250
- }
251
- },
252
- {
253
- "name": "offset",
254
- "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": {
255
423
  "schema": {
256
- "type": "number"
424
+ "type": "string",
425
+ "description": "Base64-encoded image with data URL prefix"
257
426
  }
258
427
  }
259
- ]
428
+ }
260
429
  }
261
- },
262
- "/threshold": {
263
- "post": {
264
- "tags": [
265
- "service"
266
- ],
267
- "summary": "Threshold",
268
- "description": "Applies a threshold to the image to convert it to black and white.",
269
- "parameters": [
270
- {
271
- "name": "content",
272
- "required": true,
273
- "schema": {
274
- "type": "string"
275
- }
276
- },
277
- {
278
- "name": "level",
279
- "required": false,
280
- "schema": {
281
- "type": "number",
282
- "default": 128
283
- }
284
- },
285
- {
286
- "name": "option",
287
- "required": false,
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": {
288
454
  "schema": {
289
- "type": "object"
455
+ "type": "string",
456
+ "description": "Base64-encoded image with data URL prefix"
290
457
  }
291
458
  }
292
- ]
459
+ }
293
460
  }
294
- },
295
- "/negate": {
296
- "post": {
297
- "tags": [
298
- "service"
299
- ],
300
- "summary": "Negate",
301
- "description": "Inverts the image colors",
302
- "parameters": [
303
- {
304
- "name": "content",
305
- "required": true,
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": "string"
500
+ "type": "string",
501
+ "description": "Base64-encoded image with data URL prefix"
308
502
  }
309
503
  }
310
- ]
504
+ }
311
505
  }
312
- },
313
- "/tint": {
314
- "post": {
315
- "tags": [
316
- "service"
317
- ],
318
- "summary": "Tint",
319
- "description": "Applies a color tint",
320
- "parameters": [
321
- {
322
- "name": "content",
323
- "required": true,
324
- "schema": {
325
- "type": "string"
326
- }
327
- },
328
- {
329
- "name": "r",
330
- "required": true,
331
- "schema": {
332
- "type": "number"
333
- }
334
- },
335
- {
336
- "name": "g",
337
- "required": true,
338
- "schema": {
339
- "type": "number"
340
- }
341
- },
342
- {
343
- "name": "b",
344
- "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": {
345
545
  "schema": {
346
- "type": "number"
546
+ "type": "string",
547
+ "description": "Base64-encoded image with data URL prefix"
347
548
  }
348
549
  }
349
- ]
550
+ }
350
551
  }
351
- },
352
- "/modulate": {
353
- "post": {
354
- "tags": [
355
- "service"
356
- ],
357
- "summary": "Modulate",
358
- "description": "Adjusts brightness, saturation and hue",
359
- "parameters": [
360
- {
361
- "name": "content",
362
- "required": true,
363
- "schema": {
364
- "type": "string"
365
- }
366
- },
367
- {
368
- "name": "brightness",
369
- "required": false,
370
- "schema": {
371
- "type": "number"
372
- }
373
- },
374
- {
375
- "name": "saturation",
376
- "required": false,
377
- "schema": {
378
- "type": "number"
379
- }
380
- },
381
- {
382
- "name": "hue",
383
- "required": false,
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": {
384
576
  "schema": {
385
- "type": "number"
577
+ "type": "string",
578
+ "description": "Base64-encoded image with data URL prefix"
386
579
  }
387
580
  }
388
- ]
581
+ }
389
582
  }
390
- },
391
- "/blur": {
392
- "post": {
393
- "tags": [
394
- "service"
395
- ],
396
- "summary": "Blur",
397
- "description": "Applies a blur effect",
398
- "parameters": [
399
- {
400
- "name": "content",
401
- "required": true,
402
- "schema": {
403
- "type": "string"
404
- }
405
- },
406
- {
407
- "name": "radius",
408
- "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": {
409
628
  "schema": {
410
- "type": "number"
629
+ "type": "string",
630
+ "description": "Base64-encoded image with data URL prefix"
411
631
  }
412
632
  }
413
- ]
633
+ }
414
634
  }
415
- },
416
- "/sharpen": {
417
- "post": {
418
- "tags": [
419
- "service"
420
- ],
421
- "summary": "Sharpen",
422
- "description": "Sharpens the image",
423
- "parameters": [
424
- {
425
- "name": "content",
426
- "required": true,
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": "string"
681
+ "type": "string",
682
+ "description": "Base64-encoded image with data URL prefix"
429
683
  }
430
684
  }
431
- ]
685
+ }
432
686
  }
433
- },
434
- "/toFormat": {
435
- "post": {
436
- "tags": [
437
- "service"
438
- ],
439
- "summary": "To Format",
440
- "description": "Converts the image to a different format",
441
- "parameters": [
442
- {
443
- "name": "content",
444
- "required": true,
445
- "schema": {
446
- "type": "string"
447
- }
448
- },
449
- {
450
- "name": "format",
451
- "required": true,
452
- "description": "jpeg, png, webp, avif",
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": {
453
718
  "schema": {
454
719
  "type": "string",
455
- "enum": [
456
- "jpeg",
457
- "png",
458
- "webp",
459
- "avif"
460
- ]
720
+ "description": "Base64-encoded image with data URL prefix"
461
721
  }
462
722
  }
463
- ]
723
+ }
464
724
  }
465
- },
466
- "/jpeg": {
467
- "post": {
468
- "tags": [
469
- "service"
470
- ],
471
- "summary": "JPEG",
472
- "description": "Exports the image as JPEG",
473
- "parameters": [
474
- {
475
- "name": "content",
476
- "required": true,
477
- "schema": {
478
- "type": "string"
479
- }
480
- },
481
- {
482
- "name": "quality",
483
- "required": false,
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": {
484
749
  "schema": {
485
- "type": "number",
486
- "default": 80
750
+ "type": "string",
751
+ "description": "Base64-encoded image with data URL prefix"
487
752
  }
488
753
  }
489
- ]
754
+ }
490
755
  }
491
- },
492
- "/png": {
493
- "post": {
494
- "tags": [
495
- "service"
496
- ],
497
- "summary": "PNG",
498
- "description": "Exports the image as PNG",
499
- "parameters": [
500
- {
501
- "name": "content",
502
- "required": true,
503
- "schema": {
504
- "type": "string"
505
- }
506
- },
507
- {
508
- "name": "compressionLevel",
509
- "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": {
510
794
  "schema": {
511
- "type": "number",
512
- "default": 6
795
+ "type": "string",
796
+ "description": "Base64-encoded image with data URL prefix in the specified format"
513
797
  }
514
798
  }
515
- ]
799
+ }
516
800
  }
517
- },
518
- "/webp": {
519
- "post": {
520
- "tags": [
521
- "service"
522
- ],
523
- "summary": "WebP",
524
- "description": "Exports the image as WebP",
525
- "parameters": [
526
- {
527
- "name": "content",
528
- "required": true,
529
- "schema": {
530
- "type": "string"
531
- }
532
- },
533
- {
534
- "name": "quality",
535
- "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": {
536
833
  "schema": {
537
- "type": "number",
538
- "default": 80
834
+ "type": "string",
835
+ "description": "Base64-encoded JPEG image with data URL prefix"
539
836
  }
540
837
  }
541
- ]
838
+ }
542
839
  }
543
- },
544
- "/avif": {
545
- "post": {
546
- "tags": [
547
- "service"
548
- ],
549
- "summary": "AVIF",
550
- "description": "Exports the image as AVIF",
551
- "parameters": [
552
- {
553
- "name": "content",
554
- "required": true,
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": {
555
872
  "schema": {
556
- "type": "string"
873
+ "type": "string",
874
+ "description": "Base64-encoded PNG image with data URL prefix"
557
875
  }
558
- },
559
- {
560
- "name": "quality",
561
- "required": false,
876
+ }
877
+ }
878
+ }
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": {
562
911
  "schema": {
563
- "type": "number",
564
- "default": 50
912
+ "type": "string",
913
+ "description": "Base64-encoded WebP image with data URL prefix"
565
914
  }
566
915
  }
567
- ]
916
+ }
568
917
  }
569
- },
570
- "/composite": {
571
- "post": {
572
- "tags": [
573
- "service"
574
- ],
575
- "summary": "Composite",
576
- "description": "Overlays other images (e.g. watermark)",
577
- "parameters": [
578
- {
579
- "name": "content",
580
- "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": {
581
950
  "schema": {
582
- "type": "string"
951
+ "type": "string",
952
+ "description": "Base64-encoded AVIF image with data URL prefix"
583
953
  }
584
- },
585
- {
586
- "name": "overlays",
587
- "required": true,
588
- "description": "Array of { input (base64), top, left }",
589
- "schema": {
590
- "type": "array",
591
- "items": {
592
- "type": "object",
593
- "properties": {
594
- "input": {
595
- "type": "string"
596
- },
597
- "top": {
598
- "type": "number"
599
- },
600
- "left": {
601
- "type": "number"
602
- }
603
- },
604
- "required": [
605
- "input",
606
- "top",
607
- "left"
608
- ]
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"
609
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"
610
1011
  }
611
1012
  }
612
- ]
1013
+ }
613
1014
  }
614
1015
  }
615
- },
616
- "components": {
617
- "schemas": {}
618
- },
619
- "x-scene-blocks": {}
1016
+ }
1017
+ }
1018
+ },
1019
+ "components": {
1020
+ "schemas": {}
1021
+ },
1022
+ "x-scene-blocks": {}
620
1023
  }