@scenario-labs/sdk 2.1.0 → 2.2.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 (93) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/index.d.mts +1 -1
  3. package/index.d.mts.map +1 -1
  4. package/index.d.ts +1 -1
  5. package/index.d.ts.map +1 -1
  6. package/index.js +6 -1
  7. package/index.js.map +1 -1
  8. package/index.mjs +1 -1
  9. package/index.mjs.map +1 -1
  10. package/lib/workflow_converter.d.mts +47 -2
  11. package/lib/workflow_converter.d.mts.map +1 -1
  12. package/lib/workflow_converter.d.ts +47 -2
  13. package/lib/workflow_converter.d.ts.map +1 -1
  14. package/lib/workflow_converter.js +253 -28
  15. package/lib/workflow_converter.js.map +1 -1
  16. package/lib/workflow_converter.mjs +248 -28
  17. package/lib/workflow_converter.mjs.map +1 -1
  18. package/lib/workflow_import_validator.d.mts +1 -1
  19. package/lib/workflow_import_validator.d.mts.map +1 -1
  20. package/lib/workflow_import_validator.d.ts +1 -1
  21. package/lib/workflow_import_validator.d.ts.map +1 -1
  22. package/lib/workflow_import_validator.js +2 -0
  23. package/lib/workflow_import_validator.js.map +1 -1
  24. package/lib/workflow_import_validator.mjs +2 -0
  25. package/lib/workflow_import_validator.mjs.map +1 -1
  26. package/package.json +1 -1
  27. package/resources/assets/assets.d.mts +289 -135
  28. package/resources/assets/assets.d.mts.map +1 -1
  29. package/resources/assets/assets.d.ts +289 -135
  30. package/resources/assets/assets.d.ts.map +1 -1
  31. package/resources/assets/assets.js.map +1 -1
  32. package/resources/assets/assets.mjs.map +1 -1
  33. package/resources/generate.d.mts +86 -48
  34. package/resources/generate.d.mts.map +1 -1
  35. package/resources/generate.d.ts +86 -48
  36. package/resources/generate.d.ts.map +1 -1
  37. package/resources/jobs.d.mts +6 -6
  38. package/resources/jobs.d.mts.map +1 -1
  39. package/resources/jobs.d.ts +6 -6
  40. package/resources/jobs.d.ts.map +1 -1
  41. package/resources/models/description.d.mts +54 -4
  42. package/resources/models/description.d.mts.map +1 -1
  43. package/resources/models/description.d.ts +54 -4
  44. package/resources/models/description.d.ts.map +1 -1
  45. package/resources/models/examples.d.mts +74 -36
  46. package/resources/models/examples.d.mts.map +1 -1
  47. package/resources/models/examples.d.ts +74 -36
  48. package/resources/models/examples.d.ts.map +1 -1
  49. package/resources/models/models.d.mts +21 -21
  50. package/resources/models/models.d.mts.map +1 -1
  51. package/resources/models/models.d.ts +21 -21
  52. package/resources/models/models.d.ts.map +1 -1
  53. package/resources/models/models.js.map +1 -1
  54. package/resources/models/models.mjs.map +1 -1
  55. package/resources/models/train.d.mts +8 -8
  56. package/resources/models/train.d.mts.map +1 -1
  57. package/resources/models/train.d.ts +8 -8
  58. package/resources/models/train.d.ts.map +1 -1
  59. package/resources/search.d.mts +6 -0
  60. package/resources/search.d.mts.map +1 -1
  61. package/resources/search.d.ts +6 -0
  62. package/resources/search.d.ts.map +1 -1
  63. package/resources/uploads.d.mts +4 -4
  64. package/resources/uploads.d.mts.map +1 -1
  65. package/resources/uploads.d.ts +4 -4
  66. package/resources/uploads.d.ts.map +1 -1
  67. package/resources/usages.d.mts +31 -6
  68. package/resources/usages.d.mts.map +1 -1
  69. package/resources/usages.d.ts +31 -6
  70. package/resources/usages.d.ts.map +1 -1
  71. package/resources/workflows.d.mts +36 -36
  72. package/resources/workflows.d.mts.map +1 -1
  73. package/resources/workflows.d.ts +36 -36
  74. package/resources/workflows.d.ts.map +1 -1
  75. package/src/index.ts +9 -0
  76. package/src/lib/workflow_converter.ts +347 -21
  77. package/src/lib/workflow_import_validator.ts +5 -1
  78. package/src/resources/assets/assets.ts +376 -118
  79. package/src/resources/generate.ts +106 -44
  80. package/src/resources/jobs.ts +6 -6
  81. package/src/resources/models/description.ts +68 -2
  82. package/src/resources/models/examples.ts +94 -32
  83. package/src/resources/models/models.ts +21 -14
  84. package/src/resources/models/train.ts +8 -6
  85. package/src/resources/search.ts +7 -0
  86. package/src/resources/uploads.ts +4 -4
  87. package/src/resources/usages.ts +41 -4
  88. package/src/resources/workflows.ts +36 -36
  89. package/src/version.ts +1 -1
  90. package/version.d.mts +1 -1
  91. package/version.d.ts +1 -1
  92. package/version.js +1 -1
  93. package/version.mjs +1 -1
