@scenario-labs/sdk 1.1.0 → 2.0.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 (236) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/client.d.mts +6 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -6
  5. package/client.d.ts.map +1 -1
  6. package/client.js +67 -43
  7. package/client.js.map +1 -1
  8. package/client.mjs +67 -44
  9. package/client.mjs.map +1 -1
  10. package/core/api-promise.js +7 -7
  11. package/core/api-promise.js.map +1 -1
  12. package/core/api-promise.mjs +7 -7
  13. package/core/api-promise.mjs.map +1 -1
  14. package/core/error.js +6 -0
  15. package/core/error.js.map +1 -1
  16. package/core/error.mjs +6 -0
  17. package/core/error.mjs.map +1 -1
  18. package/core/pagination.js +24 -6
  19. package/core/pagination.js.map +1 -1
  20. package/core/pagination.mjs +24 -6
  21. package/core/pagination.mjs.map +1 -1
  22. package/core/resource.js +1 -0
  23. package/core/resource.js.map +1 -1
  24. package/core/resource.mjs +1 -0
  25. package/core/resource.mjs.map +1 -1
  26. package/index.d.mts +1 -0
  27. package/index.d.mts.map +1 -1
  28. package/index.d.ts +1 -0
  29. package/index.d.ts.map +1 -1
  30. package/index.js +3 -1
  31. package/index.js.map +1 -1
  32. package/index.mjs +1 -0
  33. package/index.mjs.map +1 -1
  34. package/internal/detect-platform.js +1 -1
  35. package/internal/detect-platform.js.map +1 -1
  36. package/internal/detect-platform.mjs +1 -1
  37. package/internal/detect-platform.mjs.map +1 -1
  38. package/internal/qs/stringify.js +1 -1
  39. package/internal/qs/stringify.js.map +1 -1
  40. package/internal/qs/stringify.mjs +1 -1
  41. package/internal/qs/stringify.mjs.map +1 -1
  42. package/internal/request-options.d.mts +0 -4
  43. package/internal/request-options.d.mts.map +1 -1
  44. package/internal/request-options.d.ts +0 -4
  45. package/internal/request-options.d.ts.map +1 -1
  46. package/internal/request-options.js.map +1 -1
  47. package/internal/request-options.mjs.map +1 -1
  48. package/internal/to-file.js +2 -2
  49. package/internal/to-file.js.map +1 -1
  50. package/internal/to-file.mjs +2 -2
  51. package/internal/to-file.mjs.map +1 -1
  52. package/internal/tslib.js +0 -18
  53. package/internal/tslib.mjs +1 -17
  54. package/internal/types.d.mts +6 -6
  55. package/internal/types.d.mts.map +1 -1
  56. package/internal/types.d.ts +6 -6
  57. package/internal/types.d.ts.map +1 -1
  58. package/internal/utils/log.d.mts.map +1 -1
  59. package/internal/utils/log.d.ts.map +1 -1
  60. package/internal/utils/log.js +2 -0
  61. package/internal/utils/log.js.map +1 -1
  62. package/internal/utils/log.mjs +2 -0
  63. package/internal/utils/log.mjs.map +1 -1
  64. package/lib/job.js +3 -3
  65. package/lib/job.js.map +1 -1
  66. package/lib/job.mjs +3 -3
  67. package/lib/job.mjs.map +1 -1
  68. package/lib/models.js +1 -4
  69. package/lib/models.js.map +1 -1
  70. package/lib/models.mjs +1 -4
  71. package/lib/models.mjs.map +1 -1
  72. package/lib/scenario.js +6 -9
  73. package/lib/scenario.js.map +1 -1
  74. package/lib/scenario.mjs +6 -9
  75. package/lib/scenario.mjs.map +1 -1
  76. package/lib/upload.js +6 -6
  77. package/lib/upload.js.map +1 -1
  78. package/lib/upload.mjs +6 -6
  79. package/lib/upload.mjs.map +1 -1
  80. package/lib/workflow.d.mts +2 -2
  81. package/lib/workflow.d.mts.map +1 -1
  82. package/lib/workflow.d.ts +2 -2
  83. package/lib/workflow.d.ts.map +1 -1
  84. package/lib/workflow.js +2 -2
  85. package/lib/workflow.js.map +1 -1
  86. package/lib/workflow.mjs +2 -2
  87. package/lib/workflow.mjs.map +1 -1
  88. package/lib/workflow_converter.d.mts +174 -0
  89. package/lib/workflow_converter.d.mts.map +1 -0
  90. package/lib/workflow_converter.d.ts +174 -0
  91. package/lib/workflow_converter.d.ts.map +1 -0
  92. package/lib/workflow_converter.js +995 -0
  93. package/lib/workflow_converter.js.map +1 -0
  94. package/lib/workflow_converter.mjs +992 -0
  95. package/lib/workflow_converter.mjs.map +1 -0
  96. package/package.json +1 -1
  97. package/resources/assets/assets.d.mts +13 -5
  98. package/resources/assets/assets.d.mts.map +1 -1
  99. package/resources/assets/assets.d.ts +13 -5
  100. package/resources/assets/assets.d.ts.map +1 -1
  101. package/resources/assets/assets.js +1 -8
  102. package/resources/assets/assets.js.map +1 -1
  103. package/resources/assets/assets.mjs +1 -8
  104. package/resources/assets/assets.mjs.map +1 -1
  105. package/resources/assets/index.d.mts +0 -1
  106. package/resources/assets/index.d.mts.map +1 -1
  107. package/resources/assets/index.d.ts +0 -1
  108. package/resources/assets/index.d.ts.map +1 -1
  109. package/resources/assets/index.js +1 -3
  110. package/resources/assets/index.js.map +1 -1
  111. package/resources/assets/index.mjs +0 -1
  112. package/resources/assets/index.mjs.map +1 -1
  113. package/resources/collections/collections.js +2 -5
  114. package/resources/collections/collections.js.map +1 -1
  115. package/resources/collections/collections.mjs +2 -5
  116. package/resources/collections/collections.mjs.map +1 -1
  117. package/resources/generate.d.mts +96 -0
  118. package/resources/generate.d.mts.map +1 -1
  119. package/resources/generate.d.ts +96 -0
  120. package/resources/generate.d.ts.map +1 -1
  121. package/resources/index.d.mts +2 -1
  122. package/resources/index.d.mts.map +1 -1
  123. package/resources/index.d.ts +2 -1
  124. package/resources/index.d.ts.map +1 -1
  125. package/resources/index.js +3 -1
  126. package/resources/index.js.map +1 -1
  127. package/resources/index.mjs +1 -0
  128. package/resources/index.mjs.map +1 -1
  129. package/resources/jobs.d.mts +46 -3
  130. package/resources/jobs.d.mts.map +1 -1
  131. package/resources/jobs.d.ts +46 -3
  132. package/resources/jobs.d.ts.map +1 -1
  133. package/resources/models/examples.d.mts +24 -0
  134. package/resources/models/examples.d.mts.map +1 -1
  135. package/resources/models/examples.d.ts +24 -0
  136. package/resources/models/examples.d.ts.map +1 -1
  137. package/resources/models/models.d.mts +55 -11
  138. package/resources/models/models.d.mts.map +1 -1
  139. package/resources/models/models.d.ts +55 -11
  140. package/resources/models/models.d.ts.map +1 -1
  141. package/resources/models/models.js +4 -7
  142. package/resources/models/models.js.map +1 -1
  143. package/resources/models/models.mjs +4 -7
  144. package/resources/models/models.mjs.map +1 -1
  145. package/resources/models/train.d.mts +24 -0
  146. package/resources/models/train.d.mts.map +1 -1
  147. package/resources/models/train.d.ts +24 -0
  148. package/resources/models/train.d.ts.map +1 -1
  149. package/resources/oscu.d.mts +5 -0
  150. package/resources/oscu.d.mts.map +1 -1
  151. package/resources/oscu.d.ts +5 -0
  152. package/resources/oscu.d.ts.map +1 -1
  153. package/resources/oscu.js +5 -0
  154. package/resources/oscu.js.map +1 -1
  155. package/resources/oscu.mjs +5 -0
  156. package/resources/oscu.mjs.map +1 -1
  157. package/resources/pricing/index.d.mts +3 -0
  158. package/resources/pricing/index.d.mts.map +1 -0
  159. package/resources/pricing/index.d.ts +3 -0
  160. package/resources/pricing/index.d.ts.map +1 -0
  161. package/resources/pricing/index.js +9 -0
  162. package/resources/pricing/index.js.map +1 -0
  163. package/resources/pricing/index.mjs +4 -0
  164. package/resources/pricing/index.mjs.map +1 -0
  165. package/resources/pricing/oscu.d.mts +25 -0
  166. package/resources/pricing/oscu.d.mts.map +1 -0
  167. package/resources/pricing/oscu.d.ts +25 -0
  168. package/resources/pricing/oscu.d.ts.map +1 -0
  169. package/resources/pricing/oscu.js +16 -0
  170. package/resources/pricing/oscu.js.map +1 -0
  171. package/resources/pricing/oscu.mjs +12 -0
  172. package/resources/pricing/oscu.mjs.map +1 -0
  173. package/resources/pricing/pricing.d.mts +10 -0
  174. package/resources/pricing/pricing.d.mts.map +1 -0
  175. package/resources/pricing/pricing.d.ts +10 -0
  176. package/resources/pricing/pricing.d.ts.map +1 -0
  177. package/resources/pricing/pricing.js +14 -0
  178. package/resources/pricing/pricing.js.map +1 -0
  179. package/resources/pricing/pricing.mjs +9 -0
  180. package/resources/pricing/pricing.mjs.map +1 -0
  181. package/resources/pricing.d.mts +2 -0
  182. package/resources/pricing.d.mts.map +1 -0
  183. package/resources/pricing.d.ts +2 -0
  184. package/resources/pricing.d.ts.map +1 -0
  185. package/resources/pricing.js +6 -0
  186. package/resources/pricing.js.map +1 -0
  187. package/resources/pricing.mjs +3 -0
  188. package/resources/pricing.mjs.map +1 -0
  189. package/resources/usages.d.mts +29 -4
  190. package/resources/usages.d.mts.map +1 -1
  191. package/resources/usages.d.ts +29 -4
  192. package/resources/usages.d.ts.map +1 -1
  193. package/resources/workflows.d.mts +1298 -1152
  194. package/resources/workflows.d.mts.map +1 -1
  195. package/resources/workflows.d.ts +1298 -1152
  196. package/resources/workflows.d.ts.map +1 -1
  197. package/resources/workflows.js +8 -4
  198. package/resources/workflows.js.map +1 -1
  199. package/resources/workflows.mjs +8 -4
  200. package/resources/workflows.mjs.map +1 -1
  201. package/src/client.ts +24 -11
  202. package/src/index.ts +14 -0
  203. package/src/internal/request-options.ts +0 -2
  204. package/src/internal/types.ts +6 -8
  205. package/src/internal/utils/log.ts +2 -0
  206. package/src/lib/workflow.ts +4 -4
  207. package/src/lib/workflow_converter.ts +1250 -0
  208. package/src/resources/assets/assets.ts +17 -13
  209. package/src/resources/assets/index.ts +0 -6
  210. package/src/resources/generate.ts +112 -0
  211. package/src/resources/index.ts +3 -1
  212. package/src/resources/jobs.ts +54 -4
  213. package/src/resources/models/examples.ts +28 -0
  214. package/src/resources/models/models.ts +100 -11
  215. package/src/resources/models/train.ts +28 -0
  216. package/src/resources/oscu.ts +5 -0
  217. package/src/resources/pricing/index.ts +4 -0
  218. package/src/resources/pricing/oscu.ts +35 -0
  219. package/src/resources/pricing/pricing.ts +15 -0
  220. package/src/resources/pricing.ts +3 -0
  221. package/src/resources/usages.ts +33 -3
  222. package/src/resources/workflows.ts +1691 -1519
  223. package/src/version.ts +1 -1
  224. package/version.d.mts +1 -1
  225. package/version.d.ts +1 -1
  226. package/version.js +1 -1
  227. package/version.mjs +1 -1
  228. package/resources/assets/public.d.mts +0 -1538
  229. package/resources/assets/public.d.mts.map +0 -1
  230. package/resources/assets/public.d.ts +0 -1538
  231. package/resources/assets/public.d.ts.map +0 -1
  232. package/resources/assets/public.js +0 -28
  233. package/resources/assets/public.js.map +0 -1
  234. package/resources/assets/public.mjs +0 -24
  235. package/resources/assets/public.mjs.map +0 -1
  236. package/src/resources/assets/public.ts +0 -2461
