@scenario-labs/sdk 0.1.2

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