@@ -323,7 +323,7 @@ export declare namespace GenerateCaptionResponse {
323
323
  * not able to create the asset on the flight on API side with dataurl without
324
324
  * data:kind, prefix
325
325
  */
326
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
326
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
327
327
  /**
328
328
  * The label displayed in the UI for this input
329
329
  */
@@ -481,7 +481,7 @@ export declare namespace GenerateCaptionResponse {
481
481
  * not able to create the asset on the flight on API side with dataurl without
482
482
  * data:kind, prefix
483
483
  */
484
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
484
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
485
485
  /**
486
486
  * The label displayed in the UI for this input
487
487
  */
@@ -1027,7 +1027,7 @@ export declare namespace GenerateDescribeStyleResponse {
1027
1027
  * not able to create the asset on the flight on API side with dataurl without
1028
1028
  * data:kind, prefix
1029
1029
  */
1030
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
1030
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
1031
1031
  /**
1032
1032
  * The label displayed in the UI for this input
1033
1033
  */
@@ -1185,7 +1185,7 @@ export declare namespace GenerateDescribeStyleResponse {
1185
1185
  * not able to create the asset on the flight on API side with dataurl without
1186
1186
  * data:kind, prefix
1187
1187
  */
1188
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
1188
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
1189
1189
  /**
1190
1190
  * The label displayed in the UI for this input
1191
1191
  */
@@ -1724,7 +1724,7 @@ export declare namespace GenerateDetectResponse {
1724
1724
  * not able to create the asset on the flight on API side with dataurl without
1725
1725
  * data:kind, prefix
1726
1726
  */
1727
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
1727
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
1728
1728
  /**
1729
1729
  * The label displayed in the UI for this input
1730
1730
  */
@@ -1882,7 +1882,7 @@ export declare namespace GenerateDetectResponse {
1882
1882
  * not able to create the asset on the flight on API side with dataurl without
1883
1883
  * data:kind, prefix
1884
1884
  */
1885
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
1885
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
1886
1886
  /**
1887
1887
  * The label displayed in the UI for this input
1888
1888
  */
@@ -2173,7 +2173,7 @@ export declare namespace GenerateDetectResponse {
2173
2173
  /**
2174
2174
  * The kind of asset
2175
2175
  */
2176
- kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
2176
+ kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
2177
2177
  /**
2178
2178
  * Metadata of the asset with some additional information
2179
2179
  */
@@ -2198,7 +2198,7 @@ export declare namespace GenerateDetectResponse {
2198
2198
  /**
2199
2199
  * source of the asset
2200
2200
  */
2201
- source: '3d23d' | '3d23d:texture' | '3d:texture' | '3d:texture:albedo' | '3d:texture:metallic' | '3d:texture:mtl' | '3d:texture:normal' | '3d:texture:roughness' | 'audio2audio' | 'audio2video' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2video' | 'inference-control-net' | 'inference-control-net-img' | 'inference-control-net-inpainting' | 'inference-control-net-inpainting-ip-adapter' | 'inference-control-net-ip-adapter' | 'inference-control-net-reference' | 'inference-control-net-texture' | 'inference-img' | 'inference-img-ip-adapter' | 'inference-img-texture' | 'inference-in-paint' | 'inference-in-paint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt' | 'inference-txt-ip-adapter' | 'inference-txt-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture:albedo' | 'texture:ao' | 'texture:edge' | 'texture:height' | 'texture:metallic' | 'texture:normal' | 'texture:smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video23d' | 'video2audio' | 'video2img' | 'video2video' | 'voice-clone';
2201
+ source: '3d23d' | '3d23d:texture' | '3d:texture' | '3d:texture:albedo' | '3d:texture:metallic' | '3d:texture:mtl' | '3d:texture:normal' | '3d:texture:roughness' | 'audio2audio' | 'audio2txt' | 'audio2video' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2txt' | 'img2video' | 'inference-control-net' | 'inference-control-net-img' | 'inference-control-net-inpainting' | 'inference-control-net-inpainting-ip-adapter' | 'inference-control-net-ip-adapter' | 'inference-control-net-reference' | 'inference-control-net-texture' | 'inference-img' | 'inference-img-ip-adapter' | 'inference-img-texture' | 'inference-in-paint' | 'inference-in-paint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt' | 'inference-txt-ip-adapter' | 'inference-txt-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture:albedo' | 'texture:ao' | 'texture:edge' | 'texture:height' | 'texture:metallic' | 'texture:normal' | 'texture:smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2txt' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-text' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video23d' | 'video2audio' | 'video2img' | 'video2video' | 'voice-clone';
2202
2202
  /**
2203
2203
  * The actual status
2204
2204
  */
@@ -2286,12 +2286,12 @@ export declare namespace GenerateDetectResponse {
2286
2286
  * Metadata of the asset with some additional information
2287
2287
  */
2288
2288
  interface Metadata {
2289
- kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
2289
+ kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
2290
2290
  /**
2291
2291
  * The type of the asset. Ex: 'inference-txt2img' will represent an asset generated
2292
2292
  * from a text to image model
2293
2293
  */
2294
- type: '3d-texture' | '3d-texture-albedo' | '3d-texture-metallic' | '3d-texture-mtl' | '3d-texture-normal' | '3d-texture-roughness' | '3d23d' | '3d23d-texture' | 'audio2audio' | 'audio2video' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2video' | 'inference-controlnet' | 'inference-controlnet-img2img' | 'inference-controlnet-inpaint' | 'inference-controlnet-inpaint-ip-adapter' | 'inference-controlnet-ip-adapter' | 'inference-controlnet-reference' | 'inference-controlnet-texture' | 'inference-img2img' | 'inference-img2img-ip-adapter' | 'inference-img2img-texture' | 'inference-inpaint' | 'inference-inpaint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt2img' | 'inference-txt2img-ip-adapter' | 'inference-txt2img-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture-albedo' | 'texture-ao' | 'texture-edge' | 'texture-height' | 'texture-metallic' | 'texture-normal' | 'texture-smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video23d' | 'video2audio' | 'video2img' | 'video2video' | 'voice-clone';
2294
+ type: '3d-texture' | '3d-texture-albedo' | '3d-texture-metallic' | '3d-texture-mtl' | '3d-texture-normal' | '3d-texture-roughness' | '3d23d' | '3d23d-texture' | 'audio2audio' | 'audio2txt' | 'audio2video' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2txt' | 'img2video' | 'inference-controlnet' | 'inference-controlnet-img2img' | 'inference-controlnet-inpaint' | 'inference-controlnet-inpaint-ip-adapter' | 'inference-controlnet-ip-adapter' | 'inference-controlnet-reference' | 'inference-controlnet-texture' | 'inference-img2img' | 'inference-img2img-ip-adapter' | 'inference-img2img-texture' | 'inference-inpaint' | 'inference-inpaint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt2img' | 'inference-txt2img-ip-adapter' | 'inference-txt2img-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture-albedo' | 'texture-ao' | 'texture-edge' | 'texture-height' | 'texture-metallic' | 'texture-normal' | 'texture-smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2txt' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-text' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video23d' | 'video2audio' | 'video2img' | 'video2video' | 'voice-clone';
2295
2295
  /**
2296
2296
  * How angular is the surface? 0 is like a sphere, 1 is like a mechanical object
2297
2297
  */
@@ -2301,10 +2301,6 @@ export declare namespace GenerateDetectResponse {
2301
2301
  * models
2302
2302
  */
2303
2303
  aspectRatio?: string;
2304
- /**
2305
- * Int to set between 0 and 255 for the opacity of the background in the result
2306
- * images.
2307
- */
2308
2304
  backgroundOpacity?: number;
2309
2305
  /**
2310
2306
  * The baseModelId that maybe changed at inference time
@@ -2314,9 +2310,6 @@ export declare namespace GenerateDetectResponse {
2314
2310
  * A bounding box around the object of interest, in the format [x1, y1, x2, y2].
2315
2311
  */
2316
2312
  bbox?: Array<number>;
2317
- /**
2318
- * Remove small dark spots (i.e. “pepper”) and connect small bright cracks.
2319
- */
2320
2313
  betterQuality?: boolean;
2321
2314
  /**
2322
2315
  * The control image already processed by canny detector. Must reference an
@@ -2375,9 +2368,6 @@ export declare namespace GenerateDetectResponse {
2375
2368
  * Amount of details to remove or add
2376
2369
  */
2377
2370
  detailsLevel?: number;
2378
- /**
2379
- * The number of pixels to dilate the result masks.
2380
- */
2381
2371
  dilate?: number;
2382
2372
  /**
2383
2373
  * Contrast factor for Grayscale detector
@@ -2579,11 +2569,15 @@ export declare namespace GenerateDetectResponse {
2579
2569
  */
2580
2570
  resultContours?: boolean;
2581
2571
  /**
2582
- * Boolean to able output the cut out object.
2572
+ * Boolean to return the source image with the mask applied as alpha channel (RGBA
2573
+ * PNG, transparent background) instead of the binary mask. Mutually exclusive with
2574
+ * `resultMask` — passing both as `true` returns a 400 error. Note:
2575
+ * `backgroundOpacity` is no longer honored — alpha is binary (0/255) only.
2583
2576
  */
2584
2577
  resultImage?: boolean;
2585
2578
  /**
2586
- * Boolean to able return the masks (binary image) in the response.
2579
+ * Boolean to return the binary masks in the response. Mutually exclusive with
2580
+ * `resultImage` — passing both as `true` returns a 400 error.
2587
2581
  */
2588
2582
  resultMask?: boolean;
2589
2583
  rootParentId?: string;
@@ -2739,6 +2733,12 @@ export declare namespace GenerateDetectResponse {
2739
2733
  * Number of channels of the audio
2740
2734
  */
2741
2735
  channels?: number;
2736
+ /**
2737
+ * Number of Unicode code points in the text. Code-point-aware (so a non-BMP emoji
2738
+ * counts as 1) but not full grapheme-cluster aware (a ZWJ sequence still counts as
2739
+ * several).
2740
+ */
2741
+ charCount?: number;
2742
2742
  /**
2743
2743
  * Classification of the audio
2744
2744
  */
@@ -2775,6 +2775,13 @@ export declare namespace GenerateDetectResponse {
2775
2775
  * Whether the mesh has animations
2776
2776
  */
2777
2777
  hasAnimations?: boolean;
2778
+ /**
2779
+ * True when `preview` holds the entire content unmodified — consumers can use it
2780
+ * directly without fetching `asset.url`. False or undefined means the content
2781
+ * exceeds the preview budget and consumers must fetch the full body from S3 to
2782
+ * read past the preview.
2783
+ */
2784
+ hasFullPreview?: boolean;
2778
2785
  /**
2779
2786
  * Whether the mesh has normal vectors
2780
2787
  */
@@ -2792,6 +2799,14 @@ export declare namespace GenerateDetectResponse {
2792
2799
  * Number of frames in the video
2793
2800
  */
2794
2801
  nbFrames?: number;
2802
+ /**
2803
+ * Leading slice of the content used for inline UI display and as a search
2804
+ * shortcut. Capped at TEXT_PREVIEW_MAX_BYTES (UTF-8) and always cut on a
2805
+ * code-point boundary so no character is split. Number of characters in the
2806
+ * preview varies by script (around 1024 for ASCII, ~340 for CJK, ~256 for
2807
+ * emoji-heavy text at the default 1 KB budget).
2808
+ */
2809
+ preview?: string;
2795
2810
  /**
2796
2811
  * Sample rate of the media in Hz
2797
2812
  */
@@ -2805,6 +2820,10 @@ export declare namespace GenerateDetectResponse {
2805
2820
  */
2806
2821
  vertexCount?: number;
2807
2822
  width?: number;
2823
+ /**
2824
+ * Number of whitespace-separated words in the text
2825
+ */
2826
+ wordCount?: number;
2808
2827
  }
2809
2828
  namespace Properties {
2810
2829
  /**
@@ -3128,7 +3147,7 @@ export declare namespace GenerateEmbedResponse {
3128
3147
  * not able to create the asset on the flight on API side with dataurl without
3129
3148
  * data:kind, prefix
3130
3149
  */
3131
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
3150
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
3132
3151
  /**
3133
3152
  * The label displayed in the UI for this input
3134
3153
  */
@@ -3286,7 +3305,7 @@ export declare namespace GenerateEmbedResponse {
3286
3305
  * not able to create the asset on the flight on API side with dataurl without
3287
3306
  * data:kind, prefix
3288
3307
  */
3289
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
3308
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
3290
3309
  /**
3291
3310
  * The label displayed in the UI for this input
3292
3311
  */
@@ -3825,7 +3844,7 @@ export declare namespace GeneratePatchResponse {
3825
3844
  * not able to create the asset on the flight on API side with dataurl without
3826
3845
  * data:kind, prefix
3827
3846
  */
3828
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
3847
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
3829
3848
  /**
3830
3849
  * The label displayed in the UI for this input
3831
3850
  */
@@ -3983,7 +4002,7 @@ export declare namespace GeneratePatchResponse {
3983
4002
  * not able to create the asset on the flight on API side with dataurl without
3984
4003
  * data:kind, prefix
3985
4004
  */
3986
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
4005
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
3987
4006
  /**
3988
4007
  * The label displayed in the UI for this input
3989
4008
  */
@@ -4274,7 +4293,7 @@ export declare namespace GeneratePatchResponse {
4274
4293
  /**
4275
4294
  * The kind of asset
4276
4295
  */
4277
- kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
4296
+ kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
4278
4297
  /**
4279
4298
  * Metadata of the asset with some additional information
4280
4299
  */
@@ -4299,7 +4318,7 @@ export declare namespace GeneratePatchResponse {
4299
4318
  /**
4300
4319
  * source of the asset
4301
4320
  */
4302
- source: '3d23d' | '3d23d:texture' | '3d:texture' | '3d:texture:albedo' | '3d:texture:metallic' | '3d:texture:mtl' | '3d:texture:normal' | '3d:texture:roughness' | 'audio2audio' | 'audio2video' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2video' | 'inference-control-net' | 'inference-control-net-img' | 'inference-control-net-inpainting' | 'inference-control-net-inpainting-ip-adapter' | 'inference-control-net-ip-adapter' | 'inference-control-net-reference' | 'inference-control-net-texture' | 'inference-img' | 'inference-img-ip-adapter' | 'inference-img-texture' | 'inference-in-paint' | 'inference-in-paint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt' | 'inference-txt-ip-adapter' | 'inference-txt-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture:albedo' | 'texture:ao' | 'texture:edge' | 'texture:height' | 'texture:metallic' | 'texture:normal' | 'texture:smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video23d' | 'video2audio' | 'video2img' | 'video2video' | 'voice-clone';
4321
+ source: '3d23d' | '3d23d:texture' | '3d:texture' | '3d:texture:albedo' | '3d:texture:metallic' | '3d:texture:mtl' | '3d:texture:normal' | '3d:texture:roughness' | 'audio2audio' | 'audio2txt' | 'audio2video' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2txt' | 'img2video' | 'inference-control-net' | 'inference-control-net-img' | 'inference-control-net-inpainting' | 'inference-control-net-inpainting-ip-adapter' | 'inference-control-net-ip-adapter' | 'inference-control-net-reference' | 'inference-control-net-texture' | 'inference-img' | 'inference-img-ip-adapter' | 'inference-img-texture' | 'inference-in-paint' | 'inference-in-paint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt' | 'inference-txt-ip-adapter' | 'inference-txt-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture:albedo' | 'texture:ao' | 'texture:edge' | 'texture:height' | 'texture:metallic' | 'texture:normal' | 'texture:smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2txt' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-text' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video23d' | 'video2audio' | 'video2img' | 'video2video' | 'voice-clone';
4303
4322
  /**
4304
4323
  * The actual status
4305
4324
  */
@@ -4387,12 +4406,12 @@ export declare namespace GeneratePatchResponse {
4387
4406
  * Metadata of the asset with some additional information
4388
4407
  */
4389
4408
  interface Metadata {
4390
- kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
4409
+ kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
4391
4410
  /**
4392
4411
  * The type of the asset. Ex: 'inference-txt2img' will represent an asset generated
4393
4412
  * from a text to image model
4394
4413
  */
4395
- type: '3d-texture' | '3d-texture-albedo' | '3d-texture-metallic' | '3d-texture-mtl' | '3d-texture-normal' | '3d-texture-roughness' | '3d23d' | '3d23d-texture' | 'audio2audio' | 'audio2video' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2video' | 'inference-controlnet' | 'inference-controlnet-img2img' | 'inference-controlnet-inpaint' | 'inference-controlnet-inpaint-ip-adapter' | 'inference-controlnet-ip-adapter' | 'inference-controlnet-reference' | 'inference-controlnet-texture' | 'inference-img2img' | 'inference-img2img-ip-adapter' | 'inference-img2img-texture' | 'inference-inpaint' | 'inference-inpaint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt2img' | 'inference-txt2img-ip-adapter' | 'inference-txt2img-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture-albedo' | 'texture-ao' | 'texture-edge' | 'texture-height' | 'texture-metallic' | 'texture-normal' | 'texture-smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video23d' | 'video2audio' | 'video2img' | 'video2video' | 'voice-clone';
4414
+ type: '3d-texture' | '3d-texture-albedo' | '3d-texture-metallic' | '3d-texture-mtl' | '3d-texture-normal' | '3d-texture-roughness' | '3d23d' | '3d23d-texture' | 'audio2audio' | 'audio2txt' | 'audio2video' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2txt' | 'img2video' | 'inference-controlnet' | 'inference-controlnet-img2img' | 'inference-controlnet-inpaint' | 'inference-controlnet-inpaint-ip-adapter' | 'inference-controlnet-ip-adapter' | 'inference-controlnet-reference' | 'inference-controlnet-texture' | 'inference-img2img' | 'inference-img2img-ip-adapter' | 'inference-img2img-texture' | 'inference-inpaint' | 'inference-inpaint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt2img' | 'inference-txt2img-ip-adapter' | 'inference-txt2img-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture-albedo' | 'texture-ao' | 'texture-edge' | 'texture-height' | 'texture-metallic' | 'texture-normal' | 'texture-smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2txt' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-text' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video23d' | 'video2audio' | 'video2img' | 'video2video' | 'voice-clone';
4396
4415
  /**
4397
4416
  * How angular is the surface? 0 is like a sphere, 1 is like a mechanical object
4398
4417
  */
@@ -4402,10 +4421,6 @@ export declare namespace GeneratePatchResponse {
4402
4421
  * models
4403
4422
  */
4404
4423
  aspectRatio?: string;
4405
- /**
4406
- * Int to set between 0 and 255 for the opacity of the background in the result
4407
- * images.
4408
- */
4409
4424
  backgroundOpacity?: number;
4410
4425
  /**
4411
4426
  * The baseModelId that maybe changed at inference time
@@ -4415,9 +4430,6 @@ export declare namespace GeneratePatchResponse {
4415
4430
  * A bounding box around the object of interest, in the format [x1, y1, x2, y2].
4416
4431
  */
4417
4432
  bbox?: Array<number>;
4418
- /**
4419
- * Remove small dark spots (i.e. “pepper”) and connect small bright cracks.
4420
- */
4421
4433
  betterQuality?: boolean;
4422
4434
  /**
4423
4435
  * The control image already processed by canny detector. Must reference an
@@ -4476,9 +4488,6 @@ export declare namespace GeneratePatchResponse {
4476
4488
  * Amount of details to remove or add
4477
4489
  */
4478
4490
  detailsLevel?: number;
4479
- /**
4480
- * The number of pixels to dilate the result masks.
4481
- */
4482
4491
  dilate?: number;
4483
4492
  /**
4484
4493
  * Contrast factor for Grayscale detector
@@ -4680,11 +4689,15 @@ export declare namespace GeneratePatchResponse {
4680
4689
  */
4681
4690
  resultContours?: boolean;
4682
4691
  /**
4683
- * Boolean to able output the cut out object.
4692
+ * Boolean to return the source image with the mask applied as alpha channel (RGBA
4693
+ * PNG, transparent background) instead of the binary mask. Mutually exclusive with
4694
+ * `resultMask` — passing both as `true` returns a 400 error. Note:
4695
+ * `backgroundOpacity` is no longer honored — alpha is binary (0/255) only.
4684
4696
  */
4685
4697
  resultImage?: boolean;
4686
4698
  /**
4687
- * Boolean to able return the masks (binary image) in the response.
4699
+ * Boolean to return the binary masks in the response. Mutually exclusive with
4700
+ * `resultImage` — passing both as `true` returns a 400 error.
4688
4701
  */
4689
4702
  resultMask?: boolean;
4690
4703
  rootParentId?: string;
@@ -4840,6 +4853,12 @@ export declare namespace GeneratePatchResponse {
4840
4853
  * Number of channels of the audio
4841
4854
  */
4842
4855
  channels?: number;
4856
+ /**
4857
+ * Number of Unicode code points in the text. Code-point-aware (so a non-BMP emoji
4858
+ * counts as 1) but not full grapheme-cluster aware (a ZWJ sequence still counts as
4859
+ * several).
4860
+ */
4861
+ charCount?: number;
4843
4862
  /**
4844
4863
  * Classification of the audio
4845
4864
  */
@@ -4876,6 +4895,13 @@ export declare namespace GeneratePatchResponse {
4876
4895
  * Whether the mesh has animations
4877
4896
  */
4878
4897
  hasAnimations?: boolean;
4898
+ /**
4899
+ * True when `preview` holds the entire content unmodified — consumers can use it
4900
+ * directly without fetching `asset.url`. False or undefined means the content
4901
+ * exceeds the preview budget and consumers must fetch the full body from S3 to
4902
+ * read past the preview.
4903
+ */
4904
+ hasFullPreview?: boolean;
4879
4905
  /**
4880
4906
  * Whether the mesh has normal vectors
4881
4907
  */
@@ -4893,6 +4919,14 @@ export declare namespace GeneratePatchResponse {
4893
4919
  * Number of frames in the video
4894
4920
  */
4895
4921
  nbFrames?: number;
4922
+ /**
4923
+ * Leading slice of the content used for inline UI display and as a search
4924
+ * shortcut. Capped at TEXT_PREVIEW_MAX_BYTES (UTF-8) and always cut on a
4925
+ * code-point boundary so no character is split. Number of characters in the
4926
+ * preview varies by script (around 1024 for ASCII, ~340 for CJK, ~256 for
4927
+ * emoji-heavy text at the default 1 KB budget).
4928
+ */
4929
+ preview?: string;
4896
4930
  /**
4897
4931
  * Sample rate of the media in Hz
4898
4932
  */
@@ -4906,6 +4940,10 @@ export declare namespace GeneratePatchResponse {
4906
4940
  */
4907
4941
  vertexCount?: number;
4908
4942
  width?: number;
4943
+ /**
4944
+ * Number of whitespace-separated words in the text
4945
+ */
4946
+ wordCount?: number;
4909
4947
  }
4910
4948
  namespace Properties {
4911
4949
  /**
@@ -5231,7 +5269,7 @@ export declare namespace GeneratePromptResponse {
5231
5269
  * not able to create the asset on the flight on API side with dataurl without
5232
5270
  * data:kind, prefix
5233
5271
  */
5234
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
5272
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
5235
5273
  /**
5236
5274
  * The label displayed in the UI for this input
5237
5275
  */
@@ -5389,7 +5427,7 @@ export declare namespace GeneratePromptResponse {
5389
5427
  * not able to create the asset on the flight on API side with dataurl without
5390
5428
  * data:kind, prefix
5391
5429
  */
5392
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
5430
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
5393
5431
  /**
5394
5432
  * The label displayed in the UI for this input
5395
5433
  */
@@ -5927,7 +5965,7 @@ export declare namespace GenerateRunModelResponse {
5927
5965
  * not able to create the asset on the flight on API side with dataurl without
5928
5966
  * data:kind, prefix
5929
5967
  */
5930
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
5968
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
5931
5969
  /**
5932
5970
  * The label displayed in the UI for this input
5933
5971
  */
@@ -6085,7 +6123,7 @@ export declare namespace GenerateRunModelResponse {
6085
6123
  * not able to create the asset on the flight on API side with dataurl without
6086
6124
  * data:kind, prefix
6087
6125
  */
6088
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
6126
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
6089
6127
  /**
6090
6128
  * The label displayed in the UI for this input
6091
6129
  */
@@ -6631,7 +6669,7 @@ export declare namespace GenerateTranslateResponse {
6631
6669
  * not able to create the asset on the flight on API side with dataurl without
6632
6670
  * data:kind, prefix
6633
6671
  */
6634
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
6672
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
6635
6673
  /**
6636
6674
  * The label displayed in the UI for this input
6637
6675
  */
@@ -6789,7 +6827,7 @@ export declare namespace GenerateTranslateResponse {
6789
6827
  * not able to create the asset on the flight on API side with dataurl without
6790
6828
  * data:kind, prefix
6791
6829
  */
6792
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
6830
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
6793
6831
  /**
6794
6832
  * The label displayed in the UI for this input
6795
6833
  */