@scenario-labs/sdk 2.0.0 → 2.2.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.
Files changed (269) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/api-promise.d.mts +1 -0
  3. package/api-promise.d.mts.map +1 -1
  4. package/api-promise.d.ts +1 -0
  5. package/api-promise.d.ts.map +1 -1
  6. package/api-promise.mjs +1 -0
  7. package/api-promise.mjs.map +1 -1
  8. package/client.d.mts.map +1 -1
  9. package/client.d.ts.map +1 -1
  10. package/client.mjs.map +1 -1
  11. package/core/api-promise.d.mts.map +1 -1
  12. package/core/api-promise.d.ts.map +1 -1
  13. package/core/api-promise.mjs.map +1 -1
  14. package/core/error.mjs.map +1 -1
  15. package/core/pagination.d.mts.map +1 -1
  16. package/core/pagination.d.ts.map +1 -1
  17. package/core/pagination.mjs.map +1 -1
  18. package/core/resource.d.mts.map +1 -1
  19. package/core/resource.d.ts.map +1 -1
  20. package/core/uploads.d.mts.map +1 -1
  21. package/core/uploads.d.ts.map +1 -1
  22. package/core/uploads.mjs.map +1 -1
  23. package/error.d.mts +1 -0
  24. package/error.d.mts.map +1 -1
  25. package/error.d.ts +1 -0
  26. package/error.d.ts.map +1 -1
  27. package/error.mjs +1 -0
  28. package/error.mjs.map +1 -1
  29. package/index.d.mts +1 -1
  30. package/index.d.mts.map +1 -1
  31. package/index.d.ts +1 -1
  32. package/index.d.ts.map +1 -1
  33. package/index.js +6 -1
  34. package/index.js.map +1 -1
  35. package/index.mjs +1 -1
  36. package/index.mjs.map +1 -1
  37. package/internal/detect-platform.mjs.map +1 -1
  38. package/internal/headers.mjs.map +1 -1
  39. package/internal/parse.d.mts.map +1 -1
  40. package/internal/parse.d.ts.map +1 -1
  41. package/internal/parse.mjs.map +1 -1
  42. package/internal/qs/formats.d.mts.map +1 -1
  43. package/internal/qs/formats.d.ts.map +1 -1
  44. package/internal/qs/index.d.mts +2 -2
  45. package/internal/qs/index.d.mts.map +1 -1
  46. package/internal/qs/index.d.ts +2 -2
  47. package/internal/qs/index.d.ts.map +1 -1
  48. package/internal/qs/index.mjs.map +1 -1
  49. package/internal/qs/stringify.d.mts.map +1 -1
  50. package/internal/qs/stringify.d.ts.map +1 -1
  51. package/internal/qs/stringify.mjs.map +1 -1
  52. package/internal/qs/utils.d.mts.map +1 -1
  53. package/internal/qs/utils.d.ts.map +1 -1
  54. package/internal/qs/utils.mjs.map +1 -1
  55. package/internal/request-options.d.mts.map +1 -1
  56. package/internal/request-options.d.ts.map +1 -1
  57. package/internal/shims.d.mts +6 -0
  58. package/internal/shims.d.mts.map +1 -1
  59. package/internal/shims.d.ts +6 -0
  60. package/internal/shims.d.ts.map +1 -1
  61. package/internal/to-file.d.mts.map +1 -1
  62. package/internal/to-file.d.ts.map +1 -1
  63. package/internal/to-file.mjs.map +1 -1
  64. package/internal/types.d.mts +4 -4
  65. package/internal/types.d.mts.map +1 -1
  66. package/internal/types.d.ts +4 -4
  67. package/internal/types.d.ts.map +1 -1
  68. package/internal/uploads.d.mts.map +1 -1
  69. package/internal/uploads.d.ts.map +1 -1
  70. package/internal/uploads.mjs.map +1 -1
  71. package/internal/utils/base64.mjs.map +1 -1
  72. package/internal/utils/log.d.mts.map +1 -1
  73. package/internal/utils/log.d.ts.map +1 -1
  74. package/internal/utils/log.mjs.map +1 -1
  75. package/internal/utils/path.mjs.map +1 -1
  76. package/internal/utils/query.mjs.map +1 -1
  77. package/internal/utils/values.mjs.map +1 -1
  78. package/internal/utils.d.mts.map +1 -1
  79. package/internal/utils.d.ts.map +1 -1
  80. package/internal/utils.mjs.map +1 -1
  81. package/lib/asset.d.mts.map +1 -1
  82. package/lib/asset.d.ts.map +1 -1
  83. package/lib/asset.mjs.map +1 -1
  84. package/lib/generate.d.mts.map +1 -1
  85. package/lib/generate.d.ts.map +1 -1
  86. package/lib/generate.mjs.map +1 -1
  87. package/lib/job.d.mts.map +1 -1
  88. package/lib/job.d.ts.map +1 -1
  89. package/lib/job.mjs.map +1 -1
  90. package/lib/models.d.mts.map +1 -1
  91. package/lib/models.d.ts.map +1 -1
  92. package/lib/models.mjs.map +1 -1
  93. package/lib/scenario.d.mts.map +1 -1
  94. package/lib/scenario.d.ts.map +1 -1
  95. package/lib/scenario.mjs.map +1 -1
  96. package/lib/upload.d.mts.map +1 -1
  97. package/lib/upload.d.ts.map +1 -1
  98. package/lib/upload.mjs.map +1 -1
  99. package/lib/workflow.d.mts.map +1 -1
  100. package/lib/workflow.d.ts.map +1 -1
  101. package/lib/workflow.mjs.map +1 -1
  102. package/lib/workflow_converter.d.mts +58 -2
  103. package/lib/workflow_converter.d.mts.map +1 -1
  104. package/lib/workflow_converter.d.ts +58 -2
  105. package/lib/workflow_converter.d.ts.map +1 -1
  106. package/lib/workflow_converter.js +350 -35
  107. package/lib/workflow_converter.js.map +1 -1
  108. package/lib/workflow_converter.mjs +345 -35
  109. package/lib/workflow_converter.mjs.map +1 -1
  110. package/lib/workflow_import_validator.d.mts +1 -1
  111. package/lib/workflow_import_validator.d.mts.map +1 -1
  112. package/lib/workflow_import_validator.d.ts +1 -1
  113. package/lib/workflow_import_validator.d.ts.map +1 -1
  114. package/lib/workflow_import_validator.js +1 -0
  115. package/lib/workflow_import_validator.js.map +1 -1
  116. package/lib/workflow_import_validator.mjs +1 -0
  117. package/lib/workflow_import_validator.mjs.map +1 -1
  118. package/package.json +1 -1
  119. package/pagination.d.mts +1 -0
  120. package/pagination.d.mts.map +1 -1
  121. package/pagination.d.ts +1 -0
  122. package/pagination.d.ts.map +1 -1
  123. package/pagination.mjs +1 -0
  124. package/pagination.mjs.map +1 -1
  125. package/resource.d.mts +1 -0
  126. package/resource.d.mts.map +1 -1
  127. package/resource.d.ts +1 -0
  128. package/resource.d.ts.map +1 -1
  129. package/resource.mjs +1 -0
  130. package/resource.mjs.map +1 -1
  131. package/resources/assets/assets.d.mts +289 -135
  132. package/resources/assets/assets.d.mts.map +1 -1
  133. package/resources/assets/assets.d.ts +289 -135
  134. package/resources/assets/assets.d.ts.map +1 -1
  135. package/resources/assets/assets.js.map +1 -1
  136. package/resources/assets/assets.mjs.map +1 -1
  137. package/resources/assets/download.d.mts.map +1 -1
  138. package/resources/assets/download.d.ts.map +1 -1
  139. package/resources/assets/download.mjs.map +1 -1
  140. package/resources/assets/index.d.mts.map +1 -1
  141. package/resources/assets/index.d.ts.map +1 -1
  142. package/resources/assets/index.mjs.map +1 -1
  143. package/resources/assets.d.mts.map +1 -1
  144. package/resources/assets.d.ts.map +1 -1
  145. package/resources/assets.mjs.map +1 -1
  146. package/resources/collections/assets.d.mts.map +1 -1
  147. package/resources/collections/assets.d.ts.map +1 -1
  148. package/resources/collections/assets.mjs.map +1 -1
  149. package/resources/collections/collections.d.mts.map +1 -1
  150. package/resources/collections/collections.d.ts.map +1 -1
  151. package/resources/collections/collections.mjs.map +1 -1
  152. package/resources/collections/index.d.mts.map +1 -1
  153. package/resources/collections/index.d.ts.map +1 -1
  154. package/resources/collections/index.mjs.map +1 -1
  155. package/resources/collections/models.d.mts.map +1 -1
  156. package/resources/collections/models.d.ts.map +1 -1
  157. package/resources/collections/models.mjs.map +1 -1
  158. package/resources/collections.d.mts.map +1 -1
  159. package/resources/collections.d.ts.map +1 -1
  160. package/resources/collections.mjs.map +1 -1
  161. package/resources/generate.d.mts +86 -48
  162. package/resources/generate.d.mts.map +1 -1
  163. package/resources/generate.d.ts +86 -48
  164. package/resources/generate.d.ts.map +1 -1
  165. package/resources/generate.mjs.map +1 -1
  166. package/resources/index.d.mts.map +1 -1
  167. package/resources/index.d.ts.map +1 -1
  168. package/resources/index.mjs.map +1 -1
  169. package/resources/jobs.d.mts +6 -6
  170. package/resources/jobs.d.mts.map +1 -1
  171. package/resources/jobs.d.ts +6 -6
  172. package/resources/jobs.d.ts.map +1 -1
  173. package/resources/jobs.mjs.map +1 -1
  174. package/resources/models/description.d.mts +54 -4
  175. package/resources/models/description.d.mts.map +1 -1
  176. package/resources/models/description.d.ts +54 -4
  177. package/resources/models/description.d.ts.map +1 -1
  178. package/resources/models/description.mjs.map +1 -1
  179. package/resources/models/examples.d.mts +74 -36
  180. package/resources/models/examples.d.mts.map +1 -1
  181. package/resources/models/examples.d.ts +74 -36
  182. package/resources/models/examples.d.ts.map +1 -1
  183. package/resources/models/examples.mjs.map +1 -1
  184. package/resources/models/index.d.mts.map +1 -1
  185. package/resources/models/index.d.ts.map +1 -1
  186. package/resources/models/index.mjs.map +1 -1
  187. package/resources/models/models.d.mts +21 -21
  188. package/resources/models/models.d.mts.map +1 -1
  189. package/resources/models/models.d.ts +21 -21
  190. package/resources/models/models.d.ts.map +1 -1
  191. package/resources/models/models.js.map +1 -1
  192. package/resources/models/models.mjs.map +1 -1
  193. package/resources/models/train.d.mts +8 -8
  194. package/resources/models/train.d.mts.map +1 -1
  195. package/resources/models/train.d.ts +8 -8
  196. package/resources/models/train.d.ts.map +1 -1
  197. package/resources/models/train.mjs.map +1 -1
  198. package/resources/models/training-images.d.mts.map +1 -1
  199. package/resources/models/training-images.d.ts.map +1 -1
  200. package/resources/models/training-images.mjs.map +1 -1
  201. package/resources/models.d.mts.map +1 -1
  202. package/resources/models.d.ts.map +1 -1
  203. package/resources/models.mjs.map +1 -1
  204. package/resources/oscu.d.mts.map +1 -1
  205. package/resources/oscu.d.ts.map +1 -1
  206. package/resources/oscu.mjs.map +1 -1
  207. package/resources/pricing/index.d.mts.map +1 -1
  208. package/resources/pricing/index.d.ts.map +1 -1
  209. package/resources/pricing/index.mjs.map +1 -1
  210. package/resources/pricing/oscu.d.mts.map +1 -1
  211. package/resources/pricing/oscu.d.ts.map +1 -1
  212. package/resources/pricing/oscu.mjs.map +1 -1
  213. package/resources/pricing/pricing.d.mts.map +1 -1
  214. package/resources/pricing/pricing.d.ts.map +1 -1
  215. package/resources/pricing/pricing.mjs.map +1 -1
  216. package/resources/pricing.d.mts.map +1 -1
  217. package/resources/pricing.d.ts.map +1 -1
  218. package/resources/pricing.mjs.map +1 -1
  219. package/resources/search.d.mts +6 -0
  220. package/resources/search.d.mts.map +1 -1
  221. package/resources/search.d.ts +6 -0
  222. package/resources/search.d.ts.map +1 -1
  223. package/resources/search.mjs.map +1 -1
  224. package/resources/tags.d.mts.map +1 -1
  225. package/resources/tags.d.ts.map +1 -1
  226. package/resources/tags.mjs.map +1 -1
  227. package/resources/uploads.d.mts +4 -4
  228. package/resources/uploads.d.mts.map +1 -1
  229. package/resources/uploads.d.ts +4 -4
  230. package/resources/uploads.d.ts.map +1 -1
  231. package/resources/uploads.mjs.map +1 -1
  232. package/resources/usages.d.mts +31 -6
  233. package/resources/usages.d.mts.map +1 -1
  234. package/resources/usages.d.ts +31 -6
  235. package/resources/usages.d.ts.map +1 -1
  236. package/resources/usages.mjs.map +1 -1
  237. package/resources/workflows.d.mts +36 -36
  238. package/resources/workflows.d.mts.map +1 -1
  239. package/resources/workflows.d.ts +36 -36
  240. package/resources/workflows.d.ts.map +1 -1
  241. package/resources/workflows.mjs.map +1 -1
  242. package/resources.d.mts.map +1 -1
  243. package/resources.d.ts.map +1 -1
  244. package/resources.mjs.map +1 -1
  245. package/src/index.ts +9 -0
  246. package/src/lib/workflow_converter.ts +487 -28
  247. package/src/lib/workflow_import_validator.ts +2 -0
  248. package/src/resources/assets/assets.ts +376 -118
  249. package/src/resources/generate.ts +106 -44
  250. package/src/resources/jobs.ts +6 -6
  251. package/src/resources/models/description.ts +68 -2
  252. package/src/resources/models/examples.ts +94 -32
  253. package/src/resources/models/models.ts +21 -14
  254. package/src/resources/models/train.ts +8 -6
  255. package/src/resources/search.ts +7 -0
  256. package/src/resources/uploads.ts +4 -4
  257. package/src/resources/usages.ts +41 -4
  258. package/src/resources/workflows.ts +36 -36
  259. package/src/version.ts +1 -1
  260. package/uploads.d.mts +1 -0
  261. package/uploads.d.mts.map +1 -1
  262. package/uploads.d.ts +1 -0
  263. package/uploads.d.ts.map +1 -1
  264. package/uploads.mjs +1 -0
  265. package/uploads.mjs.map +1 -1
  266. package/version.d.mts +1 -1
  267. package/version.d.ts +1 -1
  268. package/version.js +1 -1
  269. package/version.mjs +1 -1