@@ -1,2461 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { APIResource } from '../../core/resource';
4
- import { APIPromise } from '../../core/api-promise';
5
- import { RequestOptions } from '../../internal/request-options';
6
- import { path } from '../../internal/utils/path';
7
-
8
- export class Public extends APIResource {
9
- /**
10
- * Get the details of an asset. @deprecated Use GET /assets/{assetId} with
11
- * Authorization: public-auth-token header instead.
12
- *
13
- * @deprecated
14
- */
15
- retrieve(assetID: string, options?: RequestOptions): APIPromise<PublicRetrieveResponse> {
16
- return this._client.get(path`/assets/public/${assetID}`, { ...options, __security: {} });
17
- }
18
-
19
- /**
20
- * List all public assets. @deprecated Use GET /assets with Authorization:
21
- * public-auth-token header instead.
22
- *
23
- * @deprecated
24
- */
25
- list(
26
- query: PublicListParams | null | undefined = {},
27
- options?: RequestOptions,
28
- ): APIPromise<PublicListResponse> {
29
- return this._client.get('/assets/public', { query, ...options, __security: {} });
30
- }
31
- }
32
-
33
- export interface PublicRetrieveResponse {
34
- asset: PublicRetrieveResponse.Asset;
35
- }
36
-
37
- export namespace PublicRetrieveResponse {
38
- export interface Asset {
39
- /**
40
- * The asset ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw")
41
- */
42
- id: string;
43
-
44
- /**
45
- * The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea")
46
- */
47
- authorId: string;
48
-
49
- /**
50
- * A list of CollectionId this asset belongs to
51
- */
52
- collectionIds: Array<string>;
53
-
54
- /**
55
- * The asset creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
56
- */
57
- createdAt: string;
58
-
59
- /**
60
- * List of edit capabilities
61
- */
62
- editCapabilities: Array<
63
- | 'DETECTION'
64
- | 'GENERATIVE_FILL'
65
- | 'PIXELATE'
66
- | 'PROMPT_EDITING'
67
- | 'REFINE'
68
- | 'REFRAME'
69
- | 'REMOVE_BACKGROUND'
70
- | 'SEGMENTATION'
71
- | 'UPSCALE'
72
- | 'UPSCALE_360'
73
- | 'VECTORIZATION'
74
- >;
75
-
76
- /**
77
- * The kind of asset
78
- */
79
- kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
80
-
81
- /**
82
- * Metadata of the asset with some additional information
83
- */
84
- metadata: Asset.Metadata;
85
-
86
- /**
87
- * The mime type of the asset (example: "image/png")
88
- */
89
- mimeType: string;
90
-
91
- /**
92
- * The owner (project) ID (example: "proj_23tlk332lkht3kl2" or
93
- * "team_dlkhgs23tlk3hlkth32lkht3kl2" for old teams)
94
- */
95
- ownerId: string;
96
-
97
- /**
98
- * The privacy of the asset
99
- */
100
- privacy: 'private' | 'public' | 'unlisted';
101
-
102
- /**
103
- * The properties of the asset, content may depend on the kind of asset returned
104
- */
105
- properties: Asset.Properties;
106
-
107
- /**
108
- * source of the asset
109
- */
110
- source:
111
- | '3d23d'
112
- | '3d23d:texture'
113
- | '3d:texture'
114
- | '3d:texture:albedo'
115
- | '3d:texture:metallic'
116
- | '3d:texture:mtl'
117
- | '3d:texture:normal'
118
- | '3d:texture:roughness'
119
- | 'audio2audio'
120
- | 'audio2video'
121
- | 'background-removal'
122
- | 'canvas'
123
- | 'canvas-drawing'
124
- | 'canvas-export'
125
- | 'detection'
126
- | 'generative-fill'
127
- | 'image-prompt-editing'
128
- | 'img23d'
129
- | 'img2img'
130
- | 'img2video'
131
- | 'inference-control-net'
132
- | 'inference-control-net-img'
133
- | 'inference-control-net-inpainting'
134
- | 'inference-control-net-inpainting-ip-adapter'
135
- | 'inference-control-net-ip-adapter'
136
- | 'inference-control-net-reference'
137
- | 'inference-control-net-texture'
138
- | 'inference-img'
139
- | 'inference-img-ip-adapter'
140
- | 'inference-img-texture'
141
- | 'inference-in-paint'
142
- | 'inference-in-paint-ip-adapter'
143
- | 'inference-reference'
144
- | 'inference-reference-texture'
145
- | 'inference-txt'
146
- | 'inference-txt-ip-adapter'
147
- | 'inference-txt-texture'
148
- | 'patch'
149
- | 'pixelization'
150
- | 'reframe'
151
- | 'restyle'
152
- | 'segment'
153
- | 'segmentation-image'
154
- | 'segmentation-mask'
155
- | 'skybox-3d'
156
- | 'skybox-base-360'
157
- | 'skybox-hdri'
158
- | 'texture'
159
- | 'texture:albedo'
160
- | 'texture:ao'
161
- | 'texture:edge'
162
- | 'texture:height'
163
- | 'texture:metallic'
164
- | 'texture:normal'
165
- | 'texture:smoothness'
166
- | 'txt23d'
167
- | 'txt2audio'
168
- | 'txt2img'
169
- | 'txt2video'
170
- | 'unknown'
171
- | 'uploaded'
172
- | 'uploaded-3d'
173
- | 'uploaded-audio'
174
- | 'uploaded-avatar'
175
- | 'uploaded-video'
176
- | 'upscale'
177
- | 'upscale-skybox'
178
- | 'upscale-texture'
179
- | 'upscale-video'
180
- | 'vectorization'
181
- | 'video23d'
182
- | 'video2audio'
183
- | 'video2img'
184
- | 'video2video'
185
- | 'voice-clone';
186
-
187
- /**
188
- * The actual status
189
- */
190
- status: 'error' | 'pending' | 'success';
191
-
192
- /**
193
- * The associated tags (example: ["sci-fi", "landscape"])
194
- */
195
- tags: Array<string>;
196
-
197
- /**
198
- * The asset last update date as an ISO string (example:
199
- * "2023-02-03T11:19:41.579Z")
200
- */
201
- updatedAt: string;
202
-
203
- /**
204
- * Signed URL to get the asset content
205
- */
206
- url: string;
207
-
208
- /**
209
- * Automatic captioning of the asset
210
- */
211
- automaticCaptioning?: string;
212
-
213
- /**
214
- * The description, it will contain in priority:
215
- *
216
- * - the manual description
217
- * - the advanced captioning when the asset is used in training flow
218
- * - the automatic captioning
219
- */
220
- description?: string;
221
-
222
- /**
223
- * The embedding of the asset when requested.
224
- *
225
- * Only available when an asset can be embedded (ie: not Detection maps)
226
- */
227
- embedding?: Array<number>;
228
-
229
- /**
230
- * The video asset's first frame.
231
- *
232
- * Contains the assetId and the url of the first frame.
233
- */
234
- firstFrame?: Asset.FirstFrame;
235
-
236
- /**
237
- * Whether the asset is hidden.
238
- */
239
- isHidden?: boolean;
240
-
241
- /**
242
- * The video asset's last frame.
243
- *
244
- * Contains the assetId and the url of the last frame.
245
- */
246
- lastFrame?: Asset.LastFrame;
247
-
248
- /**
249
- * The NSFW labels
250
- */
251
- nsfw?: Array<string>;
252
-
253
- /**
254
- * The original file url.
255
- *
256
- * Contains the url of the original file. without any conversion. Only available
257
- * for some specific video, audio and threeD assets. Is only specified if the given
258
- * asset data has been replaced with a new file during the creation of the asset.
259
- */
260
- originalFileUrl?: string;
261
-
262
- /**
263
- * The output index of the asset within a job This index is an positive integer
264
- * that starts at 0 It is used to differentiate between multiple outputs of the
265
- * same job If the job has only one output, this index is 0
266
- */
267
- outputIndex?: number;
268
-
269
- /**
270
- * The asset's preview.
271
- *
272
- * Contains the assetId and the url of the preview.
273
- */
274
- preview?: Asset.Preview;
275
-
276
- /**
277
- * The asset's thumbnail.
278
- *
279
- * Contains the assetId and the url of the thumbnail.
280
- */
281
- thumbnail?: Asset.Thumbnail;
282
- }
283
-
284
- export namespace Asset {
285
- /**
286
- * Metadata of the asset with some additional information
287
- */
288
- export interface Metadata {
289
- kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
290
-
291
- /**
292
- * The type of the asset. Ex: 'inference-txt2img' will represent an asset generated
293
- * from a text to image model
294
- */
295
- type:
296
- | '3d-texture'
297
- | '3d-texture-albedo'
298
- | '3d-texture-metallic'
299
- | '3d-texture-mtl'
300
- | '3d-texture-normal'
301
- | '3d-texture-roughness'
302
- | '3d23d'
303
- | '3d23d-texture'
304
- | 'audio2audio'
305
- | 'audio2video'
306
- | 'background-removal'
307
- | 'canvas'
308
- | 'canvas-drawing'
309
- | 'canvas-export'
310
- | 'detection'
311
- | 'generative-fill'
312
- | 'image-prompt-editing'
313
- | 'img23d'
314
- | 'img2img'
315
- | 'img2video'
316
- | 'inference-controlnet'
317
- | 'inference-controlnet-img2img'
318
- | 'inference-controlnet-inpaint'
319
- | 'inference-controlnet-inpaint-ip-adapter'
320
- | 'inference-controlnet-ip-adapter'
321
- | 'inference-controlnet-reference'
322
- | 'inference-controlnet-texture'
323
- | 'inference-img2img'
324
- | 'inference-img2img-ip-adapter'
325
- | 'inference-img2img-texture'
326
- | 'inference-inpaint'
327
- | 'inference-inpaint-ip-adapter'
328
- | 'inference-reference'
329
- | 'inference-reference-texture'
330
- | 'inference-txt2img'
331
- | 'inference-txt2img-ip-adapter'
332
- | 'inference-txt2img-texture'
333
- | 'patch'
334
- | 'pixelization'
335
- | 'reframe'
336
- | 'restyle'
337
- | 'segment'
338
- | 'segmentation-image'
339
- | 'segmentation-mask'
340
- | 'skybox-3d'
341
- | 'skybox-base-360'
342
- | 'skybox-hdri'
343
- | 'texture'
344
- | 'texture-albedo'
345
- | 'texture-ao'
346
- | 'texture-edge'
347
- | 'texture-height'
348
- | 'texture-metallic'
349
- | 'texture-normal'
350
- | 'texture-smoothness'
351
- | 'txt23d'
352
- | 'txt2audio'
353
- | 'txt2img'
354
- | 'txt2video'
355
- | 'unknown'
356
- | 'uploaded'
357
- | 'uploaded-3d'
358
- | 'uploaded-audio'
359
- | 'uploaded-avatar'
360
- | 'uploaded-video'
361
- | 'upscale'
362
- | 'upscale-skybox'
363
- | 'upscale-texture'
364
- | 'upscale-video'
365
- | 'vectorization'
366
- | 'video23d'
367
- | 'video2audio'
368
- | 'video2img'
369
- | 'video2video'
370
- | 'voice-clone';
371
-
372
- /**
373
- * How angular is the surface? 0 is like a sphere, 1 is like a mechanical object
374
- */
375
- angular?: number;
376
-
377
- /**
378
- * The optional aspect ratio given for the generation, only applicable for some
379
- * models
380
- */
381
- aspectRatio?: string;
382
-
383
- /**
384
- * Int to set between 0 and 255 for the opacity of the background in the result
385
- * images.
386
- */
387
- backgroundOpacity?: number;
388
-
389
- /**
390
- * The baseModelId that maybe changed at inference time
391
- */
392
- baseModelId?: string;
393
-
394
- /**
395
- * A bounding box around the object of interest, in the format [x1, y1, x2, y2].
396
- */
397
- bbox?: Array<number>;
398
-
399
- /**
400
- * Remove small dark spots (i.e. “pepper”) and connect small bright cracks.
401
- */
402
- betterQuality?: boolean;
403
-
404
- /**
405
- * The control image already processed by canny detector. Must reference an
406
- * existing AssetId.
407
- */
408
- cannyStructureImage?: string;
409
-
410
- /**
411
- * Activate clustering.
412
- */
413
- clustering?: boolean;
414
-
415
- /**
416
- * Ensure upscaled tile have the same color histogram as original tile.
417
- */
418
- colorCorrection?: boolean;
419
-
420
- colorMode?: string;
421
-
422
- colorPrecision?: number;
423
-
424
- /**
425
- * Flux Kontext LoRA to style the image. For Flux Kontext Prompt Editing.
426
- */
427
- concepts?: Array<Metadata.Concept>;
428
-
429
- contours?: Array<Array<Array<Array<number>>>>;
430
-
431
- /**
432
- * End step for control.
433
- */
434
- controlEnd?: number;
435
-
436
- /**
437
- * The date when the asset was copied to a project
438
- */
439
- copiedAt?: string;
440
-
441
- cornerThreshold?: number;
442
-
443
- /**
444
- * Allow the generation of "hallucinations" during the upscale process, which adds
445
- * additional details and deviates from the original image. Default: optimized for
446
- * your preset and style.
447
- */
448
- creativity?: number;
449
-
450
- /**
451
- * Amount of decay in creativity over the upscale process. The lowest the value,
452
- * the less the creativity will be preserved over the upscale process.
453
- */
454
- creativityDecay?: number;
455
-
456
- /**
457
- * If true, use the default parameters
458
- */
459
- defaultParameters?: boolean;
460
-
461
- /**
462
- * The depth fidelity if a depth image provided
463
- */
464
- depthFidelity?: number;
465
-
466
- /**
467
- * The control image processed by depth estimator. Must reference an existing
468
- * AssetId.
469
- */
470
- depthImage?: string;
471
-
472
- /**
473
- * Amount of details to remove or add
474
- */
475
- detailsLevel?: number;
476
-
477
- /**
478
- * The number of pixels to dilate the result masks.
479
- */
480
- dilate?: number;
481
-
482
- /**
483
- * Contrast factor for Grayscale detector
484
- */
485
- factor?: number;
486
-
487
- filterSpeckle?: number;
488
-
489
- /**
490
- * Determine the scale at which the upscale process works.
491
- *
492
- * - With a small value, the upscale works at the largest scale, resulting in fewer
493
- * added details and more coherent images. Ideal for portraits, for example.
494
- * - With a large value, the upscale works at the smallest scale, resulting in more
495
- * added details and more hallucinations. Ideal for landscapes, for example.
496
- *
497
- * (info): A small value is slower and more expensive to run.
498
- */
499
- fractality?: number;
500
-
501
- /**
502
- * Apply extra control to the Skybox 360 geometry. The higher the value, the more
503
- * the 360 geometry will influence the generated skybox image.
504
- *
505
- * Use with caution. Default is adapted to the other parameters.
506
- */
507
- geometryEnforcement?: number;
508
-
509
- /**
510
- * The guidance used to generate this asset
511
- */
512
- guidance?: number;
513
-
514
- halfMode?: boolean;
515
-
516
- hdr?: number;
517
-
518
- height?: number;
519
-
520
- /**
521
- * High threshold for Canny detector
522
- */
523
- highThreshold?: number;
524
-
525
- /**
526
- * (deprecated) Horizontal expansion ratio.
527
- */
528
- horizontalExpansionRatio?: number;
529
-
530
- /**
531
- * The input image to process. Must reference an existing AssetId or be a data URL.
532
- */
533
- image?: string;
534
-
535
- /**
536
- * Strengthen the similarity to the original image during the upscale. Default:
537
- * optimized for your preset and style.
538
- */
539
- imageFidelity?: number;
540
-
541
- /**
542
- * Preserve the seamless properties of skybox or texture images. Input has to be of
543
- * same type (seamless).
544
- */
545
- imageType?: 'seamfull' | 'skybox' | 'texture';
546
-
547
- /**
548
- * The id of the Inference describing how this image was generated
549
- */
550
- inferenceId?: string;
551
-
552
- /**
553
- * When set to `high`, allows to better preserve details from the input images in
554
- * the output. This is especially useful when using images that contain elements
555
- * like faces or logos that require accurate preservation in the generated image.
556
- *
557
- * You can provide multiple input images that will all be preserved with high
558
- * fidelity, but keep in mind that the first image will be preserved with richer
559
- * textures and finer details, so if you include elements such as faces, consider
560
- * placing them in the first image.
561
- *
562
- * Only available for the `gpt-image-1` model.
563
- */
564
- inputFidelity?: 'high' | 'low';
565
-
566
- /**
567
- * Location of the input image in the output.
568
- */
569
- inputLocation?: 'bottom' | 'left' | 'middle' | 'right' | 'top';
570
-
571
- /**
572
- * To invert the relief
573
- */
574
- invert?: boolean;
575
-
576
- /**
577
- * How polished is the surface? 0 is like a rough surface, 1 is like a mirror
578
- */
579
- keypointThreshold?: number;
580
-
581
- layerDifference?: number;
582
-
583
- lengthThreshold?: number;
584
-
585
- /**
586
- * The ISO timestamp when the lock on the canvas will expire
587
- */
588
- lockExpiresAt?: string;
589
-
590
- /**
591
- * Low threshold for Canny detector
592
- */
593
- lowThreshold?: number;
594
-
595
- /**
596
- * The mask used for the asset generation or editing
597
- */
598
- mask?: string;
599
-
600
- maxIterations?: number;
601
-
602
- /**
603
- * Maximum threshold for Grayscale conversion
604
- */
605
- maxThreshold?: number;
606
-
607
- /**
608
- * Minimum threshold for Grayscale conversion
609
- */
610
- minThreshold?: number;
611
-
612
- /**
613
- * Modality to detect
614
- */
615
- modality?:
616
- | 'canny'
617
- | 'depth'
618
- | 'grayscale'
619
- | 'lineart_anime'
620
- | 'mlsd'
621
- | 'normal'
622
- | 'pose'
623
- | 'scribble'
624
- | 'segmentation'
625
- | 'sketch';
626
-
627
- mode?: string;
628
-
629
- /**
630
- * The modelId used to generate this asset
631
- */
632
- modelId?: string;
633
-
634
- /**
635
- * The type of the generator used
636
- */
637
- modelType?:
638
- | 'custom'
639
- | 'elevenlabs-voice'
640
- | 'flux.1'
641
- | 'flux.1-composition'
642
- | 'flux.1-kontext-dev'
643
- | 'flux.1-kontext-lora'
644
- | 'flux.1-krea-dev'
645
- | 'flux.1-krea-lora'
646
- | 'flux.1-lora'
647
- | 'flux.1-pro'
648
- | 'flux.1.1-pro-ultra'
649
- | 'flux.2-dev-edit-lora'
650
- | 'flux.2-dev-lora'
651
- | 'flux.2-klein-4b-edit-lora'
652
- | 'flux.2-klein-4b-lora'
653
- | 'flux.2-klein-9b-edit-lora'
654
- | 'flux.2-klein-9b-lora'
655
- | 'flux.2-klein-base-4b-edit-lora'
656
- | 'flux.2-klein-base-4b-lora'
657
- | 'flux.2-klein-base-9b-edit-lora'
658
- | 'flux.2-klein-base-9b-lora'
659
- | 'flux1.1-pro'
660
- | 'gpt-image-1'
661
- | 'qwen-image-2512-lora'
662
- | 'qwen-image-edit-2509-lora'
663
- | 'qwen-image-edit-2511-lora'
664
- | 'qwen-image-edit-lora'
665
- | 'qwen-image-lora'
666
- | 'sd-1_5'
667
- | 'sd-1_5-composition'
668
- | 'sd-1_5-lora'
669
- | 'sd-xl'
670
- | 'sd-xl-composition'
671
- | 'sd-xl-lora'
672
- | 'zimage-de-turbo-lora'
673
- | 'zimage-lora'
674
- | 'zimage-turbo-lora';
675
-
676
- name?: string;
677
-
678
- nbMasks?: number;
679
-
680
- /**
681
- * The negative prompt used to generate this asset
682
- */
683
- negativePrompt?: string;
684
-
685
- /**
686
- * Controls the influence of the negative prompt. Default 0 means the negative
687
- * prompt has no effect. Higher values increase negative prompt influence. Must
688
- * be > 0 if negativePrompt is provided.
689
- */
690
- negativePromptStrength?: number;
691
-
692
- /**
693
- * The number of denoising steps for each image generation.
694
- */
695
- numInferenceSteps?: number;
696
-
697
- /**
698
- * The number of outputs to generate.
699
- */
700
- numOutputs?: number;
701
-
702
- originalAssetId?: string;
703
-
704
- outputIndex?: number;
705
-
706
- /**
707
- * Overlap percentage for the output image.
708
- */
709
- overlapPercentage?: number;
710
-
711
- /**
712
- * Override the embeddings of the model. Only your prompt and negativePrompt will
713
- * be used. Use with caution.
714
- */
715
- overrideEmbeddings?: boolean;
716
-
717
- parentId?: string;
718
-
719
- parentJobId?: string;
720
-
721
- pathPrecision?: number;
722
-
723
- /**
724
- * List of points (label, x, y) in the image where label = 0 for background and 1
725
- * for object.
726
- */
727
- points?: Array<Array<number>>;
728
-
729
- /**
730
- * How polished is the surface? 0 is like a rough surface, 1 is like a mirror
731
- */
732
- polished?: number;
733
-
734
- preset?: string;
735
-
736
- progressPercent?: number;
737
-
738
- /**
739
- * The prompt that guided the asset generation or editing
740
- */
741
- prompt?: string;
742
-
743
- /**
744
- * Increase the fidelity to the prompt during upscale. Default: optimized for your
745
- * preset and style.
746
- */
747
- promptFidelity?: number;
748
-
749
- /**
750
- * How raised is the surface? 0 is flat like water, 1 is like a very rough rock
751
- */
752
- raised?: number;
753
-
754
- /**
755
- * The reference images used for the asset generation or editing
756
- */
757
- referenceImages?: Array<string>;
758
-
759
- /**
760
- * Additional refinement steps before scaling.
761
- *
762
- * If scalingFactor == 1, the refinement process will be applied (1 +
763
- * refinementSteps) times. If scalingFactor > 1, the refinement process will be
764
- * applied refinementSteps times.
765
- */
766
- refinementSteps?: number;
767
-
768
- /**
769
- * Remove background for Grayscale detector
770
- */
771
- removeBackground?: boolean;
772
-
773
- /**
774
- * Size proportion of the input image in the output.
775
- */
776
- resizeOption?: number;
777
-
778
- /**
779
- * Boolean to output the contours.
780
- */
781
- resultContours?: boolean;
782
-
783
- /**
784
- * Boolean to able output the cut out object.
785
- */
786
- resultImage?: boolean;
787
-
788
- /**
789
- * Boolean to able return the masks (binary image) in the response.
790
- */
791
- resultMask?: boolean;
792
-
793
- rootParentId?: string;
794
-
795
- /**
796
- * Save a flipbook of the texture. Deactivated when the input texture is larger
797
- * than 2048x2048px
798
- */
799
- saveFlipbook?: boolean;
800
-
801
- /**
802
- * Scaling factor (when `targetWidth` not specified)
803
- */
804
- scalingFactor?: number;
805
-
806
- /**
807
- * The scheduler used to generate this asset
808
- */
809
- scheduler?: string;
810
-
811
- /**
812
- * The seed used to generate this asset. <!> Can be a string or a number in some
813
- * cases <!>.
814
- */
815
- seed?: string;
816
-
817
- /**
818
- * Sharpen tiles.
819
- */
820
- sharpen?: boolean;
821
-
822
- /**
823
- * How shiny is the surface? 0 is like a matte surface, 1 is like a diamond
824
- */
825
- shiny?: number;
826
-
827
- size?: number;
828
-
829
- /**
830
- * Activate sketch detection instead of canny.
831
- */
832
- sketch?: boolean;
833
-
834
- sourceProjectId?: string;
835
-
836
- spliceThreshold?: number;
837
-
838
- /**
839
- * The strength
840
- *
841
- * Only available for the `flux-kontext` LoRA model.
842
- */
843
- strength?: number;
844
-
845
- /**
846
- * Strength for the input image structure preservation
847
- */
848
- structureFidelity?: number;
849
-
850
- /**
851
- * The control image for structure. A canny detector will be applied to this image.
852
- * Must reference an existing AssetId.
853
- */
854
- structureImage?: string;
855
-
856
- style?:
857
- | '3d-cartoon'
858
- | '3d-rendered'
859
- | 'anime'
860
- | 'cartoon'
861
- | 'cinematic'
862
- | 'claymation'
863
- | 'cloud-skydome'
864
- | 'comic'
865
- | 'cyberpunk'
866
- | 'enchanted'
867
- | 'fantasy'
868
- | 'ink'
869
- | 'manga'
870
- | 'manga-color'
871
- | 'minimalist'
872
- | 'neon-tron'
873
- | 'oil-painting'
874
- | 'pastel'
875
- | 'photo'
876
- | 'photography'
877
- | 'psychedelic'
878
- | 'retro-fantasy'
879
- | 'scifi-concept-art'
880
- | 'space'
881
- | 'standard'
882
- | 'whimsical';
883
-
884
- /**
885
- * The higher the value the more it will look like the style image(s)
886
- */
887
- styleFidelity?: number;
888
-
889
- /**
890
- * List of style images. Most of the time, only one image is enough. It must be
891
- * existing AssetIds.
892
- */
893
- styleImages?: Array<string>;
894
-
895
- /**
896
- * Condition the influence of the style image(s). The higher the value, the more
897
- * the style images will influence the upscaled image.
898
- */
899
- styleImagesFidelity?: number;
900
-
901
- /**
902
- * The target height of the output image.
903
- */
904
- targetHeight?: number;
905
-
906
- /**
907
- * Target width for the upscaled image, take priority over scaling factor
908
- */
909
- targetWidth?: number;
910
-
911
- /**
912
- * A textual description / keywords describing the object of interest.
913
- */
914
- text?: string;
915
-
916
- /**
917
- * The asset to convert in texture maps. Must reference an existing AssetId.
918
- */
919
- texture?: string;
920
-
921
- /**
922
- * The thumbnail of the canvas
923
- */
924
- thumbnail?: Metadata.Thumbnail;
925
-
926
- /**
927
- * If set to true, during the upscaling process, the model will match tiles of the
928
- * source image with tiles of the style image(s). This will result in a more
929
- * coherent restyle. Works best with style images that have a similar composition.
930
- */
931
- tileStyle?: boolean;
932
-
933
- trainingImage?: boolean;
934
-
935
- /**
936
- * (deprecated) Vertical expansion ratio.
937
- */
938
- verticalExpansionRatio?: number;
939
-
940
- /**
941
- * The width of the rendered image.
942
- */
943
- width?: number;
944
- }
945
-
946
- export namespace Metadata {
947
- export interface Concept {
948
- /**
949
- * The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w")
950
- */
951
- modelId: string;
952
-
953
- /**
954
- * The scale of the model (example: 1.0) For Flux Kontext Prompt Editing, the scale
955
- * is between 0 and 2.
956
- */
957
- scale: number;
958
-
959
- /**
960
- * The epoch of the model (example: "000001") Only available for Flux Lora Trained
961
- * models
962
- */
963
- modelEpoch?: string;
964
- }
965
-
966
- /**
967
- * The thumbnail of the canvas
968
- */
969
- export interface Thumbnail {
970
- /**
971
- * The AssetId of the image used as a thumbnail for the canvas (example:
972
- * "asset_GTrL3mq4SXWyMxkOHRxlpw")
973
- */
974
- assetId: string;
975
-
976
- /**
977
- * The url of the image used as a thumbnail for the canvas
978
- */
979
- url: string;
980
- }
981
- }
982
-
983
- /**
984
- * The properties of the asset, content may depend on the kind of asset returned
985
- */
986
- export interface Properties {
987
- size: number;
988
-
989
- /**
990
- * Number of animation frames if animations exist
991
- */
992
- animationFrameCount?: number;
993
-
994
- /**
995
- * Bitrate of the media in bits per second
996
- */
997
- bitrate?: number;
998
-
999
- /**
1000
- * Number of bones if skeleton exists
1001
- */
1002
- boneCount?: number;
1003
-
1004
- /**
1005
- * Number of channels of the audio
1006
- */
1007
- channels?: number;
1008
-
1009
- /**
1010
- * Classification of the audio
1011
- */
1012
- classification?: 'effect' | 'interview' | 'music' | 'other' | 'sound' | 'speech' | 'text' | 'unknown';
1013
-
1014
- /**
1015
- * Codec name of the media
1016
- */
1017
- codecName?: string;
1018
-
1019
- /**
1020
- * Description of the audio
1021
- */
1022
- description?: string;
1023
-
1024
- /**
1025
- * Bounding box dimensions [width, height, depth]
1026
- */
1027
- dimensions?: Array<number>;
1028
-
1029
- /**
1030
- * Duration of the media in seconds
1031
- */
1032
- duration?: number;
1033
-
1034
- /**
1035
- * Number of faces/triangles in the mesh
1036
- */
1037
- faceCount?: number;
1038
-
1039
- /**
1040
- * Format of the mesh file (e.g. 'glb', etc.)
1041
- */
1042
- format?: string;
1043
-
1044
- /**
1045
- * Frame rate of the video in frames per second
1046
- */
1047
- frameRate?: number;
1048
-
1049
- /**
1050
- * Whether the mesh has animations
1051
- */
1052
- hasAnimations?: boolean;
1053
-
1054
- /**
1055
- * Whether the mesh has normal vectors
1056
- */
1057
- hasNormals?: boolean;
1058
-
1059
- /**
1060
- * Whether the mesh has bones/skeleton
1061
- */
1062
- hasSkeleton?: boolean;
1063
-
1064
- /**
1065
- * Whether the mesh has UV coordinates
1066
- */
1067
- hasUVs?: boolean;
1068
-
1069
- height?: number;
1070
-
1071
- /**
1072
- * Number of frames in the video
1073
- */
1074
- nbFrames?: number;
1075
-
1076
- /**
1077
- * Sample rate of the media in Hz
1078
- */
1079
- sampleRate?: number;
1080
-
1081
- /**
1082
- * Transcription of the audio
1083
- */
1084
- transcription?: Properties.Transcription;
1085
-
1086
- /**
1087
- * Number of vertices in the mesh
1088
- */
1089
- vertexCount?: number;
1090
-
1091
- width?: number;
1092
- }
1093
-
1094
- export namespace Properties {
1095
- /**
1096
- * Transcription of the audio
1097
- */
1098
- export interface Transcription {
1099
- text: string;
1100
- }
1101
- }
1102
-
1103
- /**
1104
- * The video asset's first frame.
1105
- *
1106
- * Contains the assetId and the url of the first frame.
1107
- */
1108
- export interface FirstFrame {
1109
- assetId: string;
1110
-
1111
- url: string;
1112
- }
1113
-
1114
- /**
1115
- * The video asset's last frame.
1116
- *
1117
- * Contains the assetId and the url of the last frame.
1118
- */
1119
- export interface LastFrame {
1120
- assetId: string;
1121
-
1122
- url: string;
1123
- }
1124
-
1125
- /**
1126
- * The asset's preview.
1127
- *
1128
- * Contains the assetId and the url of the preview.
1129
- */
1130
- export interface Preview {
1131
- assetId: string;
1132
-
1133
- url: string;
1134
- }
1135
-
1136
- /**
1137
- * The asset's thumbnail.
1138
- *
1139
- * Contains the assetId and the url of the thumbnail.
1140
- */
1141
- export interface Thumbnail {
1142
- assetId: string;
1143
-
1144
- url: string;
1145
- }
1146
- }
1147
- }
1148
-
1149
- export interface PublicListResponse {
1150
- assets: Array<PublicListResponse.Asset>;
1151
-
1152
- /**
1153
- * A token to query the next page of assets
1154
- */
1155
- nextPaginationToken?: string;
1156
- }
1157
-
1158
- export namespace PublicListResponse {
1159
- export interface Asset {
1160
- /**
1161
- * The asset ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw")
1162
- */
1163
- id: string;
1164
-
1165
- /**
1166
- * The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea")
1167
- */
1168
- authorId: string;
1169
-
1170
- /**
1171
- * A list of CollectionId this asset belongs to
1172
- */
1173
- collectionIds: Array<string>;
1174
-
1175
- /**
1176
- * The asset creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
1177
- */
1178
- createdAt: string;
1179
-
1180
- /**
1181
- * List of edit capabilities
1182
- */
1183
- editCapabilities: Array<
1184
- | 'DETECTION'
1185
- | 'GENERATIVE_FILL'
1186
- | 'PIXELATE'
1187
- | 'PROMPT_EDITING'
1188
- | 'REFINE'
1189
- | 'REFRAME'
1190
- | 'REMOVE_BACKGROUND'
1191
- | 'SEGMENTATION'
1192
- | 'UPSCALE'
1193
- | 'UPSCALE_360'
1194
- | 'VECTORIZATION'
1195
- >;
1196
-
1197
- /**
1198
- * The kind of asset
1199
- */
1200
- kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
1201
-
1202
- /**
1203
- * Metadata of the asset with some additional information
1204
- */
1205
- metadata: Asset.Metadata;
1206
-
1207
- /**
1208
- * The mime type of the asset (example: "image/png")
1209
- */
1210
- mimeType: string;
1211
-
1212
- /**
1213
- * The owner (project) ID (example: "proj_23tlk332lkht3kl2" or
1214
- * "team_dlkhgs23tlk3hlkth32lkht3kl2" for old teams)
1215
- */
1216
- ownerId: string;
1217
-
1218
- /**
1219
- * The privacy of the asset
1220
- */
1221
- privacy: 'private' | 'public' | 'unlisted';
1222
-
1223
- /**
1224
- * The properties of the asset, content may depend on the kind of asset returned
1225
- */
1226
- properties: Asset.Properties;
1227
-
1228
- /**
1229
- * source of the asset
1230
- */
1231
- source:
1232
- | '3d23d'
1233
- | '3d23d:texture'
1234
- | '3d:texture'
1235
- | '3d:texture:albedo'
1236
- | '3d:texture:metallic'
1237
- | '3d:texture:mtl'
1238
- | '3d:texture:normal'
1239
- | '3d:texture:roughness'
1240
- | 'audio2audio'
1241
- | 'audio2video'
1242
- | 'background-removal'
1243
- | 'canvas'
1244
- | 'canvas-drawing'
1245
- | 'canvas-export'
1246
- | 'detection'
1247
- | 'generative-fill'
1248
- | 'image-prompt-editing'
1249
- | 'img23d'
1250
- | 'img2img'
1251
- | 'img2video'
1252
- | 'inference-control-net'
1253
- | 'inference-control-net-img'
1254
- | 'inference-control-net-inpainting'
1255
- | 'inference-control-net-inpainting-ip-adapter'
1256
- | 'inference-control-net-ip-adapter'
1257
- | 'inference-control-net-reference'
1258
- | 'inference-control-net-texture'
1259
- | 'inference-img'
1260
- | 'inference-img-ip-adapter'
1261
- | 'inference-img-texture'
1262
- | 'inference-in-paint'
1263
- | 'inference-in-paint-ip-adapter'
1264
- | 'inference-reference'
1265
- | 'inference-reference-texture'
1266
- | 'inference-txt'
1267
- | 'inference-txt-ip-adapter'
1268
- | 'inference-txt-texture'
1269
- | 'patch'
1270
- | 'pixelization'
1271
- | 'reframe'
1272
- | 'restyle'
1273
- | 'segment'
1274
- | 'segmentation-image'
1275
- | 'segmentation-mask'
1276
- | 'skybox-3d'
1277
- | 'skybox-base-360'
1278
- | 'skybox-hdri'
1279
- | 'texture'
1280
- | 'texture:albedo'
1281
- | 'texture:ao'
1282
- | 'texture:edge'
1283
- | 'texture:height'
1284
- | 'texture:metallic'
1285
- | 'texture:normal'
1286
- | 'texture:smoothness'
1287
- | 'txt23d'
1288
- | 'txt2audio'
1289
- | 'txt2img'
1290
- | 'txt2video'
1291
- | 'unknown'
1292
- | 'uploaded'
1293
- | 'uploaded-3d'
1294
- | 'uploaded-audio'
1295
- | 'uploaded-avatar'
1296
- | 'uploaded-video'
1297
- | 'upscale'
1298
- | 'upscale-skybox'
1299
- | 'upscale-texture'
1300
- | 'upscale-video'
1301
- | 'vectorization'
1302
- | 'video23d'
1303
- | 'video2audio'
1304
- | 'video2img'
1305
- | 'video2video'
1306
- | 'voice-clone';
1307
-
1308
- /**
1309
- * The actual status
1310
- */
1311
- status: 'error' | 'pending' | 'success';
1312
-
1313
- /**
1314
- * The associated tags (example: ["sci-fi", "landscape"])
1315
- */
1316
- tags: Array<string>;
1317
-
1318
- /**
1319
- * The asset last update date as an ISO string (example:
1320
- * "2023-02-03T11:19:41.579Z")
1321
- */
1322
- updatedAt: string;
1323
-
1324
- /**
1325
- * Signed URL to get the asset content
1326
- */
1327
- url: string;
1328
-
1329
- /**
1330
- * Automatic captioning of the asset
1331
- */
1332
- automaticCaptioning?: string;
1333
-
1334
- /**
1335
- * The description, it will contain in priority:
1336
- *
1337
- * - the manual description
1338
- * - the advanced captioning when the asset is used in training flow
1339
- * - the automatic captioning
1340
- */
1341
- description?: string;
1342
-
1343
- /**
1344
- * The embedding of the asset when requested.
1345
- *
1346
- * Only available when an asset can be embedded (ie: not Detection maps)
1347
- */
1348
- embedding?: Array<number>;
1349
-
1350
- /**
1351
- * The video asset's first frame.
1352
- *
1353
- * Contains the assetId and the url of the first frame.
1354
- */
1355
- firstFrame?: Asset.FirstFrame;
1356
-
1357
- /**
1358
- * Whether the asset is hidden.
1359
- */
1360
- isHidden?: boolean;
1361
-
1362
- /**
1363
- * The video asset's last frame.
1364
- *
1365
- * Contains the assetId and the url of the last frame.
1366
- */
1367
- lastFrame?: Asset.LastFrame;
1368
-
1369
- /**
1370
- * The NSFW labels
1371
- */
1372
- nsfw?: Array<string>;
1373
-
1374
- /**
1375
- * The original file url.
1376
- *
1377
- * Contains the url of the original file. without any conversion. Only available
1378
- * for some specific video, audio and threeD assets. Is only specified if the given
1379
- * asset data has been replaced with a new file during the creation of the asset.
1380
- */
1381
- originalFileUrl?: string;
1382
-
1383
- /**
1384
- * The output index of the asset within a job This index is an positive integer
1385
- * that starts at 0 It is used to differentiate between multiple outputs of the
1386
- * same job If the job has only one output, this index is 0
1387
- */
1388
- outputIndex?: number;
1389
-
1390
- /**
1391
- * The asset's preview.
1392
- *
1393
- * Contains the assetId and the url of the preview.
1394
- */
1395
- preview?: Asset.Preview;
1396
-
1397
- /**
1398
- * The asset's thumbnail.
1399
- *
1400
- * Contains the assetId and the url of the thumbnail.
1401
- */
1402
- thumbnail?: Asset.Thumbnail;
1403
- }
1404
-
1405
- export namespace Asset {
1406
- /**
1407
- * Metadata of the asset with some additional information
1408
- */
1409
- export interface Metadata {
1410
- kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
1411
-
1412
- /**
1413
- * The type of the asset. Ex: 'inference-txt2img' will represent an asset generated
1414
- * from a text to image model
1415
- */
1416
- type:
1417
- | '3d-texture'
1418
- | '3d-texture-albedo'
1419
- | '3d-texture-metallic'
1420
- | '3d-texture-mtl'
1421
- | '3d-texture-normal'
1422
- | '3d-texture-roughness'
1423
- | '3d23d'
1424
- | '3d23d-texture'
1425
- | 'audio2audio'
1426
- | 'audio2video'
1427
- | 'background-removal'
1428
- | 'canvas'
1429
- | 'canvas-drawing'
1430
- | 'canvas-export'
1431
- | 'detection'
1432
- | 'generative-fill'
1433
- | 'image-prompt-editing'
1434
- | 'img23d'
1435
- | 'img2img'
1436
- | 'img2video'
1437
- | 'inference-controlnet'
1438
- | 'inference-controlnet-img2img'
1439
- | 'inference-controlnet-inpaint'
1440
- | 'inference-controlnet-inpaint-ip-adapter'
1441
- | 'inference-controlnet-ip-adapter'
1442
- | 'inference-controlnet-reference'
1443
- | 'inference-controlnet-texture'
1444
- | 'inference-img2img'
1445
- | 'inference-img2img-ip-adapter'
1446
- | 'inference-img2img-texture'
1447
- | 'inference-inpaint'
1448
- | 'inference-inpaint-ip-adapter'
1449
- | 'inference-reference'
1450
- | 'inference-reference-texture'
1451
- | 'inference-txt2img'
1452
- | 'inference-txt2img-ip-adapter'
1453
- | 'inference-txt2img-texture'
1454
- | 'patch'
1455
- | 'pixelization'
1456
- | 'reframe'
1457
- | 'restyle'
1458
- | 'segment'
1459
- | 'segmentation-image'
1460
- | 'segmentation-mask'
1461
- | 'skybox-3d'
1462
- | 'skybox-base-360'
1463
- | 'skybox-hdri'
1464
- | 'texture'
1465
- | 'texture-albedo'
1466
- | 'texture-ao'
1467
- | 'texture-edge'
1468
- | 'texture-height'
1469
- | 'texture-metallic'
1470
- | 'texture-normal'
1471
- | 'texture-smoothness'
1472
- | 'txt23d'
1473
- | 'txt2audio'
1474
- | 'txt2img'
1475
- | 'txt2video'
1476
- | 'unknown'
1477
- | 'uploaded'
1478
- | 'uploaded-3d'
1479
- | 'uploaded-audio'
1480
- | 'uploaded-avatar'
1481
- | 'uploaded-video'
1482
- | 'upscale'
1483
- | 'upscale-skybox'
1484
- | 'upscale-texture'
1485
- | 'upscale-video'
1486
- | 'vectorization'
1487
- | 'video23d'
1488
- | 'video2audio'
1489
- | 'video2img'
1490
- | 'video2video'
1491
- | 'voice-clone';
1492
-
1493
- /**
1494
- * How angular is the surface? 0 is like a sphere, 1 is like a mechanical object
1495
- */
1496
- angular?: number;
1497
-
1498
- /**
1499
- * The optional aspect ratio given for the generation, only applicable for some
1500
- * models
1501
- */
1502
- aspectRatio?: string;
1503
-
1504
- /**
1505
- * Int to set between 0 and 255 for the opacity of the background in the result
1506
- * images.
1507
- */
1508
- backgroundOpacity?: number;
1509
-
1510
- /**
1511
- * The baseModelId that maybe changed at inference time
1512
- */
1513
- baseModelId?: string;
1514
-
1515
- /**
1516
- * A bounding box around the object of interest, in the format [x1, y1, x2, y2].
1517
- */
1518
- bbox?: Array<number>;
1519
-
1520
- /**
1521
- * Remove small dark spots (i.e. “pepper”) and connect small bright cracks.
1522
- */
1523
- betterQuality?: boolean;
1524
-
1525
- /**
1526
- * The control image already processed by canny detector. Must reference an
1527
- * existing AssetId.
1528
- */
1529
- cannyStructureImage?: string;
1530
-
1531
- /**
1532
- * Activate clustering.
1533
- */
1534
- clustering?: boolean;
1535
-
1536
- /**
1537
- * Ensure upscaled tile have the same color histogram as original tile.
1538
- */
1539
- colorCorrection?: boolean;
1540
-
1541
- colorMode?: string;
1542
-
1543
- colorPrecision?: number;
1544
-
1545
- /**
1546
- * Flux Kontext LoRA to style the image. For Flux Kontext Prompt Editing.
1547
- */
1548
- concepts?: Array<Metadata.Concept>;
1549
-
1550
- contours?: Array<Array<Array<Array<number>>>>;
1551
-
1552
- /**
1553
- * End step for control.
1554
- */
1555
- controlEnd?: number;
1556
-
1557
- /**
1558
- * The date when the asset was copied to a project
1559
- */
1560
- copiedAt?: string;
1561
-
1562
- cornerThreshold?: number;
1563
-
1564
- /**
1565
- * Allow the generation of "hallucinations" during the upscale process, which adds
1566
- * additional details and deviates from the original image. Default: optimized for
1567
- * your preset and style.
1568
- */
1569
- creativity?: number;
1570
-
1571
- /**
1572
- * Amount of decay in creativity over the upscale process. The lowest the value,
1573
- * the less the creativity will be preserved over the upscale process.
1574
- */
1575
- creativityDecay?: number;
1576
-
1577
- /**
1578
- * If true, use the default parameters
1579
- */
1580
- defaultParameters?: boolean;
1581
-
1582
- /**
1583
- * The depth fidelity if a depth image provided
1584
- */
1585
- depthFidelity?: number;
1586
-
1587
- /**
1588
- * The control image processed by depth estimator. Must reference an existing
1589
- * AssetId.
1590
- */
1591
- depthImage?: string;
1592
-
1593
- /**
1594
- * Amount of details to remove or add
1595
- */
1596
- detailsLevel?: number;
1597
-
1598
- /**
1599
- * The number of pixels to dilate the result masks.
1600
- */
1601
- dilate?: number;
1602
-
1603
- /**
1604
- * Contrast factor for Grayscale detector
1605
- */
1606
- factor?: number;
1607
-
1608
- filterSpeckle?: number;
1609
-
1610
- /**
1611
- * Determine the scale at which the upscale process works.
1612
- *
1613
- * - With a small value, the upscale works at the largest scale, resulting in fewer
1614
- * added details and more coherent images. Ideal for portraits, for example.
1615
- * - With a large value, the upscale works at the smallest scale, resulting in more
1616
- * added details and more hallucinations. Ideal for landscapes, for example.
1617
- *
1618
- * (info): A small value is slower and more expensive to run.
1619
- */
1620
- fractality?: number;
1621
-
1622
- /**
1623
- * Apply extra control to the Skybox 360 geometry. The higher the value, the more
1624
- * the 360 geometry will influence the generated skybox image.
1625
- *
1626
- * Use with caution. Default is adapted to the other parameters.
1627
- */
1628
- geometryEnforcement?: number;
1629
-
1630
- /**
1631
- * The guidance used to generate this asset
1632
- */
1633
- guidance?: number;
1634
-
1635
- halfMode?: boolean;
1636
-
1637
- hdr?: number;
1638
-
1639
- height?: number;
1640
-
1641
- /**
1642
- * High threshold for Canny detector
1643
- */
1644
- highThreshold?: number;
1645
-
1646
- /**
1647
- * (deprecated) Horizontal expansion ratio.
1648
- */
1649
- horizontalExpansionRatio?: number;
1650
-
1651
- /**
1652
- * The input image to process. Must reference an existing AssetId or be a data URL.
1653
- */
1654
- image?: string;
1655
-
1656
- /**
1657
- * Strengthen the similarity to the original image during the upscale. Default:
1658
- * optimized for your preset and style.
1659
- */
1660
- imageFidelity?: number;
1661
-
1662
- /**
1663
- * Preserve the seamless properties of skybox or texture images. Input has to be of
1664
- * same type (seamless).
1665
- */
1666
- imageType?: 'seamfull' | 'skybox' | 'texture';
1667
-
1668
- /**
1669
- * The id of the Inference describing how this image was generated
1670
- */
1671
- inferenceId?: string;
1672
-
1673
- /**
1674
- * When set to `high`, allows to better preserve details from the input images in
1675
- * the output. This is especially useful when using images that contain elements
1676
- * like faces or logos that require accurate preservation in the generated image.
1677
- *
1678
- * You can provide multiple input images that will all be preserved with high
1679
- * fidelity, but keep in mind that the first image will be preserved with richer
1680
- * textures and finer details, so if you include elements such as faces, consider
1681
- * placing them in the first image.
1682
- *
1683
- * Only available for the `gpt-image-1` model.
1684
- */
1685
- inputFidelity?: 'high' | 'low';
1686
-
1687
- /**
1688
- * Location of the input image in the output.
1689
- */
1690
- inputLocation?: 'bottom' | 'left' | 'middle' | 'right' | 'top';
1691
-
1692
- /**
1693
- * To invert the relief
1694
- */
1695
- invert?: boolean;
1696
-
1697
- /**
1698
- * How polished is the surface? 0 is like a rough surface, 1 is like a mirror
1699
- */
1700
- keypointThreshold?: number;
1701
-
1702
- layerDifference?: number;
1703
-
1704
- lengthThreshold?: number;
1705
-
1706
- /**
1707
- * The ISO timestamp when the lock on the canvas will expire
1708
- */
1709
- lockExpiresAt?: string;
1710
-
1711
- /**
1712
- * Low threshold for Canny detector
1713
- */
1714
- lowThreshold?: number;
1715
-
1716
- /**
1717
- * The mask used for the asset generation or editing
1718
- */
1719
- mask?: string;
1720
-
1721
- maxIterations?: number;
1722
-
1723
- /**
1724
- * Maximum threshold for Grayscale conversion
1725
- */
1726
- maxThreshold?: number;
1727
-
1728
- /**
1729
- * Minimum threshold for Grayscale conversion
1730
- */
1731
- minThreshold?: number;
1732
-
1733
- /**
1734
- * Modality to detect
1735
- */
1736
- modality?:
1737
- | 'canny'
1738
- | 'depth'
1739
- | 'grayscale'
1740
- | 'lineart_anime'
1741
- | 'mlsd'
1742
- | 'normal'
1743
- | 'pose'
1744
- | 'scribble'
1745
- | 'segmentation'
1746
- | 'sketch';
1747
-
1748
- mode?: string;
1749
-
1750
- /**
1751
- * The modelId used to generate this asset
1752
- */
1753
- modelId?: string;
1754
-
1755
- /**
1756
- * The type of the generator used
1757
- */
1758
- modelType?:
1759
- | 'custom'
1760
- | 'elevenlabs-voice'
1761
- | 'flux.1'
1762
- | 'flux.1-composition'
1763
- | 'flux.1-kontext-dev'
1764
- | 'flux.1-kontext-lora'
1765
- | 'flux.1-krea-dev'
1766
- | 'flux.1-krea-lora'
1767
- | 'flux.1-lora'
1768
- | 'flux.1-pro'
1769
- | 'flux.1.1-pro-ultra'
1770
- | 'flux.2-dev-edit-lora'
1771
- | 'flux.2-dev-lora'
1772
- | 'flux.2-klein-4b-edit-lora'
1773
- | 'flux.2-klein-4b-lora'
1774
- | 'flux.2-klein-9b-edit-lora'
1775
- | 'flux.2-klein-9b-lora'
1776
- | 'flux.2-klein-base-4b-edit-lora'
1777
- | 'flux.2-klein-base-4b-lora'
1778
- | 'flux.2-klein-base-9b-edit-lora'
1779
- | 'flux.2-klein-base-9b-lora'
1780
- | 'flux1.1-pro'
1781
- | 'gpt-image-1'
1782
- | 'qwen-image-2512-lora'
1783
- | 'qwen-image-edit-2509-lora'
1784
- | 'qwen-image-edit-2511-lora'
1785
- | 'qwen-image-edit-lora'
1786
- | 'qwen-image-lora'
1787
- | 'sd-1_5'
1788
- | 'sd-1_5-composition'
1789
- | 'sd-1_5-lora'
1790
- | 'sd-xl'
1791
- | 'sd-xl-composition'
1792
- | 'sd-xl-lora'
1793
- | 'zimage-de-turbo-lora'
1794
- | 'zimage-lora'
1795
- | 'zimage-turbo-lora';
1796
-
1797
- name?: string;
1798
-
1799
- nbMasks?: number;
1800
-
1801
- /**
1802
- * The negative prompt used to generate this asset
1803
- */
1804
- negativePrompt?: string;
1805
-
1806
- /**
1807
- * Controls the influence of the negative prompt. Default 0 means the negative
1808
- * prompt has no effect. Higher values increase negative prompt influence. Must
1809
- * be > 0 if negativePrompt is provided.
1810
- */
1811
- negativePromptStrength?: number;
1812
-
1813
- /**
1814
- * The number of denoising steps for each image generation.
1815
- */
1816
- numInferenceSteps?: number;
1817
-
1818
- /**
1819
- * The number of outputs to generate.
1820
- */
1821
- numOutputs?: number;
1822
-
1823
- originalAssetId?: string;
1824
-
1825
- outputIndex?: number;
1826
-
1827
- /**
1828
- * Overlap percentage for the output image.
1829
- */
1830
- overlapPercentage?: number;
1831
-
1832
- /**
1833
- * Override the embeddings of the model. Only your prompt and negativePrompt will
1834
- * be used. Use with caution.
1835
- */
1836
- overrideEmbeddings?: boolean;
1837
-
1838
- parentId?: string;
1839
-
1840
- parentJobId?: string;
1841
-
1842
- pathPrecision?: number;
1843
-
1844
- /**
1845
- * List of points (label, x, y) in the image where label = 0 for background and 1
1846
- * for object.
1847
- */
1848
- points?: Array<Array<number>>;
1849
-
1850
- /**
1851
- * How polished is the surface? 0 is like a rough surface, 1 is like a mirror
1852
- */
1853
- polished?: number;
1854
-
1855
- preset?: string;
1856
-
1857
- progressPercent?: number;
1858
-
1859
- /**
1860
- * The prompt that guided the asset generation or editing
1861
- */
1862
- prompt?: string;
1863
-
1864
- /**
1865
- * Increase the fidelity to the prompt during upscale. Default: optimized for your
1866
- * preset and style.
1867
- */
1868
- promptFidelity?: number;
1869
-
1870
- /**
1871
- * How raised is the surface? 0 is flat like water, 1 is like a very rough rock
1872
- */
1873
- raised?: number;
1874
-
1875
- /**
1876
- * The reference images used for the asset generation or editing
1877
- */
1878
- referenceImages?: Array<string>;
1879
-
1880
- /**
1881
- * Additional refinement steps before scaling.
1882
- *
1883
- * If scalingFactor == 1, the refinement process will be applied (1 +
1884
- * refinementSteps) times. If scalingFactor > 1, the refinement process will be
1885
- * applied refinementSteps times.
1886
- */
1887
- refinementSteps?: number;
1888
-
1889
- /**
1890
- * Remove background for Grayscale detector
1891
- */
1892
- removeBackground?: boolean;
1893
-
1894
- /**
1895
- * Size proportion of the input image in the output.
1896
- */
1897
- resizeOption?: number;
1898
-
1899
- /**
1900
- * Boolean to output the contours.
1901
- */
1902
- resultContours?: boolean;
1903
-
1904
- /**
1905
- * Boolean to able output the cut out object.
1906
- */
1907
- resultImage?: boolean;
1908
-
1909
- /**
1910
- * Boolean to able return the masks (binary image) in the response.
1911
- */
1912
- resultMask?: boolean;
1913
-
1914
- rootParentId?: string;
1915
-
1916
- /**
1917
- * Save a flipbook of the texture. Deactivated when the input texture is larger
1918
- * than 2048x2048px
1919
- */
1920
- saveFlipbook?: boolean;
1921
-
1922
- /**
1923
- * Scaling factor (when `targetWidth` not specified)
1924
- */
1925
- scalingFactor?: number;
1926
-
1927
- /**
1928
- * The scheduler used to generate this asset
1929
- */
1930
- scheduler?: string;
1931
-
1932
- /**
1933
- * The seed used to generate this asset. <!> Can be a string or a number in some
1934
- * cases <!>.
1935
- */
1936
- seed?: string;
1937
-
1938
- /**
1939
- * Sharpen tiles.
1940
- */
1941
- sharpen?: boolean;
1942
-
1943
- /**
1944
- * How shiny is the surface? 0 is like a matte surface, 1 is like a diamond
1945
- */
1946
- shiny?: number;
1947
-
1948
- size?: number;
1949
-
1950
- /**
1951
- * Activate sketch detection instead of canny.
1952
- */
1953
- sketch?: boolean;
1954
-
1955
- sourceProjectId?: string;
1956
-
1957
- spliceThreshold?: number;
1958
-
1959
- /**
1960
- * The strength
1961
- *
1962
- * Only available for the `flux-kontext` LoRA model.
1963
- */
1964
- strength?: number;
1965
-
1966
- /**
1967
- * Strength for the input image structure preservation
1968
- */
1969
- structureFidelity?: number;
1970
-
1971
- /**
1972
- * The control image for structure. A canny detector will be applied to this image.
1973
- * Must reference an existing AssetId.
1974
- */
1975
- structureImage?: string;
1976
-
1977
- style?:
1978
- | '3d-cartoon'
1979
- | '3d-rendered'
1980
- | 'anime'
1981
- | 'cartoon'
1982
- | 'cinematic'
1983
- | 'claymation'
1984
- | 'cloud-skydome'
1985
- | 'comic'
1986
- | 'cyberpunk'
1987
- | 'enchanted'
1988
- | 'fantasy'
1989
- | 'ink'
1990
- | 'manga'
1991
- | 'manga-color'
1992
- | 'minimalist'
1993
- | 'neon-tron'
1994
- | 'oil-painting'
1995
- | 'pastel'
1996
- | 'photo'
1997
- | 'photography'
1998
- | 'psychedelic'
1999
- | 'retro-fantasy'
2000
- | 'scifi-concept-art'
2001
- | 'space'
2002
- | 'standard'
2003
- | 'whimsical';
2004
-
2005
- /**
2006
- * The higher the value the more it will look like the style image(s)
2007
- */
2008
- styleFidelity?: number;
2009
-
2010
- /**
2011
- * List of style images. Most of the time, only one image is enough. It must be
2012
- * existing AssetIds.
2013
- */
2014
- styleImages?: Array<string>;
2015
-
2016
- /**
2017
- * Condition the influence of the style image(s). The higher the value, the more
2018
- * the style images will influence the upscaled image.
2019
- */
2020
- styleImagesFidelity?: number;
2021
-
2022
- /**
2023
- * The target height of the output image.
2024
- */
2025
- targetHeight?: number;
2026
-
2027
- /**
2028
- * Target width for the upscaled image, take priority over scaling factor
2029
- */
2030
- targetWidth?: number;
2031
-
2032
- /**
2033
- * A textual description / keywords describing the object of interest.
2034
- */
2035
- text?: string;
2036
-
2037
- /**
2038
- * The asset to convert in texture maps. Must reference an existing AssetId.
2039
- */
2040
- texture?: string;
2041
-
2042
- /**
2043
- * The thumbnail of the canvas
2044
- */
2045
- thumbnail?: Metadata.Thumbnail;
2046
-
2047
- /**
2048
- * If set to true, during the upscaling process, the model will match tiles of the
2049
- * source image with tiles of the style image(s). This will result in a more
2050
- * coherent restyle. Works best with style images that have a similar composition.
2051
- */
2052
- tileStyle?: boolean;
2053
-
2054
- trainingImage?: boolean;
2055
-
2056
- /**
2057
- * (deprecated) Vertical expansion ratio.
2058
- */
2059
- verticalExpansionRatio?: number;
2060
-
2061
- /**
2062
- * The width of the rendered image.
2063
- */
2064
- width?: number;
2065
- }
2066
-
2067
- export namespace Metadata {
2068
- export interface Concept {
2069
- /**
2070
- * The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w")
2071
- */
2072
- modelId: string;
2073
-
2074
- /**
2075
- * The scale of the model (example: 1.0) For Flux Kontext Prompt Editing, the scale
2076
- * is between 0 and 2.
2077
- */
2078
- scale: number;
2079
-
2080
- /**
2081
- * The epoch of the model (example: "000001") Only available for Flux Lora Trained
2082
- * models
2083
- */
2084
- modelEpoch?: string;
2085
- }
2086
-
2087
- /**
2088
- * The thumbnail of the canvas
2089
- */
2090
- export interface Thumbnail {
2091
- /**
2092
- * The AssetId of the image used as a thumbnail for the canvas (example:
2093
- * "asset_GTrL3mq4SXWyMxkOHRxlpw")
2094
- */
2095
- assetId: string;
2096
-
2097
- /**
2098
- * The url of the image used as a thumbnail for the canvas
2099
- */
2100
- url: string;
2101
- }
2102
- }
2103
-
2104
- /**
2105
- * The properties of the asset, content may depend on the kind of asset returned
2106
- */
2107
- export interface Properties {
2108
- size: number;
2109
-
2110
- /**
2111
- * Number of animation frames if animations exist
2112
- */
2113
- animationFrameCount?: number;
2114
-
2115
- /**
2116
- * Bitrate of the media in bits per second
2117
- */
2118
- bitrate?: number;
2119
-
2120
- /**
2121
- * Number of bones if skeleton exists
2122
- */
2123
- boneCount?: number;
2124
-
2125
- /**
2126
- * Number of channels of the audio
2127
- */
2128
- channels?: number;
2129
-
2130
- /**
2131
- * Classification of the audio
2132
- */
2133
- classification?: 'effect' | 'interview' | 'music' | 'other' | 'sound' | 'speech' | 'text' | 'unknown';
2134
-
2135
- /**
2136
- * Codec name of the media
2137
- */
2138
- codecName?: string;
2139
-
2140
- /**
2141
- * Description of the audio
2142
- */
2143
- description?: string;
2144
-
2145
- /**
2146
- * Bounding box dimensions [width, height, depth]
2147
- */
2148
- dimensions?: Array<number>;
2149
-
2150
- /**
2151
- * Duration of the media in seconds
2152
- */
2153
- duration?: number;
2154
-
2155
- /**
2156
- * Number of faces/triangles in the mesh
2157
- */
2158
- faceCount?: number;
2159
-
2160
- /**
2161
- * Format of the mesh file (e.g. 'glb', etc.)
2162
- */
2163
- format?: string;
2164
-
2165
- /**
2166
- * Frame rate of the video in frames per second
2167
- */
2168
- frameRate?: number;
2169
-
2170
- /**
2171
- * Whether the mesh has animations
2172
- */
2173
- hasAnimations?: boolean;
2174
-
2175
- /**
2176
- * Whether the mesh has normal vectors
2177
- */
2178
- hasNormals?: boolean;
2179
-
2180
- /**
2181
- * Whether the mesh has bones/skeleton
2182
- */
2183
- hasSkeleton?: boolean;
2184
-
2185
- /**
2186
- * Whether the mesh has UV coordinates
2187
- */
2188
- hasUVs?: boolean;
2189
-
2190
- height?: number;
2191
-
2192
- /**
2193
- * Number of frames in the video
2194
- */
2195
- nbFrames?: number;
2196
-
2197
- /**
2198
- * Sample rate of the media in Hz
2199
- */
2200
- sampleRate?: number;
2201
-
2202
- /**
2203
- * Transcription of the audio
2204
- */
2205
- transcription?: Properties.Transcription;
2206
-
2207
- /**
2208
- * Number of vertices in the mesh
2209
- */
2210
- vertexCount?: number;
2211
-
2212
- width?: number;
2213
- }
2214
-
2215
- export namespace Properties {
2216
- /**
2217
- * Transcription of the audio
2218
- */
2219
- export interface Transcription {
2220
- text: string;
2221
- }
2222
- }
2223
-
2224
- /**
2225
- * The video asset's first frame.
2226
- *
2227
- * Contains the assetId and the url of the first frame.
2228
- */
2229
- export interface FirstFrame {
2230
- assetId: string;
2231
-
2232
- url: string;
2233
- }
2234
-
2235
- /**
2236
- * The video asset's last frame.
2237
- *
2238
- * Contains the assetId and the url of the last frame.
2239
- */
2240
- export interface LastFrame {
2241
- assetId: string;
2242
-
2243
- url: string;
2244
- }
2245
-
2246
- /**
2247
- * The asset's preview.
2248
- *
2249
- * Contains the assetId and the url of the preview.
2250
- */
2251
- export interface Preview {
2252
- assetId: string;
2253
-
2254
- url: string;
2255
- }
2256
-
2257
- /**
2258
- * The asset's thumbnail.
2259
- *
2260
- * Contains the assetId and the url of the thumbnail.
2261
- */
2262
- export interface Thumbnail {
2263
- assetId: string;
2264
-
2265
- url: string;
2266
- }
2267
- }
2268
- }
2269
-
2270
- export interface PublicListParams {
2271
- /**
2272
- * Filter results to only return assets created after the specified ISO string date
2273
- * (exclusive). Requires the sortBy parameter to be "createdAt"
2274
- */
2275
- createdAfter?: string;
2276
-
2277
- /**
2278
- * Filter results to only return assets created before the specified ISO string
2279
- * date (exclusive). Requires the sortBy parameter to be "createdAt"
2280
- */
2281
- createdBefore?: string;
2282
-
2283
- /**
2284
- * List assets generated from all inferences coming from a specific model (this is
2285
- * not the training images)
2286
- */
2287
- modelId?: string;
2288
-
2289
- /**
2290
- * If set to true, returns the original asset without transformation
2291
- */
2292
- originalAssets?: boolean;
2293
-
2294
- /**
2295
- * The number of items to return in the response. The default value is 50, maximum
2296
- * value is 100, minimum value is 1
2297
- */
2298
- pageSize?: number;
2299
-
2300
- /**
2301
- * A token you received in a previous request to query the next page of items
2302
- */
2303
- paginationToken?: string;
2304
-
2305
- /**
2306
- * Sort results by the createdAt or updatedAt
2307
- */
2308
- sortBy?: string;
2309
-
2310
- /**
2311
- * Sort results in ascending (asc) or descending (desc) order
2312
- */
2313
- sortDirection?: string;
2314
-
2315
- /**
2316
- * List of tags, comma separated. Only for public assets on all teams.
2317
- */
2318
- tags?: string;
2319
-
2320
- /**
2321
- * List all the assets of a specific type. The parameter "type" and "types" cannot
2322
- * be used together. Can be any of the following values: inference-txt2img,
2323
- * inference-txt2img-ip-adapter, inference-txt2img-texture, inference-img2img,
2324
- * inference-img2img-ip-adapter, inference-img2img-texture, inference-inpaint,
2325
- * inference-inpaint-ip-adapter, inference-reference, inference-reference-texture,
2326
- * inference-controlnet, inference-controlnet-ip-adapter,
2327
- * inference-controlnet-img2img, inference-controlnet-reference,
2328
- * inference-controlnet-inpaint, inference-controlnet-inpaint-ip-adapter,
2329
- * inference-controlnet-texture, background-removal, canvas, canvas-export,
2330
- * canvas-drawing, detection, patch, pixelization, upscale, upscale-texture,
2331
- * upscale-skybox, vectorization, segment, segmentation-image, segmentation-mask,
2332
- * skybox-base-360, skybox-hdri, skybox-3d, restyle, reframe, generative-fill,
2333
- * texture, texture-height, texture-normal, texture-smoothness, texture-metallic,
2334
- * texture-edge, texture-ao, texture-albedo, image-prompt-editing, unknown, img23d,
2335
- * txt23d, video23d, 3d23d, 3d23d-texture, 3d-texture, 3d-texture-mtl,
2336
- * 3d-texture-albedo, 3d-texture-normal, 3d-texture-roughness, 3d-texture-metallic,
2337
- * img2video, txt2audio, audio2audio, audio2video, video2audio, voice-clone,
2338
- * video2video, video2img, txt2img, img2img, txt2video, uploaded, uploaded-video,
2339
- * uploaded-audio, uploaded-3d, uploaded-avatar, upscale-video, assets with a type
2340
- * starting with "inference-" will be returned
2341
- */
2342
- type?:
2343
- | 'inference-txt2img'
2344
- | 'inference-txt2img-ip-adapter'
2345
- | 'inference-txt2img-texture'
2346
- | 'inference-img2img'
2347
- | 'inference-img2img-ip-adapter'
2348
- | 'inference-img2img-texture'
2349
- | 'inference-inpaint'
2350
- | 'inference-inpaint-ip-adapter'
2351
- | 'inference-reference'
2352
- | 'inference-reference-texture'
2353
- | 'inference-controlnet'
2354
- | 'inference-controlnet-ip-adapter'
2355
- | 'inference-controlnet-img2img'
2356
- | 'inference-controlnet-reference'
2357
- | 'inference-controlnet-inpaint'
2358
- | 'inference-controlnet-inpaint-ip-adapter'
2359
- | 'inference-controlnet-texture'
2360
- | 'background-removal'
2361
- | 'canvas'
2362
- | 'canvas-export'
2363
- | 'canvas-drawing'
2364
- | 'detection'
2365
- | 'patch'
2366
- | 'pixelization'
2367
- | 'upscale'
2368
- | 'upscale-texture'
2369
- | 'upscale-skybox'
2370
- | 'vectorization'
2371
- | 'segment'
2372
- | 'segmentation-image'
2373
- | 'segmentation-mask'
2374
- | 'skybox-base-360'
2375
- | 'skybox-hdri'
2376
- | 'skybox-3d'
2377
- | 'restyle'
2378
- | 'reframe'
2379
- | 'generative-fill'
2380
- | 'texture'
2381
- | 'texture-height'
2382
- | 'texture-normal'
2383
- | 'texture-smoothness'
2384
- | 'texture-metallic'
2385
- | 'texture-edge'
2386
- | 'texture-ao'
2387
- | 'texture-albedo'
2388
- | 'image-prompt-editing'
2389
- | 'unknown'
2390
- | 'img23d'
2391
- | 'txt23d'
2392
- | 'video23d'
2393
- | '3d23d'
2394
- | '3d23d-texture'
2395
- | '3d-texture'
2396
- | '3d-texture-mtl'
2397
- | '3d-texture-albedo'
2398
- | '3d-texture-normal'
2399
- | '3d-texture-roughness'
2400
- | '3d-texture-metallic'
2401
- | 'img2video'
2402
- | 'txt2audio'
2403
- | 'audio2audio'
2404
- | 'audio2video'
2405
- | 'video2audio'
2406
- | 'voice-clone'
2407
- | 'video2video'
2408
- | 'video2img'
2409
- | 'txt2img'
2410
- | 'img2img'
2411
- | 'txt2video'
2412
- | 'uploaded'
2413
- | 'uploaded-video'
2414
- | 'uploaded-audio'
2415
- | 'uploaded-3d'
2416
- | 'uploaded-avatar'
2417
- | 'upscale-video';
2418
-
2419
- /**
2420
- * List of the asset types to request. The parameter "type" and "types" cannot be
2421
- * used together. Can be any of the following values: inference-txt2img,
2422
- * inference-txt2img-ip-adapter, inference-txt2img-texture, inference-img2img,
2423
- * inference-img2img-ip-adapter, inference-img2img-texture, inference-inpaint,
2424
- * inference-inpaint-ip-adapter, inference-reference, inference-reference-texture,
2425
- * inference-controlnet, inference-controlnet-ip-adapter,
2426
- * inference-controlnet-img2img, inference-controlnet-reference,
2427
- * inference-controlnet-inpaint, inference-controlnet-inpaint-ip-adapter,
2428
- * inference-controlnet-texture, background-removal, canvas, canvas-export,
2429
- * canvas-drawing, detection, patch, pixelization, upscale, upscale-texture,
2430
- * upscale-skybox, vectorization, segment, segmentation-image, segmentation-mask,
2431
- * skybox-base-360, skybox-hdri, skybox-3d, restyle, reframe, generative-fill,
2432
- * texture, texture-height, texture-normal, texture-smoothness, texture-metallic,
2433
- * texture-edge, texture-ao, texture-albedo, image-prompt-editing, unknown, img23d,
2434
- * txt23d, video23d, 3d23d, 3d23d-texture, 3d-texture, 3d-texture-mtl,
2435
- * 3d-texture-albedo, 3d-texture-normal, 3d-texture-roughness, 3d-texture-metallic,
2436
- * img2video, txt2audio, audio2audio, audio2video, video2audio, voice-clone,
2437
- * video2video, video2img, txt2img, img2img, txt2video, uploaded, uploaded-video,
2438
- * uploaded-audio, uploaded-3d, uploaded-avatar, upscale-video
2439
- */
2440
- types?: string;
2441
-
2442
- /**
2443
- * Filter results to only return assets updated after the specified ISO string date
2444
- * (exclusive). Requires the sortBy parameter to be "updatedAt"
2445
- */
2446
- updatedAfter?: string;
2447
-
2448
- /**
2449
- * Filter results to only return assets updated before the specified ISO string
2450
- * date (exclusive). Requires the sortBy parameter to be "updatedAt"
2451
- */
2452
- updatedBefore?: string;
2453
- }
2454
-
2455
- export declare namespace Public {
2456
- export {
2457
- type PublicRetrieveResponse as PublicRetrieveResponse,
2458
- type PublicListResponse as PublicListResponse,
2459
- type PublicListParams as PublicListParams,
2460
- };
2461
- }