@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,3034 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import { APIPromise } from '../../core/api-promise';
5
+ import { RequestOptions } from '../../internal/request-options';
6
+ import { path } from '../../internal/utils/path';
7
+
8
+ export class Train extends APIResource {
9
+ /**
10
+ * Trigger an action on a model training: cancel
11
+ */
12
+ action(
13
+ modelID: string,
14
+ body: TrainActionParams,
15
+ options?: RequestOptions,
16
+ ): APIPromise<TrainActionResponse> {
17
+ return this._client.post(path`/models/${modelID}/train/action`, { body, ...options });
18
+ }
19
+
20
+ /**
21
+ * Trigger the given `modelId` training
22
+ */
23
+ trigger(
24
+ modelID: string,
25
+ params: TrainTriggerParams,
26
+ options?: RequestOptions,
27
+ ): APIPromise<TrainTriggerResponse> {
28
+ const { dryRun, originalAssets, ...body } = params;
29
+ return this._client.put(path`/models/${modelID}/train`, {
30
+ query: { dryRun, originalAssets },
31
+ body,
32
+ ...options,
33
+ });
34
+ }
35
+ }
36
+
37
+ export interface TrainActionResponse {
38
+ model: TrainActionResponse.Model;
39
+ }
40
+
41
+ export namespace TrainActionResponse {
42
+ export interface Model {
43
+ /**
44
+ * The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w")
45
+ */
46
+ id: string;
47
+
48
+ /**
49
+ * List of model capabilities (example: ["txt2img", "img2img",
50
+ * "txt2img_ip_adapter", ...])
51
+ */
52
+ capabilities: Array<
53
+ | '3d23d'
54
+ | 'audio2audio'
55
+ | 'controlnet'
56
+ | 'controlnet_img2img'
57
+ | 'controlnet_inpaint'
58
+ | 'controlnet_inpaint_ip_adapter'
59
+ | 'controlnet_ip_adapter'
60
+ | 'controlnet_reference'
61
+ | 'controlnet_texture'
62
+ | 'img23d'
63
+ | 'img2img'
64
+ | 'img2img_ip_adapter'
65
+ | 'img2img_texture'
66
+ | 'img2txt'
67
+ | 'img2video'
68
+ | 'inpaint'
69
+ | 'inpaint_ip_adapter'
70
+ | 'outpaint'
71
+ | 'reference'
72
+ | 'reference_texture'
73
+ | 'txt23d'
74
+ | 'txt2audio'
75
+ | 'txt2img'
76
+ | 'txt2img_ip_adapter'
77
+ | 'txt2img_texture'
78
+ | 'txt2txt'
79
+ | 'txt2video'
80
+ | 'video2img'
81
+ | 'video2video'
82
+ >;
83
+
84
+ /**
85
+ * A list of CollectionId this model belongs to
86
+ */
87
+ collectionIds: Array<string>;
88
+
89
+ /**
90
+ * The model creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
91
+ */
92
+ createdAt: string;
93
+
94
+ /**
95
+ * Whether the model is a custom model and can be used only with POST
96
+ * /generate/custom/{modelId} endpoint
97
+ */
98
+ custom: boolean;
99
+
100
+ /**
101
+ * List of all example asset IDs setup by the model owner
102
+ */
103
+ exampleAssetIds: Array<string>;
104
+
105
+ /**
106
+ * The privacy of the model (default: private)
107
+ */
108
+ privacy: 'private' | 'public' | 'unlisted';
109
+
110
+ /**
111
+ * The source of the model
112
+ */
113
+ source: 'civitai' | 'huggingface' | 'other' | 'scenario';
114
+
115
+ /**
116
+ * The model status
117
+ */
118
+ status: 'copying' | 'failed' | 'new' | 'trained' | 'training' | 'training-canceled';
119
+
120
+ /**
121
+ * The associated tags (example: ["sci-fi", "landscape"])
122
+ */
123
+ tags: Array<string>;
124
+
125
+ /**
126
+ * The total number of training images
127
+ */
128
+ trainingImagesNumber: number;
129
+
130
+ /**
131
+ * The model type (example: "flux.1-lora")
132
+ */
133
+ type:
134
+ | 'custom'
135
+ | 'flux.1'
136
+ | 'flux.1-composition'
137
+ | 'flux.1-kontext-dev'
138
+ | 'flux.1-kontext-lora'
139
+ | 'flux.1-krea-dev'
140
+ | 'flux.1-krea-lora'
141
+ | 'flux.1-lora'
142
+ | 'flux.1-pro'
143
+ | 'flux.1.1-pro-ultra'
144
+ | 'flux1.1-pro'
145
+ | 'gpt-image-1'
146
+ | 'sd-1_5'
147
+ | 'sd-1_5-composition'
148
+ | 'sd-1_5-lora'
149
+ | 'sd-xl'
150
+ | 'sd-xl-composition'
151
+ | 'sd-xl-lora';
152
+
153
+ /**
154
+ * The model last update date as an ISO string (example:
155
+ * "2023-02-03T11:19:41.579Z")
156
+ */
157
+ updatedAt: string;
158
+
159
+ /**
160
+ * The access restrictions of the model 0: Free plan 25: Creator plan 50: Pro plan
161
+ * 75: Team plan 100: Enterprise plan
162
+ */
163
+ accessRestrictions?: number;
164
+
165
+ /**
166
+ * The author user ID (example: "user_VFhihHKMRZyDDnZAJwLb2Q")
167
+ */
168
+ authorId?: string;
169
+
170
+ /**
171
+ * The class of the model
172
+ */
173
+ class?: Model.Class;
174
+
175
+ /**
176
+ * Compliance and regulatory metadata for the model
177
+ */
178
+ complianceMetadata?: Model.ComplianceMetadata;
179
+
180
+ /**
181
+ * List of base model IDs compliant with the model (example: ["flux.1-dev",
182
+ * "flux.1-schnell"]) This attribute is mainly used for Flux LoRA models
183
+ */
184
+ compliantModelIds?: Array<string>;
185
+
186
+ /**
187
+ * The concepts is required for the type model: composition
188
+ */
189
+ concepts?: Array<Model.Concept>;
190
+
191
+ /**
192
+ * The epoch of the model. Only available for Flux Lora Trained models. If not set,
193
+ * uses the final model epoch (latest)
194
+ */
195
+ epoch?: string;
196
+
197
+ /**
198
+ * The epochs of the model. Only available for Flux Lora Trained models.
199
+ */
200
+ epochs?: Array<Model.Epoch>;
201
+
202
+ /**
203
+ * The inputs of the model. Only used for custom models. To retrieve this list, get
204
+ * it by modelId with GET /models/{modelId}
205
+ */
206
+ inputs?: Array<Model.Input>;
207
+
208
+ /**
209
+ * The model keyword, this is a legacy parameter, please use conceptPrompt in
210
+ * parameters
211
+ */
212
+ modelKeyword?: string;
213
+
214
+ /**
215
+ * The model name (example: "Cinematic Realism")
216
+ */
217
+ name?: string;
218
+
219
+ /**
220
+ * Fine-tune the model's inferences with negative prompt embedding
221
+ */
222
+ negativePromptEmbedding?: string;
223
+
224
+ /**
225
+ * The owner ID (example: "team_VFhihHKMRZyDDnZAJwLb2Q")
226
+ */
227
+ ownerId?: string;
228
+
229
+ /**
230
+ * The parameters of the model
231
+ */
232
+ parameters?: Model.Parameters;
233
+
234
+ /**
235
+ * The id of the parent model
236
+ */
237
+ parentModelId?: string;
238
+
239
+ /**
240
+ * Fine-tune the model's inferences with prompt embedding
241
+ */
242
+ promptEmbedding?: string;
243
+
244
+ /**
245
+ * The model short description (example: "This model generates highly detailed
246
+ * cinematic scenes.")
247
+ */
248
+ shortDescription?: string;
249
+
250
+ /**
251
+ * The date when the model will be soft deleted (only for Free plan)
252
+ */
253
+ softDeletionOn?: string;
254
+
255
+ /**
256
+ * A thumbnail for your model
257
+ */
258
+ thumbnail?: Model.Thumbnail;
259
+
260
+ /**
261
+ * Array of training image pairs
262
+ */
263
+ trainingImagePairs?: Array<Model.TrainingImagePair>;
264
+
265
+ /**
266
+ * The URLs of the first 3 training images of the model. To retrieve the full set
267
+ * of images, get it by modelId
268
+ */
269
+ trainingImages?: Array<Model.TrainingImage>;
270
+
271
+ /**
272
+ * Additional information about the training progress of the model
273
+ */
274
+ trainingProgress?: Model.TrainingProgress;
275
+
276
+ /**
277
+ * Additional information about the model's training
278
+ */
279
+ trainingStats?: Model.TrainingStats;
280
+
281
+ /**
282
+ * The UI configuration for the model
283
+ */
284
+ uiConfig?: Model.UiConfig;
285
+
286
+ /**
287
+ * (Deprecated) The user ID (example: "user_VFhihHKMRZyDDnZAJwLb2Q")
288
+ */
289
+ userId?: string;
290
+ }
291
+
292
+ export namespace Model {
293
+ /**
294
+ * The class of the model
295
+ */
296
+ export interface Class {
297
+ /**
298
+ * The category slug of the class (example: "art-style")
299
+ */
300
+ category: string;
301
+
302
+ /**
303
+ * The concept prompt of the class (example: "a sks character design")
304
+ */
305
+ conceptPrompt: string;
306
+
307
+ /**
308
+ * The model ID of the class (example: "stable-diffusion-v1-5")
309
+ */
310
+ modelId: string;
311
+
312
+ /**
313
+ * The class name (example: "Character Design")
314
+ */
315
+ name: string;
316
+
317
+ /**
318
+ * The class prompt (example: "a character design")
319
+ */
320
+ prompt: string;
321
+
322
+ /**
323
+ * The class slug (example: "art-style-character-design")
324
+ */
325
+ slug: string;
326
+
327
+ /**
328
+ * The class status (only published classes are listed, but unpublished classes can
329
+ * still appear in existing models)
330
+ */
331
+ status: 'published' | 'unpublished';
332
+
333
+ /**
334
+ * Some example images URLs to showcase the class
335
+ */
336
+ thumbnails: Array<string>;
337
+ }
338
+
339
+ /**
340
+ * Compliance and regulatory metadata for the model
341
+ */
342
+ export interface ComplianceMetadata {
343
+ /**
344
+ * Data processing comment (e.g., zeroRetention, temporaryRetention, etc.)
345
+ */
346
+ dataProcessingComment?: 'researchOnly' | 'serviceImprovement' | 'temporaryRetention' | 'zeroRetention';
347
+
348
+ /**
349
+ * URL to license terms
350
+ */
351
+ licenseTerms?: string;
352
+
353
+ /**
354
+ * The maintainer of the model
355
+ */
356
+ maintainer?: 'Fal' | 'Provider' | 'Replicate' | 'Scenario';
357
+
358
+ /**
359
+ * The provider of the model (examples: 'Google', 'AWS', 'BFL', 'Meshy', etc.)
360
+ */
361
+ modelProvider?: string;
362
+
363
+ /**
364
+ * The sub-processor used for the model
365
+ */
366
+ subProcessor?: 'AWS' | 'Fal' | 'Modal' | 'Provider' | 'Replicate';
367
+ }
368
+
369
+ export interface Concept {
370
+ /**
371
+ * The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w")
372
+ */
373
+ modelId: string;
374
+
375
+ /**
376
+ * The scale of the model (example: 1.0) For Flux Kontext Prompt Editing, the scale
377
+ * is between 0 and 2.
378
+ */
379
+ scale: number;
380
+
381
+ /**
382
+ * The epoch of the model (example: "000001") Only available for Flux Lora Trained
383
+ * models
384
+ */
385
+ modelEpoch?: string;
386
+ }
387
+
388
+ export interface Epoch {
389
+ /**
390
+ * The epoch hash to identify the epoch
391
+ */
392
+ epoch: string;
393
+
394
+ /**
395
+ * The assets of the epoch if sample prompts as been supplied during training
396
+ */
397
+ assets?: Array<Epoch.Asset>;
398
+ }
399
+
400
+ export namespace Epoch {
401
+ export interface Asset {
402
+ /**
403
+ * The AssetId of the image during training (example:
404
+ * "asset_GTrL3mq4SXWyMxkOHRxlpw")
405
+ */
406
+ assetId: string;
407
+
408
+ /**
409
+ * The url of the asset
410
+ */
411
+ url: string;
412
+ }
413
+ }
414
+
415
+ /**
416
+ * Defines the input parameters for a model. Use this to understand the available
417
+ * input parameters for a given `modelId` when calling
418
+ * `POST /generate/custom/{modelId}`. See {@link
419
+ * https://docs.scenario.com/docs/video-generation} for examples.
420
+ */
421
+ export interface Input {
422
+ /**
423
+ * The name that must be user to call the model through the API
424
+ */
425
+ name: string;
426
+
427
+ /**
428
+ * The data type of the input
429
+ */
430
+ type:
431
+ | 'boolean'
432
+ | 'file'
433
+ | 'file_array'
434
+ | 'inputs_array'
435
+ | 'model'
436
+ | 'model_array'
437
+ | 'number'
438
+ | 'number_array'
439
+ | 'string'
440
+ | 'string_array';
441
+
442
+ /**
443
+ * The allowed values for the input. For \`string\` or \`number\` types, creates a
444
+ * single-select dropdown. For \`string_array\` type, creates a multi-select
445
+ * dropdown.
446
+ */
447
+ allowedValues?: Array<unknown>;
448
+
449
+ /**
450
+ * Specifies the background behavior for the input. Only available for \`file\` and
451
+ * \`file_array\` input types with kind \`image\`.
452
+ */
453
+ backgroundBehavior?: 'opaque' | 'transparent';
454
+
455
+ /**
456
+ * Whether the input is a color or not. Only available for \`string\` input type.
457
+ */
458
+ color?: boolean;
459
+
460
+ /**
461
+ * Whether this input affects the model's cost calculation
462
+ */
463
+ costImpact?: boolean;
464
+
465
+ /**
466
+ * Help text displayed in the UI to provide additional information about the input
467
+ */
468
+ description?: string;
469
+
470
+ /**
471
+ * Used to visually group inputs together in the UI. Inputs with the same group
472
+ * value appear consecutively in the UI.
473
+ */
474
+ group?: string;
475
+
476
+ /**
477
+ * Hint text displayed in the UI as a tooltip to guide the user
478
+ */
479
+ hint?: string;
480
+
481
+ /**
482
+ * The list of inputs which form an object within a container array. All inputs are
483
+ * the same as the current object. This is only available for type inputs_array
484
+ * inputs.
485
+ */
486
+ inputs?: Array<unknown>;
487
+
488
+ /**
489
+ * The asset kind of the input. Only taken into account for \`file\` and
490
+ * \`file_array\` input types.
491
+ */
492
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
493
+
494
+ /**
495
+ * The label displayed in the UI for this input
496
+ */
497
+ label?: string;
498
+
499
+ /**
500
+ * The name of the file input field to use as the mask source
501
+ */
502
+ maskFrom?: string;
503
+
504
+ /**
505
+ * The maximum allowed value. Only available for \`number\` and \`array\` input
506
+ * types.
507
+ */
508
+ max?: number;
509
+
510
+ /**
511
+ * The maximum allowed length for \`string\` inputs. Also applies to each item in
512
+ * \`string_array\`.
513
+ */
514
+ maxLength?: number;
515
+
516
+ /**
517
+ * The minimum allowed value. Only available for \`number\` and array input types.
518
+ */
519
+ min?: number;
520
+
521
+ /**
522
+ * The minimum allowed length for string inputs. Also applies to each item in
523
+ * \`string_array\`.
524
+ */
525
+ minLength?: number;
526
+
527
+ /**
528
+ * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
529
+ * available for \`model_array\` input type.
530
+ */
531
+ modelTypes?: Array<
532
+ | 'custom'
533
+ | 'flux.1'
534
+ | 'flux.1-composition'
535
+ | 'flux.1-kontext-dev'
536
+ | 'flux.1-kontext-lora'
537
+ | 'flux.1-krea-dev'
538
+ | 'flux.1-krea-lora'
539
+ | 'flux.1-lora'
540
+ | 'flux.1-pro'
541
+ | 'flux.1.1-pro-ultra'
542
+ | 'flux1.1-pro'
543
+ | 'gpt-image-1'
544
+ | 'sd-1_5'
545
+ | 'sd-1_5-composition'
546
+ | 'sd-1_5-lora'
547
+ | 'sd-xl'
548
+ | 'sd-xl-composition'
549
+ | 'sd-xl-lora'
550
+ >;
551
+
552
+ /**
553
+ * Whether this input represents a parent asset to assign to the produced assets.
554
+ * Only available for \`file\` and \`file_array\` input types.
555
+ *
556
+ * For \`file_array\`, the parent asset is the first item in the array.
557
+ */
558
+ parent?: boolean;
559
+
560
+ /**
561
+ * Placeholder text for the input. Only available for 'string' input type.
562
+ */
563
+ placeholder?: string;
564
+
565
+ /**
566
+ * Whether the input is a prompt. When true, displays as a text area with prompt
567
+ * spark feature. Only available for \`string\` input type.
568
+ */
569
+ prompt?: boolean;
570
+
571
+ /**
572
+ * Whether the input is used with prompt spark. Only available for \`string\` input
573
+ * type.
574
+ */
575
+ promptSpark?: boolean;
576
+
577
+ /**
578
+ * Set of rules that describes when this input is required:
579
+ *
580
+ * - \`always\`: Input is always required
581
+ * - \`ifNotDefined\`: Input is required when another specified input is not
582
+ * defined
583
+ * - \`ifDefined\`: Input is required when another specified input is defined
584
+ * - \`conditionalValues\`: Input is required when another input has a specific
585
+ * value
586
+ *
587
+ * By default, the input is not required.
588
+ */
589
+ required?: Input.Required;
590
+
591
+ /**
592
+ * The step increment for numeric inputs. Only available for \`number\` input type.
593
+ */
594
+ step?: number;
595
+ }
596
+
597
+ export namespace Input {
598
+ /**
599
+ * Set of rules that describes when this input is required:
600
+ *
601
+ * - \`always\`: Input is always required
602
+ * - \`ifNotDefined\`: Input is required when another specified input is not
603
+ * defined
604
+ * - \`ifDefined\`: Input is required when another specified input is defined
605
+ * - \`conditionalValues\`: Input is required when another input has a specific
606
+ * value
607
+ *
608
+ * By default, the input is not required.
609
+ */
610
+ export interface Required {
611
+ /**
612
+ * Whether the input is always required
613
+ */
614
+ always?: boolean;
615
+
616
+ /**
617
+ * Makes this input required when another input has a specific value:
618
+ *
619
+ * - Key: name of the input to check
620
+ * - Value: operation and allowed values that trigger the requirement
621
+ */
622
+ conditionalValues?: unknown;
623
+
624
+ /**
625
+ * Makes this input required when another input is defined:
626
+ *
627
+ * - Key: name of the input that must be defined
628
+ * - Value: message to display when this input is required
629
+ */
630
+ ifDefined?: unknown;
631
+
632
+ /**
633
+ * Makes this input required when another input is not defined:
634
+ *
635
+ * - Key: name of the input that must be undefined
636
+ * - Value: message to display when this input is required
637
+ */
638
+ ifNotDefined?: unknown;
639
+ }
640
+ }
641
+
642
+ /**
643
+ * The parameters of the model
644
+ */
645
+ export interface Parameters {
646
+ /**
647
+ * The batch size Less steps, and will increase the learning rate
648
+ *
649
+ * Only available for Flux LoRA training
650
+ */
651
+ batchSize?: number;
652
+
653
+ /**
654
+ * The prompt to specify images in the same class as provided instance images
655
+ *
656
+ * Only available for SD15 training
657
+ */
658
+ classPrompt?: string;
659
+
660
+ /**
661
+ * The prompt with identifier specifying the instance (or subject) of the class
662
+ * (example: "a daiton dog")
663
+ *
664
+ * Default value varies depending on the model type:
665
+ *
666
+ * - For SD1.5: "daiton" if no class is associated with the model
667
+ * - For SDXL: "daiton"
668
+ * - For Flux: ""
669
+ */
670
+ conceptPrompt?: string;
671
+
672
+ /**
673
+ * Initial learning rate (after the potential warmup period)
674
+ *
675
+ * Default value varies depending on the model type:
676
+ *
677
+ * - For SD1.5 and SDXL: 0.000005
678
+ * - For Flux: 0.0001
679
+ */
680
+ learningRate?: number;
681
+
682
+ /**
683
+ * Initial learning rate (after the potential warmup period) for the text encoder
684
+ *
685
+ * Maximum [Flux LoRA: 0.001] Default [SDXL: 0.00005 | Flux LoRA: 0.00001] Minimum
686
+ * [SDXL: 0 | Flux LoRA: 0.000001]
687
+ */
688
+ learningRateTextEncoder?: number;
689
+
690
+ /**
691
+ * Initial learning rate (after the potential warmup period) for the UNet
692
+ *
693
+ * Only available for SDXL LoRA training
694
+ */
695
+ learningRateUnet?: number;
696
+
697
+ /**
698
+ * The scheduler type to use (default: "constant")
699
+ *
700
+ * Only available for SD15 and SDXL LoRA training
701
+ */
702
+ lrScheduler?:
703
+ | 'constant'
704
+ | 'constant-with-warmup'
705
+ | 'cosine'
706
+ | 'cosine-with-restarts'
707
+ | 'linear'
708
+ | 'polynomial';
709
+
710
+ /**
711
+ * Maximum number of training steps to execute (default: varies depending on the
712
+ * model type)
713
+ *
714
+ * For SDXL LoRA training, please use `numTextTrainSteps` and `numUNetTrainSteps`
715
+ * instead
716
+ *
717
+ * Default value varies depending on the model type:
718
+ *
719
+ * - For SD1.5: round((number of training images \* 225) / 3)
720
+ * - For SDXL: number of training images \* 175
721
+ * - For Flux: number of training images \* 100
722
+ *
723
+ * Maximum value varies depending on the model type:
724
+ *
725
+ * - For SD1.5 and SDXL: [0, 40000]
726
+ * - For Flux: [0, 10000]
727
+ */
728
+ maxTrainSteps?: number;
729
+
730
+ /**
731
+ * The number of epochs to train for
732
+ *
733
+ * Only available for Flux LoRA training
734
+ */
735
+ nbEpochs?: number;
736
+
737
+ /**
738
+ * The number of times to repeat the training
739
+ *
740
+ * Only available for Flux LoRA training
741
+ */
742
+ nbRepeats?: number;
743
+
744
+ /**
745
+ * The number of training steps for the text encoder
746
+ *
747
+ * Only available for SDXL LoRA training
748
+ */
749
+ numTextTrainSteps?: number;
750
+
751
+ /**
752
+ * The number of training steps for the UNet
753
+ *
754
+ * Only available for SDXL LoRA training
755
+ */
756
+ numUNetTrainSteps?: number;
757
+
758
+ /**
759
+ * Optimize the model training task for a specific type of input images. The
760
+ * available values are:
761
+ *
762
+ * - "likeness": optimize training for likeness or portrait (targets specific
763
+ * transformer blocks)
764
+ * - "all": train all transformer blocks
765
+ * - "none": train no specific transformer blocks
766
+ *
767
+ * This parameter controls which double and single transformer blocks are trained
768
+ * during the LoRA training process.
769
+ *
770
+ * Only available for Flux LoRA training
771
+ */
772
+ optimizeFor?: 'likeness';
773
+
774
+ /**
775
+ * The weight of prior preservation loss
776
+ *
777
+ * Only available for SD15 and SDXL LoRA training
778
+ */
779
+ priorLossWeight?: number;
780
+
781
+ /**
782
+ * Whether to random crop or center crop images before resizing to the working
783
+ * resolution
784
+ *
785
+ * Only available for SD15 and SDXL LoRA training
786
+ */
787
+ randomCrop?: boolean;
788
+
789
+ /**
790
+ * Ratio of random crops
791
+ *
792
+ * Only available for SD15 and SDXL LoRA training
793
+ */
794
+ randomCropRatio?: number;
795
+
796
+ /**
797
+ * Scale of random crops
798
+ *
799
+ * Only available for SD15 and SDXL LoRA training
800
+ */
801
+ randomCropScale?: number;
802
+
803
+ /**
804
+ * The dimension of the LoRA update matrices
805
+ *
806
+ * Only available for SDXL and Flux LoRA training
807
+ *
808
+ * Default value varies depending on the model type:
809
+ *
810
+ * - For SDXL: 64
811
+ * - For Flux: 16
812
+ */
813
+ rank?: number;
814
+
815
+ /**
816
+ * The prompts to use for each epoch Only available for Flux LoRA training
817
+ */
818
+ samplePrompts?: Array<string>;
819
+
820
+ /**
821
+ * The sample prompt images (AssetIds) paired with samplePrompts Only available for
822
+ * Flux LoRA training Must be the same length as samplePrompts
823
+ */
824
+ sampleSourceImages?: Array<string>;
825
+
826
+ /**
827
+ * Whether to scale the learning rate
828
+ *
829
+ * Note: Legacy parameter, will be ignored
830
+ *
831
+ * Only available for SD15 and SDXL LoRA training
832
+ */
833
+ scaleLr?: boolean;
834
+
835
+ /**
836
+ * Used to reproduce previous results. Default: randomly generated number.
837
+ *
838
+ * Only available for SD15 and SDXL LoRA training
839
+ */
840
+ seed?: number;
841
+
842
+ /**
843
+ * Whether to train the text encoder or not
844
+ *
845
+ * Example: For 100 steps and a value of 0.2, it means that the text encoder will
846
+ * be trained for 20 steps and then the UNet for 80 steps
847
+ *
848
+ * Note: Legacy parameter, please use `numTextTrainSteps` and `numUNetTrainSteps`
849
+ *
850
+ * Only available for SD15 and SDXL LoRA training
851
+ */
852
+ textEncoderTrainingRatio?: number;
853
+
854
+ /**
855
+ * Validation frequency. Cannot be greater than maxTrainSteps value
856
+ *
857
+ * Only available for SD15 and SDXL LoRA training
858
+ */
859
+ validationFrequency?: number;
860
+
861
+ /**
862
+ * Validation prompt
863
+ *
864
+ * Only available for SD15 and SDXL LoRA training
865
+ */
866
+ validationPrompt?: string;
867
+
868
+ /**
869
+ * The Weights And Bias key to use for logging. The maximum length is 40 characters
870
+ */
871
+ wandbKey?: string;
872
+ }
873
+
874
+ /**
875
+ * A thumbnail for your model
876
+ */
877
+ export interface Thumbnail {
878
+ /**
879
+ * The AssetId of the image used as a thumbnail for your model (example:
880
+ * "asset_GTrL3mq4SXWyMxkOHRxlpw")
881
+ */
882
+ assetId: string;
883
+
884
+ /**
885
+ * The url of the image used as a thumbnail for your model
886
+ */
887
+ url: string;
888
+ }
889
+
890
+ export interface TrainingImagePair {
891
+ /**
892
+ * The instruction for the image pair, source to target
893
+ */
894
+ instruction?: string;
895
+
896
+ /**
897
+ * The source asset ID (must be a training asset)
898
+ */
899
+ sourceId?: string;
900
+
901
+ /**
902
+ * The target asset ID (must be a training asset)
903
+ */
904
+ targetId?: string;
905
+ }
906
+
907
+ export interface TrainingImage {
908
+ /**
909
+ * The training image ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw")
910
+ */
911
+ id: string;
912
+
913
+ /**
914
+ * Automatic captioning of the image
915
+ */
916
+ automaticCaptioning: string;
917
+
918
+ /**
919
+ * The training image upload date as an ISO string (example:
920
+ * "2023-02-03T11:19:41.579Z")
921
+ */
922
+ createdAt: string;
923
+
924
+ /**
925
+ * Description for the image
926
+ */
927
+ description: string;
928
+
929
+ /**
930
+ * The URL of the image
931
+ */
932
+ downloadUrl: string;
933
+
934
+ /**
935
+ * The original file name of the image (example: "my-training-image.jpg")
936
+ */
937
+ name: string;
938
+ }
939
+
940
+ /**
941
+ * Additional information about the training progress of the model
942
+ */
943
+ export interface TrainingProgress {
944
+ /**
945
+ * The stage of the request
946
+ */
947
+ stage: 'pending' | 'queued-for-train' | 'running-train' | 'starting-train';
948
+
949
+ /**
950
+ * Timestamp in milliseconds of the last time the training progress was updated
951
+ */
952
+ updatedAt: number;
953
+
954
+ /**
955
+ * Position of the job in the queue (ie. the number of job in the queue before this
956
+ * one)
957
+ */
958
+ position?: number;
959
+
960
+ /**
961
+ * The progress of the job
962
+ */
963
+ progress?: number;
964
+
965
+ /**
966
+ * The remaining time in milliseconds
967
+ */
968
+ remainingTimeMs?: number;
969
+
970
+ /**
971
+ * The timestamp in millisecond marking the start of the process
972
+ */
973
+ startedAt?: number;
974
+ }
975
+
976
+ /**
977
+ * Additional information about the model's training
978
+ */
979
+ export interface TrainingStats {
980
+ /**
981
+ * The training end time as an ISO date string
982
+ */
983
+ endedAt?: string;
984
+
985
+ /**
986
+ * The training queued duration in seconds
987
+ */
988
+ queueDuration?: number;
989
+
990
+ /**
991
+ * The training start time as an ISO date string
992
+ */
993
+ startedAt?: string;
994
+
995
+ /**
996
+ * The training duration in seconds
997
+ */
998
+ trainDuration?: number;
999
+ }
1000
+
1001
+ /**
1002
+ * The UI configuration for the model
1003
+ */
1004
+ export interface UiConfig {
1005
+ /**
1006
+ * Configuration for the input properties
1007
+ */
1008
+ inputProperties?: { [key: string]: UiConfig.InputProperties };
1009
+
1010
+ /**
1011
+ * Configuration for the loras component
1012
+ */
1013
+ lorasComponent?: UiConfig.LorasComponent;
1014
+
1015
+ /**
1016
+ * Configuration for the presets
1017
+ */
1018
+ presets?: Array<UiConfig.Preset>;
1019
+
1020
+ /**
1021
+ * Configuration for the resolution component
1022
+ */
1023
+ resolutionComponent?: UiConfig.ResolutionComponent;
1024
+
1025
+ /**
1026
+ * Configuration for the selects
1027
+ */
1028
+ selects?: { [key: string]: unknown };
1029
+
1030
+ /**
1031
+ * Configuration for the trigger generate button
1032
+ */
1033
+ triggerGenerate?: UiConfig.TriggerGenerate;
1034
+ }
1035
+
1036
+ export namespace UiConfig {
1037
+ export interface InputProperties {
1038
+ collapsed?: boolean;
1039
+ }
1040
+
1041
+ /**
1042
+ * Configuration for the loras component
1043
+ */
1044
+ export interface LorasComponent {
1045
+ /**
1046
+ * The label of the component
1047
+ */
1048
+ label: string;
1049
+
1050
+ /**
1051
+ * The input name of the model (model_array)
1052
+ */
1053
+ modelInput: string;
1054
+
1055
+ /**
1056
+ * The input name of the scale (number_array)
1057
+ */
1058
+ scaleInput: string;
1059
+
1060
+ /**
1061
+ * The input model id (example: a composition or a single LoRA modelId) If
1062
+ * specified, the model id will be attached to the output asset as a metadata If
1063
+ * the model-decomposer parser is specified on it, modelInput and scaleInput will
1064
+ * be automatically populated
1065
+ */
1066
+ modelIdInput?: string;
1067
+ }
1068
+
1069
+ export interface Preset {
1070
+ fields: Array<string>;
1071
+
1072
+ presets: unknown;
1073
+ }
1074
+
1075
+ /**
1076
+ * Configuration for the resolution component
1077
+ */
1078
+ export interface ResolutionComponent {
1079
+ /**
1080
+ * The input name of the height
1081
+ */
1082
+ heightInput: string;
1083
+
1084
+ /**
1085
+ * The label of the component
1086
+ */
1087
+ label: string;
1088
+
1089
+ /**
1090
+ * The resolution presets
1091
+ */
1092
+ presets: Array<ResolutionComponent.Preset>;
1093
+
1094
+ /**
1095
+ * The input name of the width
1096
+ */
1097
+ widthInput: string;
1098
+ }
1099
+
1100
+ export namespace ResolutionComponent {
1101
+ export interface Preset {
1102
+ height: number;
1103
+
1104
+ label: string;
1105
+
1106
+ width: number;
1107
+ }
1108
+ }
1109
+
1110
+ /**
1111
+ * Configuration for the trigger generate button
1112
+ */
1113
+ export interface TriggerGenerate {
1114
+ label: string;
1115
+
1116
+ /**
1117
+ * The 'name' of the input where the trigger generate button will be displayed
1118
+ * (after the input). Do not specify both position and after.
1119
+ */
1120
+ after?: string;
1121
+
1122
+ /**
1123
+ * The position of the trigger generate button. If position specified, the button
1124
+ * will be displayed at the specified position. Do not specify both position and
1125
+ * after.
1126
+ */
1127
+ position?: 'bottom' | 'top';
1128
+ }
1129
+ }
1130
+ }
1131
+ }
1132
+
1133
+ export interface TrainTriggerResponse {
1134
+ job: TrainTriggerResponse.Job;
1135
+
1136
+ model: TrainTriggerResponse.Model;
1137
+
1138
+ /**
1139
+ * The Creative Units cost for the request billed
1140
+ */
1141
+ creativeUnitsCost?: number;
1142
+
1143
+ /**
1144
+ * The Creative Units discount for the request billed
1145
+ */
1146
+ creativeUnitsDiscount?: number;
1147
+ }
1148
+
1149
+ export namespace TrainTriggerResponse {
1150
+ export interface Job {
1151
+ /**
1152
+ * The job creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
1153
+ */
1154
+ createdAt: string;
1155
+
1156
+ /**
1157
+ * The job ID (example: "job_ocZCnG1Df35XRL1QyCZSRxAG8")
1158
+ */
1159
+ jobId: string;
1160
+
1161
+ /**
1162
+ * The type of job
1163
+ */
1164
+ jobType:
1165
+ | 'assets-download'
1166
+ | 'canvas-export'
1167
+ | 'caption'
1168
+ | 'caption-llava'
1169
+ | 'custom'
1170
+ | 'describe-style'
1171
+ | 'detection'
1172
+ | 'embed'
1173
+ | 'flux'
1174
+ | 'flux-model-training'
1175
+ | 'generate-prompt'
1176
+ | 'image-generation'
1177
+ | 'image-prompt-editing'
1178
+ | 'inference'
1179
+ | 'mesh-preview-rendering'
1180
+ | 'model-download'
1181
+ | 'model-import'
1182
+ | 'model-training'
1183
+ | 'openai-image-generation'
1184
+ | 'patch-image'
1185
+ | 'pixelate'
1186
+ | 'reframe'
1187
+ | 'remove-background'
1188
+ | 'repaint'
1189
+ | 'restyle'
1190
+ | 'segment'
1191
+ | 'skybox-3d'
1192
+ | 'skybox-base-360'
1193
+ | 'skybox-hdri'
1194
+ | 'skybox-upscale-360'
1195
+ | 'texture'
1196
+ | 'translate'
1197
+ | 'upload'
1198
+ | 'upscale'
1199
+ | 'upscale-skybox'
1200
+ | 'upscale-texture'
1201
+ | 'vectorize'
1202
+ | 'workflow';
1203
+
1204
+ /**
1205
+ * Metadata of the job with some additional information
1206
+ */
1207
+ metadata: Job.Metadata;
1208
+
1209
+ /**
1210
+ * Progress of the job (between 0 and 1)
1211
+ */
1212
+ progress: number;
1213
+
1214
+ /**
1215
+ * The current status of the job
1216
+ */
1217
+ status:
1218
+ | 'canceled'
1219
+ | 'failure'
1220
+ | 'finalizing'
1221
+ | 'in-progress'
1222
+ | 'pending'
1223
+ | 'queued'
1224
+ | 'success'
1225
+ | 'warming-up';
1226
+
1227
+ /**
1228
+ * The history of the different statuses the job went through with the ISO string
1229
+ * date of when the job reached each statuses.
1230
+ */
1231
+ statusHistory: Array<Job.StatusHistory>;
1232
+
1233
+ /**
1234
+ * The job last update date as an ISO string (example: "2023-02-03T11:19:41.579Z")
1235
+ */
1236
+ updatedAt: string;
1237
+
1238
+ /**
1239
+ * The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea")
1240
+ */
1241
+ authorId?: string;
1242
+
1243
+ /**
1244
+ * The billing of the job
1245
+ */
1246
+ billing?: Job.Billing;
1247
+
1248
+ /**
1249
+ * The owner ID (example: "team_U3Qmc8PCdWXwAQJ4Dvw4tV6D")
1250
+ */
1251
+ ownerId?: string;
1252
+ }
1253
+
1254
+ export namespace Job {
1255
+ /**
1256
+ * Metadata of the job with some additional information
1257
+ */
1258
+ export interface Metadata {
1259
+ /**
1260
+ * List of produced assets for this job
1261
+ */
1262
+ assetIds?: Array<string>;
1263
+
1264
+ /**
1265
+ * The flow of the job. Only available for workflow jobs.
1266
+ */
1267
+ flow?: Array<Metadata.Flow>;
1268
+
1269
+ /**
1270
+ * The inputs for the job
1271
+ */
1272
+ input?: unknown;
1273
+
1274
+ /**
1275
+ * The output of the job
1276
+ */
1277
+ output?: unknown;
1278
+
1279
+ /**
1280
+ * The workflow ID of the job if job is part of a workflow.
1281
+ */
1282
+ workflowId?: string;
1283
+
1284
+ /**
1285
+ * The workflow job ID of the job if job is part of a workflow job.
1286
+ */
1287
+ workflowJobId?: string;
1288
+ }
1289
+
1290
+ export namespace Metadata {
1291
+ export interface Flow {
1292
+ /**
1293
+ * The id of the node.
1294
+ */
1295
+ id: string;
1296
+
1297
+ /**
1298
+ * The status of the node. Only available for WorkflowJob nodes.
1299
+ */
1300
+ status: 'failure' | 'pending' | 'processing' | 'skipped' | 'success';
1301
+
1302
+ /**
1303
+ * The type of the job for the node.
1304
+ */
1305
+ type:
1306
+ | 'custom-model'
1307
+ | 'generate-prompt'
1308
+ | 'logic'
1309
+ | 'remove-background'
1310
+ | 'transform'
1311
+ | 'user-approval'
1312
+ | 'workflow';
1313
+
1314
+ /**
1315
+ * List of produced assets for this node.
1316
+ */
1317
+ assets?: Array<Flow.Asset>;
1318
+
1319
+ /**
1320
+ * The nodes that this node depends on. Only available for nodes that have
1321
+ * dependencies. Mainly used for user approval nodes.
1322
+ */
1323
+ dependsOn?: Array<string>;
1324
+
1325
+ /**
1326
+ * The inputs of the node.
1327
+ */
1328
+ inputs?: Array<Flow.Input>;
1329
+
1330
+ /**
1331
+ * If the flow is part of a WorkflowJob, this is the jobId for the node. jobId is
1332
+ * only available for nodes started. A node "Pending" for a running workflow job is
1333
+ * not started.
1334
+ */
1335
+ jobId?: string;
1336
+
1337
+ /**
1338
+ * The logic of the node. Only available for logic nodes.
1339
+ */
1340
+ logic?: Flow.Logic;
1341
+
1342
+ /**
1343
+ * The type of the logic for the node. Only available for logic nodes.
1344
+ */
1345
+ logicType?: 'if-else';
1346
+
1347
+ /**
1348
+ * The model id for the node. Mainly used for custom model tasks.
1349
+ */
1350
+ modelId?: string;
1351
+
1352
+ /**
1353
+ * The workflow id for the node. Mainly used for workflow tasks.
1354
+ */
1355
+ workflowId?: string;
1356
+ }
1357
+
1358
+ export namespace Flow {
1359
+ export interface Asset {
1360
+ assetId: string;
1361
+
1362
+ url: string;
1363
+ }
1364
+
1365
+ /**
1366
+ * This is used to run the flow.
1367
+ */
1368
+ export interface Input {
1369
+ /**
1370
+ * The name that must be user to call the model through the API
1371
+ */
1372
+ name: string;
1373
+
1374
+ /**
1375
+ * The data type of the input
1376
+ */
1377
+ type:
1378
+ | 'boolean'
1379
+ | 'file'
1380
+ | 'file_array'
1381
+ | 'inputs_array'
1382
+ | 'model'
1383
+ | 'model_array'
1384
+ | 'number'
1385
+ | 'number_array'
1386
+ | 'string'
1387
+ | 'string_array';
1388
+
1389
+ /**
1390
+ * The allowed values for the input. For \`string\` or \`number\` types, creates a
1391
+ * single-select dropdown. For \`string_array\` type, creates a multi-select
1392
+ * dropdown.
1393
+ */
1394
+ allowedValues?: Array<unknown>;
1395
+
1396
+ /**
1397
+ * Specifies the background behavior for the input. Only available for \`file\` and
1398
+ * \`file_array\` input types with kind \`image\`.
1399
+ */
1400
+ backgroundBehavior?: 'opaque' | 'transparent';
1401
+
1402
+ /**
1403
+ * Whether the input is a color or not. Only available for \`string\` input type.
1404
+ */
1405
+ color?: boolean;
1406
+
1407
+ /**
1408
+ * Whether this input affects the model's cost calculation
1409
+ */
1410
+ costImpact?: boolean;
1411
+
1412
+ /**
1413
+ * Help text displayed in the UI to provide additional information about the input
1414
+ */
1415
+ description?: string;
1416
+
1417
+ /**
1418
+ * Used to visually group inputs together in the UI. Inputs with the same group
1419
+ * value appear consecutively in the UI.
1420
+ */
1421
+ group?: string;
1422
+
1423
+ /**
1424
+ * Hint text displayed in the UI as a tooltip to guide the user
1425
+ */
1426
+ hint?: string;
1427
+
1428
+ /**
1429
+ * The list of inputs which form an object within a container array. All inputs are
1430
+ * the same as the current object. This is only available for type inputs_array
1431
+ * inputs.
1432
+ */
1433
+ inputs?: Array<unknown>;
1434
+
1435
+ /**
1436
+ * The asset kind of the input. Only taken into account for \`file\` and
1437
+ * \`file_array\` input types.
1438
+ */
1439
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
1440
+
1441
+ /**
1442
+ * The label displayed in the UI for this input
1443
+ */
1444
+ label?: string;
1445
+
1446
+ /**
1447
+ * The name of the file input field to use as the mask source
1448
+ */
1449
+ maskFrom?: string;
1450
+
1451
+ /**
1452
+ * The maximum allowed value. Only available for \`number\` and \`array\` input
1453
+ * types.
1454
+ */
1455
+ max?: number;
1456
+
1457
+ /**
1458
+ * The maximum allowed length for \`string\` inputs. Also applies to each item in
1459
+ * \`string_array\`.
1460
+ */
1461
+ maxLength?: number;
1462
+
1463
+ /**
1464
+ * The minimum allowed value. Only available for \`number\` and array input types.
1465
+ */
1466
+ min?: number;
1467
+
1468
+ /**
1469
+ * The minimum allowed length for string inputs. Also applies to each item in
1470
+ * \`string_array\`.
1471
+ */
1472
+ minLength?: number;
1473
+
1474
+ /**
1475
+ * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
1476
+ * available for \`model_array\` input type.
1477
+ */
1478
+ modelTypes?: Array<
1479
+ | 'custom'
1480
+ | 'flux.1'
1481
+ | 'flux.1-composition'
1482
+ | 'flux.1-kontext-dev'
1483
+ | 'flux.1-kontext-lora'
1484
+ | 'flux.1-krea-dev'
1485
+ | 'flux.1-krea-lora'
1486
+ | 'flux.1-lora'
1487
+ | 'flux.1-pro'
1488
+ | 'flux.1.1-pro-ultra'
1489
+ | 'flux1.1-pro'
1490
+ | 'gpt-image-1'
1491
+ | 'sd-1_5'
1492
+ | 'sd-1_5-composition'
1493
+ | 'sd-1_5-lora'
1494
+ | 'sd-xl'
1495
+ | 'sd-xl-composition'
1496
+ | 'sd-xl-lora'
1497
+ >;
1498
+
1499
+ /**
1500
+ * Whether this input represents a parent asset to assign to the produced assets.
1501
+ * Only available for \`file\` and \`file_array\` input types.
1502
+ *
1503
+ * For \`file_array\`, the parent asset is the first item in the array.
1504
+ */
1505
+ parent?: boolean;
1506
+
1507
+ /**
1508
+ * Placeholder text for the input. Only available for 'string' input type.
1509
+ */
1510
+ placeholder?: string;
1511
+
1512
+ /**
1513
+ * Whether the input is a prompt. When true, displays as a text area with prompt
1514
+ * spark feature. Only available for \`string\` input type.
1515
+ */
1516
+ prompt?: boolean;
1517
+
1518
+ /**
1519
+ * Whether the input is used with prompt spark. Only available for \`string\` input
1520
+ * type.
1521
+ */
1522
+ promptSpark?: boolean;
1523
+
1524
+ /**
1525
+ * The reference to another input or output of the same workflow. Must have at
1526
+ * least one of node or conditional.
1527
+ */
1528
+ ref?: Input.Ref;
1529
+
1530
+ /**
1531
+ * Set of rules that describes when this input is required:
1532
+ *
1533
+ * - \`always\`: Input is always required
1534
+ * - \`ifNotDefined\`: Input is required when another specified input is not
1535
+ * defined
1536
+ * - \`ifDefined\`: Input is required when another specified input is defined
1537
+ * - \`conditionalValues\`: Input is required when another input has a specific
1538
+ * value
1539
+ *
1540
+ * By default, the input is not required.
1541
+ */
1542
+ required?: Input.Required;
1543
+
1544
+ /**
1545
+ * The step increment for numeric inputs. Only available for \`number\` input type.
1546
+ */
1547
+ step?: number;
1548
+ }
1549
+
1550
+ export namespace Input {
1551
+ /**
1552
+ * The reference to another input or output of the same workflow. Must have at
1553
+ * least one of node or conditional.
1554
+ */
1555
+ export interface Ref {
1556
+ /**
1557
+ * The conditional nodes to reference. If the conditional nodes are successful, the
1558
+ * node will be successful. If the conditional nodes are skipped, the node will be
1559
+ * skipped. Contains an array of node ids used to check the status of the nodes.
1560
+ */
1561
+ conditional?: Array<string>;
1562
+
1563
+ /**
1564
+ * This is the desired node output value if ref is an if/else node.
1565
+ */
1566
+ equal?: string;
1567
+
1568
+ /**
1569
+ * The name of the input or output to reference. If the type is 'workflow', the
1570
+ * name is the name of the input of the workflow is required If the type is 'node',
1571
+ * the name is not mandatory, except if you want all outputs of the node. To get
1572
+ * all outputs of a node, you can use the name 'all'.
1573
+ */
1574
+ name?: string;
1575
+
1576
+ /**
1577
+ * The node id or 'workflow' if the source is a workflow input.
1578
+ */
1579
+ node?: string;
1580
+ }
1581
+
1582
+ /**
1583
+ * Set of rules that describes when this input is required:
1584
+ *
1585
+ * - \`always\`: Input is always required
1586
+ * - \`ifNotDefined\`: Input is required when another specified input is not
1587
+ * defined
1588
+ * - \`ifDefined\`: Input is required when another specified input is defined
1589
+ * - \`conditionalValues\`: Input is required when another input has a specific
1590
+ * value
1591
+ *
1592
+ * By default, the input is not required.
1593
+ */
1594
+ export interface Required {
1595
+ /**
1596
+ * Whether the input is always required
1597
+ */
1598
+ always?: boolean;
1599
+
1600
+ /**
1601
+ * Makes this input required when another input has a specific value:
1602
+ *
1603
+ * - Key: name of the input to check
1604
+ * - Value: operation and allowed values that trigger the requirement
1605
+ */
1606
+ conditionalValues?: unknown;
1607
+
1608
+ /**
1609
+ * Makes this input required when another input is defined:
1610
+ *
1611
+ * - Key: name of the input that must be defined
1612
+ * - Value: message to display when this input is required
1613
+ */
1614
+ ifDefined?: unknown;
1615
+
1616
+ /**
1617
+ * Makes this input required when another input is not defined:
1618
+ *
1619
+ * - Key: name of the input that must be undefined
1620
+ * - Value: message to display when this input is required
1621
+ */
1622
+ ifNotDefined?: unknown;
1623
+ }
1624
+ }
1625
+
1626
+ /**
1627
+ * The logic of the node. Only available for logic nodes.
1628
+ */
1629
+ export interface Logic {
1630
+ /**
1631
+ * The cases of the logic. Only available for if/else nodes.
1632
+ */
1633
+ cases?: Array<Logic.Case>;
1634
+
1635
+ /**
1636
+ * The default case of the logic. Contains the id/output of the node to execute if
1637
+ * no case is matched. Only available for if/else nodes.
1638
+ */
1639
+ default?: string;
1640
+
1641
+ /**
1642
+ * The transform of the logic. Only available for transform nodes.
1643
+ */
1644
+ transform?: string;
1645
+ }
1646
+
1647
+ export namespace Logic {
1648
+ export interface Case {
1649
+ condition: string;
1650
+
1651
+ value: string;
1652
+ }
1653
+ }
1654
+ }
1655
+ }
1656
+
1657
+ export interface StatusHistory {
1658
+ date: string;
1659
+
1660
+ status:
1661
+ | 'canceled'
1662
+ | 'failure'
1663
+ | 'finalizing'
1664
+ | 'in-progress'
1665
+ | 'pending'
1666
+ | 'queued'
1667
+ | 'success'
1668
+ | 'warming-up';
1669
+ }
1670
+
1671
+ /**
1672
+ * The billing of the job
1673
+ */
1674
+ export interface Billing {
1675
+ cuCost: number;
1676
+
1677
+ cuDiscount: number;
1678
+ }
1679
+ }
1680
+
1681
+ export interface Model {
1682
+ /**
1683
+ * The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w")
1684
+ */
1685
+ id: string;
1686
+
1687
+ /**
1688
+ * List of model capabilities (example: ["txt2img", "img2img",
1689
+ * "txt2img_ip_adapter", ...])
1690
+ */
1691
+ capabilities: Array<
1692
+ | '3d23d'
1693
+ | 'audio2audio'
1694
+ | 'controlnet'
1695
+ | 'controlnet_img2img'
1696
+ | 'controlnet_inpaint'
1697
+ | 'controlnet_inpaint_ip_adapter'
1698
+ | 'controlnet_ip_adapter'
1699
+ | 'controlnet_reference'
1700
+ | 'controlnet_texture'
1701
+ | 'img23d'
1702
+ | 'img2img'
1703
+ | 'img2img_ip_adapter'
1704
+ | 'img2img_texture'
1705
+ | 'img2txt'
1706
+ | 'img2video'
1707
+ | 'inpaint'
1708
+ | 'inpaint_ip_adapter'
1709
+ | 'outpaint'
1710
+ | 'reference'
1711
+ | 'reference_texture'
1712
+ | 'txt23d'
1713
+ | 'txt2audio'
1714
+ | 'txt2img'
1715
+ | 'txt2img_ip_adapter'
1716
+ | 'txt2img_texture'
1717
+ | 'txt2txt'
1718
+ | 'txt2video'
1719
+ | 'video2img'
1720
+ | 'video2video'
1721
+ >;
1722
+
1723
+ /**
1724
+ * A list of CollectionId this model belongs to
1725
+ */
1726
+ collectionIds: Array<string>;
1727
+
1728
+ /**
1729
+ * The model creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
1730
+ */
1731
+ createdAt: string;
1732
+
1733
+ /**
1734
+ * Whether the model is a custom model and can be used only with POST
1735
+ * /generate/custom/{modelId} endpoint
1736
+ */
1737
+ custom: boolean;
1738
+
1739
+ /**
1740
+ * List of all example asset IDs setup by the model owner
1741
+ */
1742
+ exampleAssetIds: Array<string>;
1743
+
1744
+ /**
1745
+ * The privacy of the model (default: private)
1746
+ */
1747
+ privacy: 'private' | 'public' | 'unlisted';
1748
+
1749
+ /**
1750
+ * The source of the model
1751
+ */
1752
+ source: 'civitai' | 'huggingface' | 'other' | 'scenario';
1753
+
1754
+ /**
1755
+ * The model status
1756
+ */
1757
+ status: 'copying' | 'failed' | 'new' | 'trained' | 'training' | 'training-canceled';
1758
+
1759
+ /**
1760
+ * The associated tags (example: ["sci-fi", "landscape"])
1761
+ */
1762
+ tags: Array<string>;
1763
+
1764
+ /**
1765
+ * The total number of training images
1766
+ */
1767
+ trainingImagesNumber: number;
1768
+
1769
+ /**
1770
+ * The model type (example: "flux.1-lora")
1771
+ */
1772
+ type:
1773
+ | 'custom'
1774
+ | 'flux.1'
1775
+ | 'flux.1-composition'
1776
+ | 'flux.1-kontext-dev'
1777
+ | 'flux.1-kontext-lora'
1778
+ | 'flux.1-krea-dev'
1779
+ | 'flux.1-krea-lora'
1780
+ | 'flux.1-lora'
1781
+ | 'flux.1-pro'
1782
+ | 'flux.1.1-pro-ultra'
1783
+ | 'flux1.1-pro'
1784
+ | 'gpt-image-1'
1785
+ | 'sd-1_5'
1786
+ | 'sd-1_5-composition'
1787
+ | 'sd-1_5-lora'
1788
+ | 'sd-xl'
1789
+ | 'sd-xl-composition'
1790
+ | 'sd-xl-lora';
1791
+
1792
+ /**
1793
+ * The model last update date as an ISO string (example:
1794
+ * "2023-02-03T11:19:41.579Z")
1795
+ */
1796
+ updatedAt: string;
1797
+
1798
+ /**
1799
+ * The access restrictions of the model 0: Free plan 25: Creator plan 50: Pro plan
1800
+ * 75: Team plan 100: Enterprise plan
1801
+ */
1802
+ accessRestrictions?: number;
1803
+
1804
+ /**
1805
+ * The author user ID (example: "user_VFhihHKMRZyDDnZAJwLb2Q")
1806
+ */
1807
+ authorId?: string;
1808
+
1809
+ /**
1810
+ * The class of the model
1811
+ */
1812
+ class?: Model.Class;
1813
+
1814
+ /**
1815
+ * Compliance and regulatory metadata for the model
1816
+ */
1817
+ complianceMetadata?: Model.ComplianceMetadata;
1818
+
1819
+ /**
1820
+ * List of base model IDs compliant with the model (example: ["flux.1-dev",
1821
+ * "flux.1-schnell"]) This attribute is mainly used for Flux LoRA models
1822
+ */
1823
+ compliantModelIds?: Array<string>;
1824
+
1825
+ /**
1826
+ * The concepts is required for the type model: composition
1827
+ */
1828
+ concepts?: Array<Model.Concept>;
1829
+
1830
+ /**
1831
+ * The epoch of the model. Only available for Flux Lora Trained models. If not set,
1832
+ * uses the final model epoch (latest)
1833
+ */
1834
+ epoch?: string;
1835
+
1836
+ /**
1837
+ * The epochs of the model. Only available for Flux Lora Trained models.
1838
+ */
1839
+ epochs?: Array<Model.Epoch>;
1840
+
1841
+ /**
1842
+ * The inputs of the model. Only used for custom models. To retrieve this list, get
1843
+ * it by modelId with GET /models/{modelId}
1844
+ */
1845
+ inputs?: Array<Model.Input>;
1846
+
1847
+ /**
1848
+ * The model keyword, this is a legacy parameter, please use conceptPrompt in
1849
+ * parameters
1850
+ */
1851
+ modelKeyword?: string;
1852
+
1853
+ /**
1854
+ * The model name (example: "Cinematic Realism")
1855
+ */
1856
+ name?: string;
1857
+
1858
+ /**
1859
+ * Fine-tune the model's inferences with negative prompt embedding
1860
+ */
1861
+ negativePromptEmbedding?: string;
1862
+
1863
+ /**
1864
+ * The owner ID (example: "team_VFhihHKMRZyDDnZAJwLb2Q")
1865
+ */
1866
+ ownerId?: string;
1867
+
1868
+ /**
1869
+ * The parameters of the model
1870
+ */
1871
+ parameters?: Model.Parameters;
1872
+
1873
+ /**
1874
+ * The id of the parent model
1875
+ */
1876
+ parentModelId?: string;
1877
+
1878
+ /**
1879
+ * Fine-tune the model's inferences with prompt embedding
1880
+ */
1881
+ promptEmbedding?: string;
1882
+
1883
+ /**
1884
+ * The model short description (example: "This model generates highly detailed
1885
+ * cinematic scenes.")
1886
+ */
1887
+ shortDescription?: string;
1888
+
1889
+ /**
1890
+ * The date when the model will be soft deleted (only for Free plan)
1891
+ */
1892
+ softDeletionOn?: string;
1893
+
1894
+ /**
1895
+ * A thumbnail for your model
1896
+ */
1897
+ thumbnail?: Model.Thumbnail;
1898
+
1899
+ /**
1900
+ * Array of training image pairs
1901
+ */
1902
+ trainingImagePairs?: Array<Model.TrainingImagePair>;
1903
+
1904
+ /**
1905
+ * The URLs of the first 3 training images of the model. To retrieve the full set
1906
+ * of images, get it by modelId
1907
+ */
1908
+ trainingImages?: Array<Model.TrainingImage>;
1909
+
1910
+ /**
1911
+ * Additional information about the training progress of the model
1912
+ */
1913
+ trainingProgress?: Model.TrainingProgress;
1914
+
1915
+ /**
1916
+ * Additional information about the model's training
1917
+ */
1918
+ trainingStats?: Model.TrainingStats;
1919
+
1920
+ /**
1921
+ * The UI configuration for the model
1922
+ */
1923
+ uiConfig?: Model.UiConfig;
1924
+
1925
+ /**
1926
+ * (Deprecated) The user ID (example: "user_VFhihHKMRZyDDnZAJwLb2Q")
1927
+ */
1928
+ userId?: string;
1929
+ }
1930
+
1931
+ export namespace Model {
1932
+ /**
1933
+ * The class of the model
1934
+ */
1935
+ export interface Class {
1936
+ /**
1937
+ * The category slug of the class (example: "art-style")
1938
+ */
1939
+ category: string;
1940
+
1941
+ /**
1942
+ * The concept prompt of the class (example: "a sks character design")
1943
+ */
1944
+ conceptPrompt: string;
1945
+
1946
+ /**
1947
+ * The model ID of the class (example: "stable-diffusion-v1-5")
1948
+ */
1949
+ modelId: string;
1950
+
1951
+ /**
1952
+ * The class name (example: "Character Design")
1953
+ */
1954
+ name: string;
1955
+
1956
+ /**
1957
+ * The class prompt (example: "a character design")
1958
+ */
1959
+ prompt: string;
1960
+
1961
+ /**
1962
+ * The class slug (example: "art-style-character-design")
1963
+ */
1964
+ slug: string;
1965
+
1966
+ /**
1967
+ * The class status (only published classes are listed, but unpublished classes can
1968
+ * still appear in existing models)
1969
+ */
1970
+ status: 'published' | 'unpublished';
1971
+
1972
+ /**
1973
+ * Some example images URLs to showcase the class
1974
+ */
1975
+ thumbnails: Array<string>;
1976
+ }
1977
+
1978
+ /**
1979
+ * Compliance and regulatory metadata for the model
1980
+ */
1981
+ export interface ComplianceMetadata {
1982
+ /**
1983
+ * Data processing comment (e.g., zeroRetention, temporaryRetention, etc.)
1984
+ */
1985
+ dataProcessingComment?: 'researchOnly' | 'serviceImprovement' | 'temporaryRetention' | 'zeroRetention';
1986
+
1987
+ /**
1988
+ * URL to license terms
1989
+ */
1990
+ licenseTerms?: string;
1991
+
1992
+ /**
1993
+ * The maintainer of the model
1994
+ */
1995
+ maintainer?: 'Fal' | 'Provider' | 'Replicate' | 'Scenario';
1996
+
1997
+ /**
1998
+ * The provider of the model (examples: 'Google', 'AWS', 'BFL', 'Meshy', etc.)
1999
+ */
2000
+ modelProvider?: string;
2001
+
2002
+ /**
2003
+ * The sub-processor used for the model
2004
+ */
2005
+ subProcessor?: 'AWS' | 'Fal' | 'Modal' | 'Provider' | 'Replicate';
2006
+ }
2007
+
2008
+ export interface Concept {
2009
+ /**
2010
+ * The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w")
2011
+ */
2012
+ modelId: string;
2013
+
2014
+ /**
2015
+ * The scale of the model (example: 1.0) For Flux Kontext Prompt Editing, the scale
2016
+ * is between 0 and 2.
2017
+ */
2018
+ scale: number;
2019
+
2020
+ /**
2021
+ * The epoch of the model (example: "000001") Only available for Flux Lora Trained
2022
+ * models
2023
+ */
2024
+ modelEpoch?: string;
2025
+ }
2026
+
2027
+ export interface Epoch {
2028
+ /**
2029
+ * The epoch hash to identify the epoch
2030
+ */
2031
+ epoch: string;
2032
+
2033
+ /**
2034
+ * The assets of the epoch if sample prompts as been supplied during training
2035
+ */
2036
+ assets?: Array<Epoch.Asset>;
2037
+ }
2038
+
2039
+ export namespace Epoch {
2040
+ export interface Asset {
2041
+ /**
2042
+ * The AssetId of the image during training (example:
2043
+ * "asset_GTrL3mq4SXWyMxkOHRxlpw")
2044
+ */
2045
+ assetId: string;
2046
+
2047
+ /**
2048
+ * The url of the asset
2049
+ */
2050
+ url: string;
2051
+ }
2052
+ }
2053
+
2054
+ /**
2055
+ * Defines the input parameters for a model. Use this to understand the available
2056
+ * input parameters for a given `modelId` when calling
2057
+ * `POST /generate/custom/{modelId}`. See {@link
2058
+ * https://docs.scenario.com/docs/video-generation} for examples.
2059
+ */
2060
+ export interface Input {
2061
+ /**
2062
+ * The name that must be user to call the model through the API
2063
+ */
2064
+ name: string;
2065
+
2066
+ /**
2067
+ * The data type of the input
2068
+ */
2069
+ type:
2070
+ | 'boolean'
2071
+ | 'file'
2072
+ | 'file_array'
2073
+ | 'inputs_array'
2074
+ | 'model'
2075
+ | 'model_array'
2076
+ | 'number'
2077
+ | 'number_array'
2078
+ | 'string'
2079
+ | 'string_array';
2080
+
2081
+ /**
2082
+ * The allowed values for the input. For \`string\` or \`number\` types, creates a
2083
+ * single-select dropdown. For \`string_array\` type, creates a multi-select
2084
+ * dropdown.
2085
+ */
2086
+ allowedValues?: Array<unknown>;
2087
+
2088
+ /**
2089
+ * Specifies the background behavior for the input. Only available for \`file\` and
2090
+ * \`file_array\` input types with kind \`image\`.
2091
+ */
2092
+ backgroundBehavior?: 'opaque' | 'transparent';
2093
+
2094
+ /**
2095
+ * Whether the input is a color or not. Only available for \`string\` input type.
2096
+ */
2097
+ color?: boolean;
2098
+
2099
+ /**
2100
+ * Whether this input affects the model's cost calculation
2101
+ */
2102
+ costImpact?: boolean;
2103
+
2104
+ /**
2105
+ * Help text displayed in the UI to provide additional information about the input
2106
+ */
2107
+ description?: string;
2108
+
2109
+ /**
2110
+ * Used to visually group inputs together in the UI. Inputs with the same group
2111
+ * value appear consecutively in the UI.
2112
+ */
2113
+ group?: string;
2114
+
2115
+ /**
2116
+ * Hint text displayed in the UI as a tooltip to guide the user
2117
+ */
2118
+ hint?: string;
2119
+
2120
+ /**
2121
+ * The list of inputs which form an object within a container array. All inputs are
2122
+ * the same as the current object. This is only available for type inputs_array
2123
+ * inputs.
2124
+ */
2125
+ inputs?: Array<unknown>;
2126
+
2127
+ /**
2128
+ * The asset kind of the input. Only taken into account for \`file\` and
2129
+ * \`file_array\` input types.
2130
+ */
2131
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
2132
+
2133
+ /**
2134
+ * The label displayed in the UI for this input
2135
+ */
2136
+ label?: string;
2137
+
2138
+ /**
2139
+ * The name of the file input field to use as the mask source
2140
+ */
2141
+ maskFrom?: string;
2142
+
2143
+ /**
2144
+ * The maximum allowed value. Only available for \`number\` and \`array\` input
2145
+ * types.
2146
+ */
2147
+ max?: number;
2148
+
2149
+ /**
2150
+ * The maximum allowed length for \`string\` inputs. Also applies to each item in
2151
+ * \`string_array\`.
2152
+ */
2153
+ maxLength?: number;
2154
+
2155
+ /**
2156
+ * The minimum allowed value. Only available for \`number\` and array input types.
2157
+ */
2158
+ min?: number;
2159
+
2160
+ /**
2161
+ * The minimum allowed length for string inputs. Also applies to each item in
2162
+ * \`string_array\`.
2163
+ */
2164
+ minLength?: number;
2165
+
2166
+ /**
2167
+ * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
2168
+ * available for \`model_array\` input type.
2169
+ */
2170
+ modelTypes?: Array<
2171
+ | 'custom'
2172
+ | 'flux.1'
2173
+ | 'flux.1-composition'
2174
+ | 'flux.1-kontext-dev'
2175
+ | 'flux.1-kontext-lora'
2176
+ | 'flux.1-krea-dev'
2177
+ | 'flux.1-krea-lora'
2178
+ | 'flux.1-lora'
2179
+ | 'flux.1-pro'
2180
+ | 'flux.1.1-pro-ultra'
2181
+ | 'flux1.1-pro'
2182
+ | 'gpt-image-1'
2183
+ | 'sd-1_5'
2184
+ | 'sd-1_5-composition'
2185
+ | 'sd-1_5-lora'
2186
+ | 'sd-xl'
2187
+ | 'sd-xl-composition'
2188
+ | 'sd-xl-lora'
2189
+ >;
2190
+
2191
+ /**
2192
+ * Whether this input represents a parent asset to assign to the produced assets.
2193
+ * Only available for \`file\` and \`file_array\` input types.
2194
+ *
2195
+ * For \`file_array\`, the parent asset is the first item in the array.
2196
+ */
2197
+ parent?: boolean;
2198
+
2199
+ /**
2200
+ * Placeholder text for the input. Only available for 'string' input type.
2201
+ */
2202
+ placeholder?: string;
2203
+
2204
+ /**
2205
+ * Whether the input is a prompt. When true, displays as a text area with prompt
2206
+ * spark feature. Only available for \`string\` input type.
2207
+ */
2208
+ prompt?: boolean;
2209
+
2210
+ /**
2211
+ * Whether the input is used with prompt spark. Only available for \`string\` input
2212
+ * type.
2213
+ */
2214
+ promptSpark?: boolean;
2215
+
2216
+ /**
2217
+ * Set of rules that describes when this input is required:
2218
+ *
2219
+ * - \`always\`: Input is always required
2220
+ * - \`ifNotDefined\`: Input is required when another specified input is not
2221
+ * defined
2222
+ * - \`ifDefined\`: Input is required when another specified input is defined
2223
+ * - \`conditionalValues\`: Input is required when another input has a specific
2224
+ * value
2225
+ *
2226
+ * By default, the input is not required.
2227
+ */
2228
+ required?: Input.Required;
2229
+
2230
+ /**
2231
+ * The step increment for numeric inputs. Only available for \`number\` input type.
2232
+ */
2233
+ step?: number;
2234
+ }
2235
+
2236
+ export namespace Input {
2237
+ /**
2238
+ * Set of rules that describes when this input is required:
2239
+ *
2240
+ * - \`always\`: Input is always required
2241
+ * - \`ifNotDefined\`: Input is required when another specified input is not
2242
+ * defined
2243
+ * - \`ifDefined\`: Input is required when another specified input is defined
2244
+ * - \`conditionalValues\`: Input is required when another input has a specific
2245
+ * value
2246
+ *
2247
+ * By default, the input is not required.
2248
+ */
2249
+ export interface Required {
2250
+ /**
2251
+ * Whether the input is always required
2252
+ */
2253
+ always?: boolean;
2254
+
2255
+ /**
2256
+ * Makes this input required when another input has a specific value:
2257
+ *
2258
+ * - Key: name of the input to check
2259
+ * - Value: operation and allowed values that trigger the requirement
2260
+ */
2261
+ conditionalValues?: unknown;
2262
+
2263
+ /**
2264
+ * Makes this input required when another input is defined:
2265
+ *
2266
+ * - Key: name of the input that must be defined
2267
+ * - Value: message to display when this input is required
2268
+ */
2269
+ ifDefined?: unknown;
2270
+
2271
+ /**
2272
+ * Makes this input required when another input is not defined:
2273
+ *
2274
+ * - Key: name of the input that must be undefined
2275
+ * - Value: message to display when this input is required
2276
+ */
2277
+ ifNotDefined?: unknown;
2278
+ }
2279
+ }
2280
+
2281
+ /**
2282
+ * The parameters of the model
2283
+ */
2284
+ export interface Parameters {
2285
+ /**
2286
+ * The batch size Less steps, and will increase the learning rate
2287
+ *
2288
+ * Only available for Flux LoRA training
2289
+ */
2290
+ batchSize?: number;
2291
+
2292
+ /**
2293
+ * The prompt to specify images in the same class as provided instance images
2294
+ *
2295
+ * Only available for SD15 training
2296
+ */
2297
+ classPrompt?: string;
2298
+
2299
+ /**
2300
+ * The prompt with identifier specifying the instance (or subject) of the class
2301
+ * (example: "a daiton dog")
2302
+ *
2303
+ * Default value varies depending on the model type:
2304
+ *
2305
+ * - For SD1.5: "daiton" if no class is associated with the model
2306
+ * - For SDXL: "daiton"
2307
+ * - For Flux: ""
2308
+ */
2309
+ conceptPrompt?: string;
2310
+
2311
+ /**
2312
+ * Initial learning rate (after the potential warmup period)
2313
+ *
2314
+ * Default value varies depending on the model type:
2315
+ *
2316
+ * - For SD1.5 and SDXL: 0.000005
2317
+ * - For Flux: 0.0001
2318
+ */
2319
+ learningRate?: number;
2320
+
2321
+ /**
2322
+ * Initial learning rate (after the potential warmup period) for the text encoder
2323
+ *
2324
+ * Maximum [Flux LoRA: 0.001] Default [SDXL: 0.00005 | Flux LoRA: 0.00001] Minimum
2325
+ * [SDXL: 0 | Flux LoRA: 0.000001]
2326
+ */
2327
+ learningRateTextEncoder?: number;
2328
+
2329
+ /**
2330
+ * Initial learning rate (after the potential warmup period) for the UNet
2331
+ *
2332
+ * Only available for SDXL LoRA training
2333
+ */
2334
+ learningRateUnet?: number;
2335
+
2336
+ /**
2337
+ * The scheduler type to use (default: "constant")
2338
+ *
2339
+ * Only available for SD15 and SDXL LoRA training
2340
+ */
2341
+ lrScheduler?:
2342
+ | 'constant'
2343
+ | 'constant-with-warmup'
2344
+ | 'cosine'
2345
+ | 'cosine-with-restarts'
2346
+ | 'linear'
2347
+ | 'polynomial';
2348
+
2349
+ /**
2350
+ * Maximum number of training steps to execute (default: varies depending on the
2351
+ * model type)
2352
+ *
2353
+ * For SDXL LoRA training, please use `numTextTrainSteps` and `numUNetTrainSteps`
2354
+ * instead
2355
+ *
2356
+ * Default value varies depending on the model type:
2357
+ *
2358
+ * - For SD1.5: round((number of training images \* 225) / 3)
2359
+ * - For SDXL: number of training images \* 175
2360
+ * - For Flux: number of training images \* 100
2361
+ *
2362
+ * Maximum value varies depending on the model type:
2363
+ *
2364
+ * - For SD1.5 and SDXL: [0, 40000]
2365
+ * - For Flux: [0, 10000]
2366
+ */
2367
+ maxTrainSteps?: number;
2368
+
2369
+ /**
2370
+ * The number of epochs to train for
2371
+ *
2372
+ * Only available for Flux LoRA training
2373
+ */
2374
+ nbEpochs?: number;
2375
+
2376
+ /**
2377
+ * The number of times to repeat the training
2378
+ *
2379
+ * Only available for Flux LoRA training
2380
+ */
2381
+ nbRepeats?: number;
2382
+
2383
+ /**
2384
+ * The number of training steps for the text encoder
2385
+ *
2386
+ * Only available for SDXL LoRA training
2387
+ */
2388
+ numTextTrainSteps?: number;
2389
+
2390
+ /**
2391
+ * The number of training steps for the UNet
2392
+ *
2393
+ * Only available for SDXL LoRA training
2394
+ */
2395
+ numUNetTrainSteps?: number;
2396
+
2397
+ /**
2398
+ * Optimize the model training task for a specific type of input images. The
2399
+ * available values are:
2400
+ *
2401
+ * - "likeness": optimize training for likeness or portrait (targets specific
2402
+ * transformer blocks)
2403
+ * - "all": train all transformer blocks
2404
+ * - "none": train no specific transformer blocks
2405
+ *
2406
+ * This parameter controls which double and single transformer blocks are trained
2407
+ * during the LoRA training process.
2408
+ *
2409
+ * Only available for Flux LoRA training
2410
+ */
2411
+ optimizeFor?: 'likeness';
2412
+
2413
+ /**
2414
+ * The weight of prior preservation loss
2415
+ *
2416
+ * Only available for SD15 and SDXL LoRA training
2417
+ */
2418
+ priorLossWeight?: number;
2419
+
2420
+ /**
2421
+ * Whether to random crop or center crop images before resizing to the working
2422
+ * resolution
2423
+ *
2424
+ * Only available for SD15 and SDXL LoRA training
2425
+ */
2426
+ randomCrop?: boolean;
2427
+
2428
+ /**
2429
+ * Ratio of random crops
2430
+ *
2431
+ * Only available for SD15 and SDXL LoRA training
2432
+ */
2433
+ randomCropRatio?: number;
2434
+
2435
+ /**
2436
+ * Scale of random crops
2437
+ *
2438
+ * Only available for SD15 and SDXL LoRA training
2439
+ */
2440
+ randomCropScale?: number;
2441
+
2442
+ /**
2443
+ * The dimension of the LoRA update matrices
2444
+ *
2445
+ * Only available for SDXL and Flux LoRA training
2446
+ *
2447
+ * Default value varies depending on the model type:
2448
+ *
2449
+ * - For SDXL: 64
2450
+ * - For Flux: 16
2451
+ */
2452
+ rank?: number;
2453
+
2454
+ /**
2455
+ * The prompts to use for each epoch Only available for Flux LoRA training
2456
+ */
2457
+ samplePrompts?: Array<string>;
2458
+
2459
+ /**
2460
+ * The sample prompt images (AssetIds) paired with samplePrompts Only available for
2461
+ * Flux LoRA training Must be the same length as samplePrompts
2462
+ */
2463
+ sampleSourceImages?: Array<string>;
2464
+
2465
+ /**
2466
+ * Whether to scale the learning rate
2467
+ *
2468
+ * Note: Legacy parameter, will be ignored
2469
+ *
2470
+ * Only available for SD15 and SDXL LoRA training
2471
+ */
2472
+ scaleLr?: boolean;
2473
+
2474
+ /**
2475
+ * Used to reproduce previous results. Default: randomly generated number.
2476
+ *
2477
+ * Only available for SD15 and SDXL LoRA training
2478
+ */
2479
+ seed?: number;
2480
+
2481
+ /**
2482
+ * Whether to train the text encoder or not
2483
+ *
2484
+ * Example: For 100 steps and a value of 0.2, it means that the text encoder will
2485
+ * be trained for 20 steps and then the UNet for 80 steps
2486
+ *
2487
+ * Note: Legacy parameter, please use `numTextTrainSteps` and `numUNetTrainSteps`
2488
+ *
2489
+ * Only available for SD15 and SDXL LoRA training
2490
+ */
2491
+ textEncoderTrainingRatio?: number;
2492
+
2493
+ /**
2494
+ * Validation frequency. Cannot be greater than maxTrainSteps value
2495
+ *
2496
+ * Only available for SD15 and SDXL LoRA training
2497
+ */
2498
+ validationFrequency?: number;
2499
+
2500
+ /**
2501
+ * Validation prompt
2502
+ *
2503
+ * Only available for SD15 and SDXL LoRA training
2504
+ */
2505
+ validationPrompt?: string;
2506
+
2507
+ /**
2508
+ * The Weights And Bias key to use for logging. The maximum length is 40 characters
2509
+ */
2510
+ wandbKey?: string;
2511
+ }
2512
+
2513
+ /**
2514
+ * A thumbnail for your model
2515
+ */
2516
+ export interface Thumbnail {
2517
+ /**
2518
+ * The AssetId of the image used as a thumbnail for your model (example:
2519
+ * "asset_GTrL3mq4SXWyMxkOHRxlpw")
2520
+ */
2521
+ assetId: string;
2522
+
2523
+ /**
2524
+ * The url of the image used as a thumbnail for your model
2525
+ */
2526
+ url: string;
2527
+ }
2528
+
2529
+ export interface TrainingImagePair {
2530
+ /**
2531
+ * The instruction for the image pair, source to target
2532
+ */
2533
+ instruction?: string;
2534
+
2535
+ /**
2536
+ * The source asset ID (must be a training asset)
2537
+ */
2538
+ sourceId?: string;
2539
+
2540
+ /**
2541
+ * The target asset ID (must be a training asset)
2542
+ */
2543
+ targetId?: string;
2544
+ }
2545
+
2546
+ export interface TrainingImage {
2547
+ /**
2548
+ * The training image ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw")
2549
+ */
2550
+ id: string;
2551
+
2552
+ /**
2553
+ * Automatic captioning of the image
2554
+ */
2555
+ automaticCaptioning: string;
2556
+
2557
+ /**
2558
+ * The training image upload date as an ISO string (example:
2559
+ * "2023-02-03T11:19:41.579Z")
2560
+ */
2561
+ createdAt: string;
2562
+
2563
+ /**
2564
+ * Description for the image
2565
+ */
2566
+ description: string;
2567
+
2568
+ /**
2569
+ * The URL of the image
2570
+ */
2571
+ downloadUrl: string;
2572
+
2573
+ /**
2574
+ * The original file name of the image (example: "my-training-image.jpg")
2575
+ */
2576
+ name: string;
2577
+ }
2578
+
2579
+ /**
2580
+ * Additional information about the training progress of the model
2581
+ */
2582
+ export interface TrainingProgress {
2583
+ /**
2584
+ * The stage of the request
2585
+ */
2586
+ stage: 'pending' | 'queued-for-train' | 'running-train' | 'starting-train';
2587
+
2588
+ /**
2589
+ * Timestamp in milliseconds of the last time the training progress was updated
2590
+ */
2591
+ updatedAt: number;
2592
+
2593
+ /**
2594
+ * Position of the job in the queue (ie. the number of job in the queue before this
2595
+ * one)
2596
+ */
2597
+ position?: number;
2598
+
2599
+ /**
2600
+ * The progress of the job
2601
+ */
2602
+ progress?: number;
2603
+
2604
+ /**
2605
+ * The remaining time in milliseconds
2606
+ */
2607
+ remainingTimeMs?: number;
2608
+
2609
+ /**
2610
+ * The timestamp in millisecond marking the start of the process
2611
+ */
2612
+ startedAt?: number;
2613
+ }
2614
+
2615
+ /**
2616
+ * Additional information about the model's training
2617
+ */
2618
+ export interface TrainingStats {
2619
+ /**
2620
+ * The training end time as an ISO date string
2621
+ */
2622
+ endedAt?: string;
2623
+
2624
+ /**
2625
+ * The training queued duration in seconds
2626
+ */
2627
+ queueDuration?: number;
2628
+
2629
+ /**
2630
+ * The training start time as an ISO date string
2631
+ */
2632
+ startedAt?: string;
2633
+
2634
+ /**
2635
+ * The training duration in seconds
2636
+ */
2637
+ trainDuration?: number;
2638
+ }
2639
+
2640
+ /**
2641
+ * The UI configuration for the model
2642
+ */
2643
+ export interface UiConfig {
2644
+ /**
2645
+ * Configuration for the input properties
2646
+ */
2647
+ inputProperties?: { [key: string]: UiConfig.InputProperties };
2648
+
2649
+ /**
2650
+ * Configuration for the loras component
2651
+ */
2652
+ lorasComponent?: UiConfig.LorasComponent;
2653
+
2654
+ /**
2655
+ * Configuration for the presets
2656
+ */
2657
+ presets?: Array<UiConfig.Preset>;
2658
+
2659
+ /**
2660
+ * Configuration for the resolution component
2661
+ */
2662
+ resolutionComponent?: UiConfig.ResolutionComponent;
2663
+
2664
+ /**
2665
+ * Configuration for the selects
2666
+ */
2667
+ selects?: { [key: string]: unknown };
2668
+
2669
+ /**
2670
+ * Configuration for the trigger generate button
2671
+ */
2672
+ triggerGenerate?: UiConfig.TriggerGenerate;
2673
+ }
2674
+
2675
+ export namespace UiConfig {
2676
+ export interface InputProperties {
2677
+ collapsed?: boolean;
2678
+ }
2679
+
2680
+ /**
2681
+ * Configuration for the loras component
2682
+ */
2683
+ export interface LorasComponent {
2684
+ /**
2685
+ * The label of the component
2686
+ */
2687
+ label: string;
2688
+
2689
+ /**
2690
+ * The input name of the model (model_array)
2691
+ */
2692
+ modelInput: string;
2693
+
2694
+ /**
2695
+ * The input name of the scale (number_array)
2696
+ */
2697
+ scaleInput: string;
2698
+
2699
+ /**
2700
+ * The input model id (example: a composition or a single LoRA modelId) If
2701
+ * specified, the model id will be attached to the output asset as a metadata If
2702
+ * the model-decomposer parser is specified on it, modelInput and scaleInput will
2703
+ * be automatically populated
2704
+ */
2705
+ modelIdInput?: string;
2706
+ }
2707
+
2708
+ export interface Preset {
2709
+ fields: Array<string>;
2710
+
2711
+ presets: unknown;
2712
+ }
2713
+
2714
+ /**
2715
+ * Configuration for the resolution component
2716
+ */
2717
+ export interface ResolutionComponent {
2718
+ /**
2719
+ * The input name of the height
2720
+ */
2721
+ heightInput: string;
2722
+
2723
+ /**
2724
+ * The label of the component
2725
+ */
2726
+ label: string;
2727
+
2728
+ /**
2729
+ * The resolution presets
2730
+ */
2731
+ presets: Array<ResolutionComponent.Preset>;
2732
+
2733
+ /**
2734
+ * The input name of the width
2735
+ */
2736
+ widthInput: string;
2737
+ }
2738
+
2739
+ export namespace ResolutionComponent {
2740
+ export interface Preset {
2741
+ height: number;
2742
+
2743
+ label: string;
2744
+
2745
+ width: number;
2746
+ }
2747
+ }
2748
+
2749
+ /**
2750
+ * Configuration for the trigger generate button
2751
+ */
2752
+ export interface TriggerGenerate {
2753
+ label: string;
2754
+
2755
+ /**
2756
+ * The 'name' of the input where the trigger generate button will be displayed
2757
+ * (after the input). Do not specify both position and after.
2758
+ */
2759
+ after?: string;
2760
+
2761
+ /**
2762
+ * The position of the trigger generate button. If position specified, the button
2763
+ * will be displayed at the specified position. Do not specify both position and
2764
+ * after.
2765
+ */
2766
+ position?: 'bottom' | 'top';
2767
+ }
2768
+ }
2769
+ }
2770
+ }
2771
+
2772
+ export interface TrainActionParams {
2773
+ /**
2774
+ * The action to perform on the model training
2775
+ */
2776
+ action: 'cancel';
2777
+ }
2778
+
2779
+ export interface TrainTriggerParams {
2780
+ /**
2781
+ * Query param
2782
+ */
2783
+ dryRun?: string;
2784
+
2785
+ /**
2786
+ * Query param: If set to true, returns the original asset without transformation
2787
+ */
2788
+ originalAssets?: string;
2789
+
2790
+ /**
2791
+ * Body param
2792
+ */
2793
+ parameters?: TrainTriggerParams.Parameters;
2794
+ }
2795
+
2796
+ export namespace TrainTriggerParams {
2797
+ export interface Parameters {
2798
+ /**
2799
+ * The batch size Less steps, and will increase the learning rate
2800
+ *
2801
+ * Only available for Flux LoRA training
2802
+ */
2803
+ batchSize?: number;
2804
+
2805
+ /**
2806
+ * The prompt to specify images in the same class as provided instance images
2807
+ *
2808
+ * Only available for SD15 training
2809
+ */
2810
+ classPrompt?: string;
2811
+
2812
+ /**
2813
+ * The prompt with identifier specifying the instance (or subject) of the class
2814
+ * (example: "a daiton dog")
2815
+ *
2816
+ * Default value varies depending on the model type:
2817
+ *
2818
+ * - For SD1.5: "daiton" if no class is associated with the model
2819
+ * - For SDXL: "daiton"
2820
+ * - For Flux: ""
2821
+ */
2822
+ conceptPrompt?: string;
2823
+
2824
+ /**
2825
+ * Initial learning rate (after the potential warmup period)
2826
+ *
2827
+ * Default value varies depending on the model type:
2828
+ *
2829
+ * - For SD1.5 and SDXL: 0.000005
2830
+ * - For Flux: 0.0001
2831
+ */
2832
+ learningRate?: number;
2833
+
2834
+ /**
2835
+ * Initial learning rate (after the potential warmup period) for the text encoder
2836
+ *
2837
+ * Maximum [Flux LoRA: 0.001] Default [SDXL: 0.00005 | Flux LoRA: 0.00001] Minimum
2838
+ * [SDXL: 0 | Flux LoRA: 0.000001]
2839
+ */
2840
+ learningRateTextEncoder?: number;
2841
+
2842
+ /**
2843
+ * Initial learning rate (after the potential warmup period) for the UNet
2844
+ *
2845
+ * Only available for SDXL LoRA training
2846
+ */
2847
+ learningRateUnet?: number;
2848
+
2849
+ /**
2850
+ * The scheduler type to use (default: "constant")
2851
+ *
2852
+ * Only available for SD15 and SDXL LoRA training
2853
+ */
2854
+ lrScheduler?:
2855
+ | 'constant'
2856
+ | 'constant-with-warmup'
2857
+ | 'cosine'
2858
+ | 'cosine-with-restarts'
2859
+ | 'linear'
2860
+ | 'polynomial';
2861
+
2862
+ /**
2863
+ * Maximum number of training steps to execute (default: varies depending on the
2864
+ * model type)
2865
+ *
2866
+ * For SDXL LoRA training, please use `numTextTrainSteps` and `numUNetTrainSteps`
2867
+ * instead
2868
+ *
2869
+ * Default value varies depending on the model type:
2870
+ *
2871
+ * - For SD1.5: round((number of training images \* 225) / 3)
2872
+ * - For SDXL: number of training images \* 175
2873
+ * - For Flux: number of training images \* 100
2874
+ *
2875
+ * Maximum value varies depending on the model type:
2876
+ *
2877
+ * - For SD1.5 and SDXL: [0, 40000]
2878
+ * - For Flux: [0, 10000]
2879
+ */
2880
+ maxTrainSteps?: number;
2881
+
2882
+ /**
2883
+ * The number of epochs to train for
2884
+ *
2885
+ * Only available for Flux LoRA training
2886
+ */
2887
+ nbEpochs?: number;
2888
+
2889
+ /**
2890
+ * The number of times to repeat the training
2891
+ *
2892
+ * Only available for Flux LoRA training
2893
+ */
2894
+ nbRepeats?: number;
2895
+
2896
+ /**
2897
+ * The number of training steps for the text encoder
2898
+ *
2899
+ * Only available for SDXL LoRA training
2900
+ */
2901
+ numTextTrainSteps?: number;
2902
+
2903
+ /**
2904
+ * The number of training steps for the UNet
2905
+ *
2906
+ * Only available for SDXL LoRA training
2907
+ */
2908
+ numUNetTrainSteps?: number;
2909
+
2910
+ /**
2911
+ * Optimize the model training task for a specific type of input images. The
2912
+ * available values are:
2913
+ *
2914
+ * - "likeness": optimize training for likeness or portrait (targets specific
2915
+ * transformer blocks)
2916
+ * - "all": train all transformer blocks
2917
+ * - "none": train no specific transformer blocks
2918
+ *
2919
+ * This parameter controls which double and single transformer blocks are trained
2920
+ * during the LoRA training process.
2921
+ *
2922
+ * Only available for Flux LoRA training
2923
+ */
2924
+ optimizeFor?: 'likeness';
2925
+
2926
+ /**
2927
+ * The weight of prior preservation loss
2928
+ *
2929
+ * Only available for SD15 and SDXL LoRA training
2930
+ */
2931
+ priorLossWeight?: number;
2932
+
2933
+ /**
2934
+ * Whether to random crop or center crop images before resizing to the working
2935
+ * resolution
2936
+ *
2937
+ * Only available for SD15 and SDXL LoRA training
2938
+ */
2939
+ randomCrop?: boolean;
2940
+
2941
+ /**
2942
+ * Ratio of random crops
2943
+ *
2944
+ * Only available for SD15 and SDXL LoRA training
2945
+ */
2946
+ randomCropRatio?: number;
2947
+
2948
+ /**
2949
+ * Scale of random crops
2950
+ *
2951
+ * Only available for SD15 and SDXL LoRA training
2952
+ */
2953
+ randomCropScale?: number;
2954
+
2955
+ /**
2956
+ * The dimension of the LoRA update matrices
2957
+ *
2958
+ * Only available for SDXL and Flux LoRA training
2959
+ *
2960
+ * Default value varies depending on the model type:
2961
+ *
2962
+ * - For SDXL: 64
2963
+ * - For Flux: 16
2964
+ */
2965
+ rank?: number;
2966
+
2967
+ /**
2968
+ * The prompts to use for each epoch Only available for Flux LoRA training
2969
+ */
2970
+ samplePrompts?: Array<string>;
2971
+
2972
+ /**
2973
+ * The sample prompt images (AssetIds) paired with samplePrompts Only available for
2974
+ * Flux LoRA training Must be the same length as samplePrompts
2975
+ */
2976
+ sampleSourceImages?: Array<string>;
2977
+
2978
+ /**
2979
+ * Whether to scale the learning rate
2980
+ *
2981
+ * Note: Legacy parameter, will be ignored
2982
+ *
2983
+ * Only available for SD15 and SDXL LoRA training
2984
+ */
2985
+ scaleLr?: boolean;
2986
+
2987
+ /**
2988
+ * Used to reproduce previous results. Default: randomly generated number.
2989
+ *
2990
+ * Only available for SD15 and SDXL LoRA training
2991
+ */
2992
+ seed?: number;
2993
+
2994
+ /**
2995
+ * Whether to train the text encoder or not
2996
+ *
2997
+ * Example: For 100 steps and a value of 0.2, it means that the text encoder will
2998
+ * be trained for 20 steps and then the UNet for 80 steps
2999
+ *
3000
+ * Note: Legacy parameter, please use `numTextTrainSteps` and `numUNetTrainSteps`
3001
+ *
3002
+ * Only available for SD15 and SDXL LoRA training
3003
+ */
3004
+ textEncoderTrainingRatio?: number;
3005
+
3006
+ /**
3007
+ * Validation frequency. Cannot be greater than maxTrainSteps value
3008
+ *
3009
+ * Only available for SD15 and SDXL LoRA training
3010
+ */
3011
+ validationFrequency?: number;
3012
+
3013
+ /**
3014
+ * Validation prompt
3015
+ *
3016
+ * Only available for SD15 and SDXL LoRA training
3017
+ */
3018
+ validationPrompt?: string;
3019
+
3020
+ /**
3021
+ * The Weights And Bias key to use for logging. The maximum length is 40 characters
3022
+ */
3023
+ wandbKey?: string;
3024
+ }
3025
+ }
3026
+
3027
+ export declare namespace Train {
3028
+ export {
3029
+ type TrainActionResponse as TrainActionResponse,
3030
+ type TrainTriggerResponse as TrainTriggerResponse,
3031
+ type TrainActionParams as TrainActionParams,
3032
+ type TrainTriggerParams as TrainTriggerParams,
3033
+ };
3034
+ }