@@ -491,7 +491,7 @@ export namespace GenerateCaptionResponse {
491
491
  * not able to create the asset on the flight on API side with dataurl without
492
492
  * data:kind, prefix
493
493
  */
494
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
494
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
495
495
 
496
496
  /**
497
497
  * The label displayed in the UI for this input
@@ -724,7 +724,7 @@ export namespace GenerateCaptionResponse {
724
724
  * not able to create the asset on the flight on API side with dataurl without
725
725
  * data:kind, prefix
726
726
  */
727
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
727
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
728
728
 
729
729
  /**
730
730
  * The label displayed in the UI for this input
@@ -1477,7 +1477,7 @@ export namespace GenerateDescribeStyleResponse {
1477
1477
  * not able to create the asset on the flight on API side with dataurl without
1478
1478
  * data:kind, prefix
1479
1479
  */
1480
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
1480
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
1481
1481
 
1482
1482
  /**
1483
1483
  * The label displayed in the UI for this input
@@ -1710,7 +1710,7 @@ export namespace GenerateDescribeStyleResponse {
1710
1710
  * not able to create the asset on the flight on API side with dataurl without
1711
1711
  * data:kind, prefix
1712
1712
  */
1713
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
1713
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
1714
1714
 
1715
1715
  /**
1716
1716
  * The label displayed in the UI for this input
@@ -2455,7 +2455,7 @@ export namespace GenerateDetectResponse {
2455
2455
  * not able to create the asset on the flight on API side with dataurl without
2456
2456
  * data:kind, prefix
2457
2457
  */
2458
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
2458
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
2459
2459
 
2460
2460
  /**
2461
2461
  * The label displayed in the UI for this input
@@ -2688,7 +2688,7 @@ export namespace GenerateDetectResponse {
2688
2688
  * not able to create the asset on the flight on API side with dataurl without
2689
2689
  * data:kind, prefix
2690
2690
  */
2691
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
2691
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
2692
2692
 
2693
2693
  /**
2694
2694
  * The label displayed in the UI for this input
@@ -3085,7 +3085,7 @@ export namespace GenerateDetectResponse {
3085
3085
  /**
3086
3086
  * The kind of asset
3087
3087
  */
3088
- kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
3088
+ kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
3089
3089
 
3090
3090
  /**
3091
3091
  * Metadata of the asset with some additional information
@@ -3126,6 +3126,7 @@ export namespace GenerateDetectResponse {
3126
3126
  | '3d:texture:normal'
3127
3127
  | '3d:texture:roughness'
3128
3128
  | 'audio2audio'
3129
+ | 'audio2txt'
3129
3130
  | 'audio2video'
3130
3131
  | 'background-removal'
3131
3132
  | 'canvas'
@@ -3136,6 +3137,7 @@ export namespace GenerateDetectResponse {
3136
3137
  | 'image-prompt-editing'
3137
3138
  | 'img23d'
3138
3139
  | 'img2img'
3140
+ | 'img2txt'
3139
3141
  | 'img2video'
3140
3142
  | 'inference-control-net'
3141
3143
  | 'inference-control-net-img'
@@ -3175,12 +3177,14 @@ export namespace GenerateDetectResponse {
3175
3177
  | 'txt23d'
3176
3178
  | 'txt2audio'
3177
3179
  | 'txt2img'
3180
+ | 'txt2txt'
3178
3181
  | 'txt2video'
3179
3182
  | 'unknown'
3180
3183
  | 'uploaded'
3181
3184
  | 'uploaded-3d'
3182
3185
  | 'uploaded-audio'
3183
3186
  | 'uploaded-avatar'
3187
+ | 'uploaded-text'
3184
3188
  | 'uploaded-video'
3185
3189
  | 'upscale'
3186
3190
  | 'upscale-skybox'
@@ -3295,7 +3299,7 @@ export namespace GenerateDetectResponse {
3295
3299
  * Metadata of the asset with some additional information
3296
3300
  */
3297
3301
  export interface Metadata {
3298
- kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
3302
+ kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
3299
3303
 
3300
3304
  /**
3301
3305
  * The type of the asset. Ex: 'inference-txt2img' will represent an asset generated
@@ -3311,6 +3315,7 @@ export namespace GenerateDetectResponse {
3311
3315
  | '3d23d'
3312
3316
  | '3d23d-texture'
3313
3317
  | 'audio2audio'
3318
+ | 'audio2txt'
3314
3319
  | 'audio2video'
3315
3320
  | 'background-removal'
3316
3321
  | 'canvas'
@@ -3321,6 +3326,7 @@ export namespace GenerateDetectResponse {
3321
3326
  | 'image-prompt-editing'
3322
3327
  | 'img23d'
3323
3328
  | 'img2img'
3329
+ | 'img2txt'
3324
3330
  | 'img2video'
3325
3331
  | 'inference-controlnet'
3326
3332
  | 'inference-controlnet-img2img'
@@ -3360,12 +3366,14 @@ export namespace GenerateDetectResponse {
3360
3366
  | 'txt23d'
3361
3367
  | 'txt2audio'
3362
3368
  | 'txt2img'
3369
+ | 'txt2txt'
3363
3370
  | 'txt2video'
3364
3371
  | 'unknown'
3365
3372
  | 'uploaded'
3366
3373
  | 'uploaded-3d'
3367
3374
  | 'uploaded-audio'
3368
3375
  | 'uploaded-avatar'
3376
+ | 'uploaded-text'
3369
3377
  | 'uploaded-video'
3370
3378
  | 'upscale'
3371
3379
  | 'upscale-skybox'
@@ -3389,10 +3397,6 @@ export namespace GenerateDetectResponse {
3389
3397
  */
3390
3398
  aspectRatio?: string;
3391
3399
 
3392
- /**
3393
- * Int to set between 0 and 255 for the opacity of the background in the result
3394
- * images.
3395
- */
3396
3400
  backgroundOpacity?: number;
3397
3401
 
3398
3402
  /**
@@ -3405,9 +3409,6 @@ export namespace GenerateDetectResponse {
3405
3409
  */
3406
3410
  bbox?: Array<number>;
3407
3411
 
3408
- /**
3409
- * Remove small dark spots (i.e. “pepper”) and connect small bright cracks.
3410
- */
3411
3412
  betterQuality?: boolean;
3412
3413
 
3413
3414
  /**
@@ -3483,9 +3484,6 @@ export namespace GenerateDetectResponse {
3483
3484
  */
3484
3485
  detailsLevel?: number;
3485
3486
 
3486
- /**
3487
- * The number of pixels to dilate the result masks.
3488
- */
3489
3487
  dilate?: number;
3490
3488
 
3491
3489
  /**
@@ -3790,12 +3788,16 @@ export namespace GenerateDetectResponse {
3790
3788
  resultContours?: boolean;
3791
3789
 
3792
3790
  /**
3793
- * Boolean to able output the cut out object.
3791
+ * Boolean to return the source image with the mask applied as alpha channel (RGBA
3792
+ * PNG, transparent background) instead of the binary mask. Mutually exclusive with
3793
+ * `resultMask` — passing both as `true` returns a 400 error. Note:
3794
+ * `backgroundOpacity` is no longer honored — alpha is binary (0/255) only.
3794
3795
  */
3795
3796
  resultImage?: boolean;
3796
3797
 
3797
3798
  /**
3798
- * Boolean to able return the masks (binary image) in the response.
3799
+ * Boolean to return the binary masks in the response. Mutually exclusive with
3800
+ * `resultImage` — passing both as `true` returns a 400 error.
3799
3801
  */
3800
3802
  resultMask?: boolean;
3801
3803
 
@@ -4015,6 +4017,13 @@ export namespace GenerateDetectResponse {
4015
4017
  */
4016
4018
  channels?: number;
4017
4019
 
4020
+ /**
4021
+ * Number of Unicode code points in the text. Code-point-aware (so a non-BMP emoji
4022
+ * counts as 1) but not full grapheme-cluster aware (a ZWJ sequence still counts as
4023
+ * several).
4024
+ */
4025
+ charCount?: number;
4026
+
4018
4027
  /**
4019
4028
  * Classification of the audio
4020
4029
  */
@@ -4060,6 +4069,14 @@ export namespace GenerateDetectResponse {
4060
4069
  */
4061
4070
  hasAnimations?: boolean;
4062
4071
 
4072
+ /**
4073
+ * True when `preview` holds the entire content unmodified — consumers can use it
4074
+ * directly without fetching `asset.url`. False or undefined means the content
4075
+ * exceeds the preview budget and consumers must fetch the full body from S3 to
4076
+ * read past the preview.
4077
+ */
4078
+ hasFullPreview?: boolean;
4079
+
4063
4080
  /**
4064
4081
  * Whether the mesh has normal vectors
4065
4082
  */
@@ -4082,6 +4099,15 @@ export namespace GenerateDetectResponse {
4082
4099
  */
4083
4100
  nbFrames?: number;
4084
4101
 
4102
+ /**
4103
+ * Leading slice of the content used for inline UI display and as a search
4104
+ * shortcut. Capped at TEXT_PREVIEW_MAX_BYTES (UTF-8) and always cut on a
4105
+ * code-point boundary so no character is split. Number of characters in the
4106
+ * preview varies by script (around 1024 for ASCII, ~340 for CJK, ~256 for
4107
+ * emoji-heavy text at the default 1 KB budget).
4108
+ */
4109
+ preview?: string;
4110
+
4085
4111
  /**
4086
4112
  * Sample rate of the media in Hz
4087
4113
  */
@@ -4098,6 +4124,11 @@ export namespace GenerateDetectResponse {
4098
4124
  vertexCount?: number;
4099
4125
 
4100
4126
  width?: number;
4127
+
4128
+ /**
4129
+ * Number of whitespace-separated words in the text
4130
+ */
4131
+ wordCount?: number;
4101
4132
  }
4102
4133
 
4103
4134
  export namespace Properties {
@@ -4548,7 +4579,7 @@ export namespace GenerateEmbedResponse {
4548
4579
  * not able to create the asset on the flight on API side with dataurl without
4549
4580
  * data:kind, prefix
4550
4581
  */
4551
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
4582
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
4552
4583
 
4553
4584
  /**
4554
4585
  * The label displayed in the UI for this input
@@ -4781,7 +4812,7 @@ export namespace GenerateEmbedResponse {
4781
4812
  * not able to create the asset on the flight on API side with dataurl without
4782
4813
  * data:kind, prefix
4783
4814
  */
4784
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
4815
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
4785
4816
 
4786
4817
  /**
4787
4818
  * The label displayed in the UI for this input
@@ -5526,7 +5557,7 @@ export namespace GeneratePatchResponse {
5526
5557
  * not able to create the asset on the flight on API side with dataurl without
5527
5558
  * data:kind, prefix
5528
5559
  */
5529
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
5560
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
5530
5561
 
5531
5562
  /**
5532
5563
  * The label displayed in the UI for this input
@@ -5759,7 +5790,7 @@ export namespace GeneratePatchResponse {
5759
5790
  * not able to create the asset on the flight on API side with dataurl without
5760
5791
  * data:kind, prefix
5761
5792
  */
5762
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
5793
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
5763
5794
 
5764
5795
  /**
5765
5796
  * The label displayed in the UI for this input
@@ -6156,7 +6187,7 @@ export namespace GeneratePatchResponse {
6156
6187
  /**
6157
6188
  * The kind of asset
6158
6189
  */
6159
- kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
6190
+ kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
6160
6191
 
6161
6192
  /**
6162
6193
  * Metadata of the asset with some additional information
@@ -6197,6 +6228,7 @@ export namespace GeneratePatchResponse {
6197
6228
  | '3d:texture:normal'
6198
6229
  | '3d:texture:roughness'
6199
6230
  | 'audio2audio'
6231
+ | 'audio2txt'
6200
6232
  | 'audio2video'
6201
6233
  | 'background-removal'
6202
6234
  | 'canvas'
@@ -6207,6 +6239,7 @@ export namespace GeneratePatchResponse {
6207
6239
  | 'image-prompt-editing'
6208
6240
  | 'img23d'
6209
6241
  | 'img2img'
6242
+ | 'img2txt'
6210
6243
  | 'img2video'
6211
6244
  | 'inference-control-net'
6212
6245
  | 'inference-control-net-img'
@@ -6246,12 +6279,14 @@ export namespace GeneratePatchResponse {
6246
6279
  | 'txt23d'
6247
6280
  | 'txt2audio'
6248
6281
  | 'txt2img'
6282
+ | 'txt2txt'
6249
6283
  | 'txt2video'
6250
6284
  | 'unknown'
6251
6285
  | 'uploaded'
6252
6286
  | 'uploaded-3d'
6253
6287
  | 'uploaded-audio'
6254
6288
  | 'uploaded-avatar'
6289
+ | 'uploaded-text'
6255
6290
  | 'uploaded-video'
6256
6291
  | 'upscale'
6257
6292
  | 'upscale-skybox'
@@ -6366,7 +6401,7 @@ export namespace GeneratePatchResponse {
6366
6401
  * Metadata of the asset with some additional information
6367
6402
  */
6368
6403
  export interface Metadata {
6369
- kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
6404
+ kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
6370
6405
 
6371
6406
  /**
6372
6407
  * The type of the asset. Ex: 'inference-txt2img' will represent an asset generated
@@ -6382,6 +6417,7 @@ export namespace GeneratePatchResponse {
6382
6417
  | '3d23d'
6383
6418
  | '3d23d-texture'
6384
6419
  | 'audio2audio'
6420
+ | 'audio2txt'
6385
6421
  | 'audio2video'
6386
6422
  | 'background-removal'
6387
6423
  | 'canvas'
@@ -6392,6 +6428,7 @@ export namespace GeneratePatchResponse {
6392
6428
  | 'image-prompt-editing'
6393
6429
  | 'img23d'
6394
6430
  | 'img2img'
6431
+ | 'img2txt'
6395
6432
  | 'img2video'
6396
6433
  | 'inference-controlnet'
6397
6434
  | 'inference-controlnet-img2img'
@@ -6431,12 +6468,14 @@ export namespace GeneratePatchResponse {
6431
6468
  | 'txt23d'
6432
6469
  | 'txt2audio'
6433
6470
  | 'txt2img'
6471
+ | 'txt2txt'
6434
6472
  | 'txt2video'
6435
6473
  | 'unknown'
6436
6474
  | 'uploaded'
6437
6475
  | 'uploaded-3d'
6438
6476
  | 'uploaded-audio'
6439
6477
  | 'uploaded-avatar'
6478
+ | 'uploaded-text'
6440
6479
  | 'uploaded-video'
6441
6480
  | 'upscale'
6442
6481
  | 'upscale-skybox'
@@ -6460,10 +6499,6 @@ export namespace GeneratePatchResponse {
6460
6499
  */
6461
6500
  aspectRatio?: string;
6462
6501
 
6463
- /**
6464
- * Int to set between 0 and 255 for the opacity of the background in the result
6465
- * images.
6466
- */
6467
6502
  backgroundOpacity?: number;
6468
6503
 
6469
6504
  /**
@@ -6476,9 +6511,6 @@ export namespace GeneratePatchResponse {
6476
6511
  */
6477
6512
  bbox?: Array<number>;
6478
6513
 
6479
- /**
6480
- * Remove small dark spots (i.e. “pepper”) and connect small bright cracks.
6481
- */
6482
6514
  betterQuality?: boolean;
6483
6515
 
6484
6516
  /**
@@ -6554,9 +6586,6 @@ export namespace GeneratePatchResponse {
6554
6586
  */
6555
6587
  detailsLevel?: number;
6556
6588
 
6557
- /**
6558
- * The number of pixels to dilate the result masks.
6559
- */
6560
6589
  dilate?: number;
6561
6590
 
6562
6591
  /**
@@ -6861,12 +6890,16 @@ export namespace GeneratePatchResponse {
6861
6890
  resultContours?: boolean;
6862
6891
 
6863
6892
  /**
6864
- * Boolean to able output the cut out object.
6893
+ * Boolean to return the source image with the mask applied as alpha channel (RGBA
6894
+ * PNG, transparent background) instead of the binary mask. Mutually exclusive with
6895
+ * `resultMask` — passing both as `true` returns a 400 error. Note:
6896
+ * `backgroundOpacity` is no longer honored — alpha is binary (0/255) only.
6865
6897
  */
6866
6898
  resultImage?: boolean;
6867
6899
 
6868
6900
  /**
6869
- * Boolean to able return the masks (binary image) in the response.
6901
+ * Boolean to return the binary masks in the response. Mutually exclusive with
6902
+ * `resultImage` — passing both as `true` returns a 400 error.
6870
6903
  */
6871
6904
  resultMask?: boolean;
6872
6905
 
@@ -7086,6 +7119,13 @@ export namespace GeneratePatchResponse {
7086
7119
  */
7087
7120
  channels?: number;
7088
7121
 
7122
+ /**
7123
+ * Number of Unicode code points in the text. Code-point-aware (so a non-BMP emoji
7124
+ * counts as 1) but not full grapheme-cluster aware (a ZWJ sequence still counts as
7125
+ * several).
7126
+ */
7127
+ charCount?: number;
7128
+
7089
7129
  /**
7090
7130
  * Classification of the audio
7091
7131
  */
@@ -7131,6 +7171,14 @@ export namespace GeneratePatchResponse {
7131
7171
  */
7132
7172
  hasAnimations?: boolean;
7133
7173
 
7174
+ /**
7175
+ * True when `preview` holds the entire content unmodified — consumers can use it
7176
+ * directly without fetching `asset.url`. False or undefined means the content
7177
+ * exceeds the preview budget and consumers must fetch the full body from S3 to
7178
+ * read past the preview.
7179
+ */
7180
+ hasFullPreview?: boolean;
7181
+
7134
7182
  /**
7135
7183
  * Whether the mesh has normal vectors
7136
7184
  */
@@ -7153,6 +7201,15 @@ export namespace GeneratePatchResponse {
7153
7201
  */
7154
7202
  nbFrames?: number;
7155
7203
 
7204
+ /**
7205
+ * Leading slice of the content used for inline UI display and as a search
7206
+ * shortcut. Capped at TEXT_PREVIEW_MAX_BYTES (UTF-8) and always cut on a
7207
+ * code-point boundary so no character is split. Number of characters in the
7208
+ * preview varies by script (around 1024 for ASCII, ~340 for CJK, ~256 for
7209
+ * emoji-heavy text at the default 1 KB budget).
7210
+ */
7211
+ preview?: string;
7212
+
7156
7213
  /**
7157
7214
  * Sample rate of the media in Hz
7158
7215
  */
@@ -7169,6 +7226,11 @@ export namespace GeneratePatchResponse {
7169
7226
  vertexCount?: number;
7170
7227
 
7171
7228
  width?: number;
7229
+
7230
+ /**
7231
+ * Number of whitespace-separated words in the text
7232
+ */
7233
+ wordCount?: number;
7172
7234
  }
7173
7235
 
7174
7236
  export namespace Properties {
@@ -7622,7 +7684,7 @@ export namespace GeneratePromptResponse {
7622
7684
  * not able to create the asset on the flight on API side with dataurl without
7623
7685
  * data:kind, prefix
7624
7686
  */
7625
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
7687
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
7626
7688
 
7627
7689
  /**
7628
7690
  * The label displayed in the UI for this input
@@ -7855,7 +7917,7 @@ export namespace GeneratePromptResponse {
7855
7917
  * not able to create the asset on the flight on API side with dataurl without
7856
7918
  * data:kind, prefix
7857
7919
  */
7858
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
7920
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
7859
7921
 
7860
7922
  /**
7861
7923
  * The label displayed in the UI for this input
@@ -8598,7 +8660,7 @@ export namespace GenerateRunModelResponse {
8598
8660
  * not able to create the asset on the flight on API side with dataurl without
8599
8661
  * data:kind, prefix
8600
8662
  */
8601
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
8663
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
8602
8664
 
8603
8665
  /**
8604
8666
  * The label displayed in the UI for this input
@@ -8831,7 +8893,7 @@ export namespace GenerateRunModelResponse {
8831
8893
  * not able to create the asset on the flight on API side with dataurl without
8832
8894
  * data:kind, prefix
8833
8895
  */
8834
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
8896
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
8835
8897
 
8836
8898
  /**
8837
8899
  * The label displayed in the UI for this input
@@ -9584,7 +9646,7 @@ export namespace GenerateTranslateResponse {
9584
9646
  * not able to create the asset on the flight on API side with dataurl without
9585
9647
  * data:kind, prefix
9586
9648
  */
9587
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
9649
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
9588
9650
 
9589
9651
  /**
9590
9652
  * The label displayed in the UI for this input
@@ -9817,7 +9879,7 @@ export namespace GenerateTranslateResponse {
9817
9879
  * not able to create the asset on the flight on API side with dataurl without
9818
9880
  * data:kind, prefix
9819
9881
  */
9820
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
9882
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
9821
9883
 
9822
9884
  /**
9823
9885
  * The label displayed in the UI for this input
@@ -418,7 +418,7 @@ export namespace JobRetrieveResponse {
418
418
  * not able to create the asset on the flight on API side with dataurl without
419
419
  * data:kind, prefix
420
420
  */
421
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
421
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
422
422
 
423
423
  /**
424
424
  * The label displayed in the UI for this input
@@ -651,7 +651,7 @@ export namespace JobRetrieveResponse {
651
651
  * not able to create the asset on the flight on API side with dataurl without
652
652
  * data:kind, prefix
653
653
  */
654
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
654
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
655
655
 
656
656
  /**
657
657
  * The label displayed in the UI for this input
@@ -1379,7 +1379,7 @@ export namespace JobListResponse {
1379
1379
  * not able to create the asset on the flight on API side with dataurl without
1380
1380
  * data:kind, prefix
1381
1381
  */
1382
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
1382
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
1383
1383
 
1384
1384
  /**
1385
1385
  * The label displayed in the UI for this input
@@ -1612,7 +1612,7 @@ export namespace JobListResponse {
1612
1612
  * not able to create the asset on the flight on API side with dataurl without
1613
1613
  * data:kind, prefix
1614
1614
  */
1615
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
1615
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
1616
1616
 
1617
1617
  /**
1618
1618
  * The label displayed in the UI for this input
@@ -2344,7 +2344,7 @@ export namespace JobTriggerActionResponse {
2344
2344
  * not able to create the asset on the flight on API side with dataurl without
2345
2345
  * data:kind, prefix
2346
2346
  */
2347
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
2347
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
2348
2348
 
2349
2349
  /**
2350
2350
  * The label displayed in the UI for this input
@@ -2577,7 +2577,7 @@ export namespace JobTriggerActionResponse {
2577
2577
  * not able to create the asset on the flight on API side with dataurl without
2578
2578
  * data:kind, prefix
2579
2579
  */
2580
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
2580
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
2581
2581
 
2582
2582
  /**
2583
2583
  * The label displayed in the UI for this input