@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.
- package/CHANGELOG.md +33 -0
- package/LICENSE +201 -0
- package/README.md +358 -0
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/client.d.mts +208 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +208 -0
- package/client.d.ts.map +1 -0
- package/client.js +492 -0
- package/client.js.map +1 -0
- package/client.mjs +488 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +2 -0
- package/error.d.ts.map +1 -0
- package/error.js +6 -0
- package/error.js.map +1 -0
- package/error.mjs +2 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +6 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -0
- package/index.d.ts.map +1 -0
- package/index.js +30 -0
- package/index.js.map +1 -0
- package/index.mjs +7 -0
- package/index.mjs.map +1 -0
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +40 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +37 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/qs/formats.d.mts +7 -0
- package/internal/qs/formats.d.mts.map +1 -0
- package/internal/qs/formats.d.ts +7 -0
- package/internal/qs/formats.d.ts.map +1 -0
- package/internal/qs/formats.js +13 -0
- package/internal/qs/formats.js.map +1 -0
- package/internal/qs/formats.mjs +9 -0
- package/internal/qs/formats.mjs.map +1 -0
- package/internal/qs/index.d.mts +10 -0
- package/internal/qs/index.d.mts.map +1 -0
- package/internal/qs/index.d.ts +10 -0
- package/internal/qs/index.d.ts.map +1 -0
- package/internal/qs/index.js +14 -0
- package/internal/qs/index.js.map +1 -0
- package/internal/qs/index.mjs +10 -0
- package/internal/qs/index.mjs.map +1 -0
- package/internal/qs/stringify.d.mts +3 -0
- package/internal/qs/stringify.d.mts.map +1 -0
- package/internal/qs/stringify.d.ts +3 -0
- package/internal/qs/stringify.d.ts.map +1 -0
- package/internal/qs/stringify.js +277 -0
- package/internal/qs/stringify.js.map +1 -0
- package/internal/qs/stringify.mjs +274 -0
- package/internal/qs/stringify.mjs.map +1 -0
- package/internal/qs/types.d.mts +57 -0
- package/internal/qs/types.d.mts.map +1 -0
- package/internal/qs/types.d.ts +57 -0
- package/internal/qs/types.d.ts.map +1 -0
- package/internal/qs/types.js +3 -0
- package/internal/qs/types.js.map +1 -0
- package/internal/qs/types.mjs +2 -0
- package/internal/qs/types.mjs.map +1 -0
- package/internal/qs/utils.d.mts +15 -0
- package/internal/qs/utils.d.mts.map +1 -0
- package/internal/qs/utils.d.ts +15 -0
- package/internal/qs/utils.d.ts.map +1 -0
- package/internal/qs/utils.js +230 -0
- package/internal/qs/utils.js.map +1 -0
- package/internal/qs/utils.mjs +217 -0
- package/internal/qs/utils.mjs.map +1 -0
- package/internal/request-options.d.mts +75 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +75 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +17 -0
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +17 -0
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +85 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +79 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/query.d.mts +2 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +2 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +10 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +6 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +8 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +8 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +12 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +9 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +143 -0
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +2 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +6 -0
- package/resource.js.map +1 -0
- package/resource.mjs +2 -0
- package/resource.mjs.map +1 -0
- package/resources/assets/assets.d.mts +6397 -0
- package/resources/assets/assets.d.mts.map +1 -0
- package/resources/assets/assets.d.ts +6397 -0
- package/resources/assets/assets.d.ts.map +1 -0
- package/resources/assets/assets.js +98 -0
- package/resources/assets/assets.js.map +1 -0
- package/resources/assets/assets.mjs +93 -0
- package/resources/assets/assets.mjs.map +1 -0
- package/resources/assets/download.d.mts +87 -0
- package/resources/assets/download.d.mts.map +1 -0
- package/resources/assets/download.d.ts +87 -0
- package/resources/assets/download.d.ts.map +1 -0
- package/resources/assets/download.js +28 -0
- package/resources/assets/download.js.map +1 -0
- package/resources/assets/download.mjs +24 -0
- package/resources/assets/download.mjs.map +1 -0
- package/resources/assets/index.d.mts +4 -0
- package/resources/assets/index.d.mts.map +1 -0
- package/resources/assets/index.d.ts +4 -0
- package/resources/assets/index.d.ts.map +1 -0
- package/resources/assets/index.js +11 -0
- package/resources/assets/index.js.map +1 -0
- package/resources/assets/index.mjs +5 -0
- package/resources/assets/index.mjs.map +1 -0
- package/resources/assets/public.d.mts +1535 -0
- package/resources/assets/public.d.mts.map +1 -0
- package/resources/assets/public.d.ts +1535 -0
- package/resources/assets/public.d.ts.map +1 -0
- package/resources/assets/public.js +28 -0
- package/resources/assets/public.js.map +1 -0
- package/resources/assets/public.mjs +24 -0
- package/resources/assets/public.mjs.map +1 -0
- package/resources/assets.d.mts +2 -0
- package/resources/assets.d.mts.map +1 -0
- package/resources/assets.d.ts +2 -0
- package/resources/assets.d.ts.map +1 -0
- package/resources/assets.js +6 -0
- package/resources/assets.js.map +1 -0
- package/resources/assets.mjs +3 -0
- package/resources/assets.mjs.map +1 -0
- package/resources/collections/assets.d.mts +119 -0
- package/resources/collections/assets.d.mts.map +1 -0
- package/resources/collections/assets.d.ts +119 -0
- package/resources/collections/assets.d.ts.map +1 -0
- package/resources/collections/assets.js +22 -0
- package/resources/collections/assets.js.map +1 -0
- package/resources/collections/assets.mjs +18 -0
- package/resources/collections/assets.mjs.map +1 -0
- package/resources/collections/collections.d.mts +250 -0
- package/resources/collections/collections.d.mts.map +1 -0
- package/resources/collections/collections.d.ts +250 -0
- package/resources/collections/collections.d.ts.map +1 -0
- package/resources/collections/collections.js +52 -0
- package/resources/collections/collections.js.map +1 -0
- package/resources/collections/collections.mjs +47 -0
- package/resources/collections/collections.mjs.map +1 -0
- package/resources/collections/index.d.mts +4 -0
- package/resources/collections/index.d.mts.map +1 -0
- package/resources/collections/index.d.ts +4 -0
- package/resources/collections/index.d.ts.map +1 -0
- package/resources/collections/index.js +11 -0
- package/resources/collections/index.js.map +1 -0
- package/resources/collections/index.mjs +5 -0
- package/resources/collections/index.mjs.map +1 -0
- package/resources/collections/models.d.mts +119 -0
- package/resources/collections/models.d.mts.map +1 -0
- package/resources/collections/models.d.ts +119 -0
- package/resources/collections/models.d.ts.map +1 -0
- package/resources/collections/models.js +22 -0
- package/resources/collections/models.js.map +1 -0
- package/resources/collections/models.mjs +18 -0
- package/resources/collections/models.mjs.map +1 -0
- package/resources/collections.d.mts +2 -0
- package/resources/collections.d.mts.map +1 -0
- package/resources/collections.d.ts +2 -0
- package/resources/collections.d.ts.map +1 -0
- package/resources/collections.js +6 -0
- package/resources/collections.js.map +1 -0
- package/resources/collections.mjs +3 -0
- package/resources/collections.mjs.map +1 -0
- package/resources/generate.d.mts +3804 -0
- package/resources/generate.d.mts.map +1 -0
- package/resources/generate.d.ts +3804 -0
- package/resources/generate.d.ts.map +1 -0
- package/resources/generate.js +70 -0
- package/resources/generate.js.map +1 -0
- package/resources/generate.mjs +66 -0
- package/resources/generate.mjs.map +1 -0
- package/resources/index.d.mts +12 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +12 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +27 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +13 -0
- package/resources/index.mjs.map +1 -0
- package/resources/jobs.d.mts +1191 -0
- package/resources/jobs.d.mts.map +1 -0
- package/resources/jobs.d.ts +1191 -0
- package/resources/jobs.d.ts.map +1 -0
- package/resources/jobs.js +31 -0
- package/resources/jobs.js.map +1 -0
- package/resources/jobs.mjs +27 -0
- package/resources/jobs.mjs.map +1 -0
- package/resources/models/description.d.mts +490 -0
- package/resources/models/description.d.mts.map +1 -0
- package/resources/models/description.d.ts +490 -0
- package/resources/models/description.d.ts.map +1 -0
- package/resources/models/description.js +27 -0
- package/resources/models/description.js.map +1 -0
- package/resources/models/description.mjs +23 -0
- package/resources/models/description.mjs.map +1 -0
- package/resources/models/examples.d.mts +2819 -0
- package/resources/models/examples.d.mts.map +1 -0
- package/resources/models/examples.d.ts +2819 -0
- package/resources/models/examples.d.ts.map +1 -0
- package/resources/models/examples.js +27 -0
- package/resources/models/examples.js.map +1 -0
- package/resources/models/examples.mjs +23 -0
- package/resources/models/examples.mjs.map +1 -0
- package/resources/models/index.d.mts +6 -0
- package/resources/models/index.d.mts.map +1 -0
- package/resources/models/index.d.ts +6 -0
- package/resources/models/index.d.ts.map +1 -0
- package/resources/models/index.js +15 -0
- package/resources/models/index.js.map +1 -0
- package/resources/models/index.mjs +7 -0
- package/resources/models/index.mjs.map +1 -0
- package/resources/models/models.d.mts +6676 -0
- package/resources/models/models.d.mts.map +1 -0
- package/resources/models/models.d.ts +6676 -0
- package/resources/models/models.d.ts.map +1 -0
- package/resources/models/models.js +107 -0
- package/resources/models/models.js.map +1 -0
- package/resources/models/models.mjs +102 -0
- package/resources/models/models.mjs.map +1 -0
- package/resources/models/train.d.mts +2334 -0
- package/resources/models/train.d.mts.map +1 -0
- package/resources/models/train.d.ts +2334 -0
- package/resources/models/train.d.ts.map +1 -0
- package/resources/models/train.js +27 -0
- package/resources/models/train.js.map +1 -0
- package/resources/models/train.mjs +23 -0
- package/resources/models/train.mjs.map +1 -0
- package/resources/models/training-images.d.mts +214 -0
- package/resources/models/training-images.d.mts.map +1 -0
- package/resources/models/training-images.d.ts +214 -0
- package/resources/models/training-images.d.ts.map +1 -0
- package/resources/models/training-images.js +46 -0
- package/resources/models/training-images.js.map +1 -0
- package/resources/models/training-images.mjs +42 -0
- package/resources/models/training-images.mjs.map +1 -0
- package/resources/models.d.mts +2 -0
- package/resources/models.d.mts.map +1 -0
- package/resources/models.d.ts +2 -0
- package/resources/models.d.ts.map +1 -0
- package/resources/models.js +6 -0
- package/resources/models.js.map +1 -0
- package/resources/models.mjs +3 -0
- package/resources/models.mjs.map +1 -0
- package/resources/oscu.d.mts +25 -0
- package/resources/oscu.d.mts.map +1 -0
- package/resources/oscu.d.ts +25 -0
- package/resources/oscu.d.ts.map +1 -0
- package/resources/oscu.js +16 -0
- package/resources/oscu.js.map +1 -0
- package/resources/oscu.mjs +12 -0
- package/resources/oscu.mjs.map +1 -0
- package/resources/search.d.mts +595 -0
- package/resources/search.d.mts.map +1 -0
- package/resources/search.d.ts +595 -0
- package/resources/search.d.ts.map +1 -0
- package/resources/search.js +29 -0
- package/resources/search.js.map +1 -0
- package/resources/search.mjs +25 -0
- package/resources/search.mjs.map +1 -0
- package/resources/tags.d.mts +55 -0
- package/resources/tags.d.mts.map +1 -0
- package/resources/tags.d.ts +55 -0
- package/resources/tags.d.ts.map +1 -0
- package/resources/tags.js +15 -0
- package/resources/tags.js.map +1 -0
- package/resources/tags.mjs +11 -0
- package/resources/tags.mjs.map +1 -0
- package/resources/uploads.d.mts +250 -0
- package/resources/uploads.d.mts.map +1 -0
- package/resources/uploads.d.ts +250 -0
- package/resources/uploads.d.ts.map +1 -0
- package/resources/uploads.js +29 -0
- package/resources/uploads.js.map +1 -0
- package/resources/uploads.mjs +25 -0
- package/resources/uploads.mjs.map +1 -0
- package/resources/usages.d.mts +760 -0
- package/resources/usages.d.mts.map +1 -0
- package/resources/usages.d.ts +760 -0
- package/resources/usages.d.ts.map +1 -0
- package/resources/usages.js +17 -0
- package/resources/usages.js.map +1 -0
- package/resources/usages.mjs +13 -0
- package/resources/usages.mjs.map +1 -0
- package/resources/workflows.d.mts +4539 -0
- package/resources/workflows.d.mts.map +1 -0
- package/resources/workflows.d.ts +4539 -0
- package/resources/workflows.d.ts.map +1 -0
- package/resources/workflows.js +64 -0
- package/resources/workflows.js.map +1 -0
- package/resources/workflows.mjs +60 -0
- package/resources/workflows.mjs.map +1 -0
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +5 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/api-promise.ts +2 -0
- package/src/client.ts +999 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -0
- package/src/index.ts +22 -0
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +97 -0
- package/src/internal/parse.ts +56 -0
- package/src/internal/qs/LICENSE.md +13 -0
- package/src/internal/qs/README.md +3 -0
- package/src/internal/qs/formats.ts +10 -0
- package/src/internal/qs/index.ts +13 -0
- package/src/internal/qs/stringify.ts +385 -0
- package/src/internal/qs/types.ts +71 -0
- package/src/internal/qs/utils.ts +265 -0
- package/src/internal/request-options.ts +91 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +95 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +126 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/query.ts +7 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +9 -0
- package/src/lib/.keep +4 -0
- package/src/resource.ts +2 -0
- package/src/resources/assets/assets.ts +9939 -0
- package/src/resources/assets/download.ts +138 -0
- package/src/resources/assets/index.ts +41 -0
- package/src/resources/assets/public.ts +2329 -0
- package/src/resources/assets.ts +3 -0
- package/src/resources/collections/assets.ts +163 -0
- package/src/resources/collections/collections.ts +357 -0
- package/src/resources/collections/index.ts +27 -0
- package/src/resources/collections/models.ts +163 -0
- package/src/resources/collections.ts +3 -0
- package/src/resources/generate.ts +5478 -0
- package/src/resources/index.ts +122 -0
- package/src/resources/jobs.ts +1712 -0
- package/src/resources/models/description.ts +800 -0
- package/src/resources/models/examples.ts +4125 -0
- package/src/resources/models/index.ts +58 -0
- package/src/resources/models/models.ts +8619 -0
- package/src/resources/models/train.ts +3034 -0
- package/src/resources/models/training-images.ts +304 -0
- package/src/resources/models.ts +3 -0
- package/src/resources/oscu.ts +35 -0
- package/src/resources/search.ts +731 -0
- package/src/resources/tags.ts +69 -0
- package/src/resources/uploads.ts +369 -0
- package/src/resources/usages.ts +1242 -0
- package/src/resources/workflows.ts +6019 -0
- package/src/resources.ts +1 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +2 -0
- package/src/version.ts +1 -0
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +2 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +6 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +2 -0
- package/uploads.mjs.map +1 -0
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
|
@@ -0,0 +1,4125 @@
|
|
|
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 Examples extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Add/delete/sort examples of the given `modelId`
|
|
11
|
+
*/
|
|
12
|
+
update(
|
|
13
|
+
modelID: string,
|
|
14
|
+
params: ExampleUpdateParams,
|
|
15
|
+
options?: RequestOptions,
|
|
16
|
+
): APIPromise<ExampleUpdateResponse> {
|
|
17
|
+
const { originalAssets, ...body } = params;
|
|
18
|
+
return this._client.put(path`/models/${modelID}/examples`, {
|
|
19
|
+
query: { originalAssets },
|
|
20
|
+
body,
|
|
21
|
+
...options,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* List all examples of the given `modelId`
|
|
27
|
+
*/
|
|
28
|
+
list(
|
|
29
|
+
modelID: string,
|
|
30
|
+
query: ExampleListParams | null | undefined = {},
|
|
31
|
+
options?: RequestOptions,
|
|
32
|
+
): APIPromise<ExampleListResponse> {
|
|
33
|
+
return this._client.get(path`/models/${modelID}/examples`, { query, ...options });
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface ExampleUpdateResponse {
|
|
38
|
+
examples: Array<ExampleUpdateResponse.Example>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export namespace ExampleUpdateResponse {
|
|
42
|
+
export interface Example {
|
|
43
|
+
/**
|
|
44
|
+
* Asset generated by the inference
|
|
45
|
+
*/
|
|
46
|
+
asset: Example.Asset;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Model id of the model used to generate the asset
|
|
50
|
+
*/
|
|
51
|
+
modelId: string;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Inference id of the inference used to generate the asset
|
|
55
|
+
*/
|
|
56
|
+
inferenceId?: string;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The inference parameters used to generate the asset
|
|
60
|
+
*/
|
|
61
|
+
inferenceParameters?: Example.InferenceParameters;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The job associated with the asset
|
|
65
|
+
*/
|
|
66
|
+
job?: Example.Job;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export namespace Example {
|
|
70
|
+
/**
|
|
71
|
+
* Asset generated by the inference
|
|
72
|
+
*/
|
|
73
|
+
export interface Asset {
|
|
74
|
+
/**
|
|
75
|
+
* The asset ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
76
|
+
*/
|
|
77
|
+
id: string;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea")
|
|
81
|
+
*/
|
|
82
|
+
authorId: string;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* A list of CollectionId this asset belongs to
|
|
86
|
+
*/
|
|
87
|
+
collectionIds: Array<string>;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* The asset creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
|
|
91
|
+
*/
|
|
92
|
+
createdAt: string;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* List of edit capabilities
|
|
96
|
+
*/
|
|
97
|
+
editCapabilities: Array<
|
|
98
|
+
| 'DETECTION'
|
|
99
|
+
| 'GENERATIVE_FILL'
|
|
100
|
+
| 'PIXELATE'
|
|
101
|
+
| 'PROMPT_EDITING'
|
|
102
|
+
| 'REFINE'
|
|
103
|
+
| 'REFRAME'
|
|
104
|
+
| 'REMOVE_BACKGROUND'
|
|
105
|
+
| 'SEGMENTATION'
|
|
106
|
+
| 'UPSCALE'
|
|
107
|
+
| 'UPSCALE_360'
|
|
108
|
+
| 'VECTORIZATION'
|
|
109
|
+
>;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* The kind of asset
|
|
113
|
+
*/
|
|
114
|
+
kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Metadata of the asset with some additional information
|
|
118
|
+
*/
|
|
119
|
+
metadata: Asset.Metadata;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* The mime type of the asset (example: "image/png")
|
|
123
|
+
*/
|
|
124
|
+
mimeType: string;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* The owner (project) ID (example: "proj_23tlk332lkht3kl2" or
|
|
128
|
+
* "team_dlkhgs23tlk3hlkth32lkht3kl2" for old teams)
|
|
129
|
+
*/
|
|
130
|
+
ownerId: string;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* The privacy of the asset
|
|
134
|
+
*/
|
|
135
|
+
privacy: 'private' | 'public' | 'unlisted';
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* The properties of the asset, content may depend on the kind of asset returned
|
|
139
|
+
*/
|
|
140
|
+
properties: Asset.Properties;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* source of the asset
|
|
144
|
+
*/
|
|
145
|
+
source:
|
|
146
|
+
| '3d23d'
|
|
147
|
+
| '3d23d:texture'
|
|
148
|
+
| '3d:texture'
|
|
149
|
+
| '3d:texture:albedo'
|
|
150
|
+
| '3d:texture:metallic'
|
|
151
|
+
| '3d:texture:mtl'
|
|
152
|
+
| '3d:texture:normal'
|
|
153
|
+
| '3d:texture:roughness'
|
|
154
|
+
| 'audio2audio'
|
|
155
|
+
| 'background-removal'
|
|
156
|
+
| 'canvas'
|
|
157
|
+
| 'canvas-drawing'
|
|
158
|
+
| 'canvas-export'
|
|
159
|
+
| 'detection'
|
|
160
|
+
| 'generative-fill'
|
|
161
|
+
| 'image-prompt-editing'
|
|
162
|
+
| 'img23d'
|
|
163
|
+
| 'img2img'
|
|
164
|
+
| 'img2video'
|
|
165
|
+
| 'inference-control-net'
|
|
166
|
+
| 'inference-control-net-img'
|
|
167
|
+
| 'inference-control-net-inpainting'
|
|
168
|
+
| 'inference-control-net-inpainting-ip-adapter'
|
|
169
|
+
| 'inference-control-net-ip-adapter'
|
|
170
|
+
| 'inference-control-net-reference'
|
|
171
|
+
| 'inference-control-net-texture'
|
|
172
|
+
| 'inference-img'
|
|
173
|
+
| 'inference-img-ip-adapter'
|
|
174
|
+
| 'inference-img-texture'
|
|
175
|
+
| 'inference-in-paint'
|
|
176
|
+
| 'inference-in-paint-ip-adapter'
|
|
177
|
+
| 'inference-reference'
|
|
178
|
+
| 'inference-reference-texture'
|
|
179
|
+
| 'inference-txt'
|
|
180
|
+
| 'inference-txt-ip-adapter'
|
|
181
|
+
| 'inference-txt-texture'
|
|
182
|
+
| 'patch'
|
|
183
|
+
| 'pixelization'
|
|
184
|
+
| 'reframe'
|
|
185
|
+
| 'restyle'
|
|
186
|
+
| 'segment'
|
|
187
|
+
| 'segmentation-image'
|
|
188
|
+
| 'segmentation-mask'
|
|
189
|
+
| 'skybox-3d'
|
|
190
|
+
| 'skybox-base-360'
|
|
191
|
+
| 'skybox-hdri'
|
|
192
|
+
| 'texture'
|
|
193
|
+
| 'texture:albedo'
|
|
194
|
+
| 'texture:ao'
|
|
195
|
+
| 'texture:edge'
|
|
196
|
+
| 'texture:height'
|
|
197
|
+
| 'texture:metallic'
|
|
198
|
+
| 'texture:normal'
|
|
199
|
+
| 'texture:smoothness'
|
|
200
|
+
| 'txt23d'
|
|
201
|
+
| 'txt2audio'
|
|
202
|
+
| 'txt2img'
|
|
203
|
+
| 'txt2video'
|
|
204
|
+
| 'unknown'
|
|
205
|
+
| 'uploaded'
|
|
206
|
+
| 'uploaded-3d'
|
|
207
|
+
| 'uploaded-audio'
|
|
208
|
+
| 'uploaded-avatar'
|
|
209
|
+
| 'uploaded-video'
|
|
210
|
+
| 'upscale'
|
|
211
|
+
| 'upscale-skybox'
|
|
212
|
+
| 'upscale-texture'
|
|
213
|
+
| 'upscale-video'
|
|
214
|
+
| 'vectorization'
|
|
215
|
+
| 'video2img'
|
|
216
|
+
| 'video2video';
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* The actual status
|
|
220
|
+
*/
|
|
221
|
+
status: 'error' | 'pending' | 'success';
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* The associated tags (example: ["sci-fi", "landscape"])
|
|
225
|
+
*/
|
|
226
|
+
tags: Array<string>;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* The asset last update date as an ISO string (example:
|
|
230
|
+
* "2023-02-03T11:19:41.579Z")
|
|
231
|
+
*/
|
|
232
|
+
updatedAt: string;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Signed URL to get the asset content
|
|
236
|
+
*/
|
|
237
|
+
url: string;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Automatic captioning of the asset
|
|
241
|
+
*/
|
|
242
|
+
automaticCaptioning?: string;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* The description, it will contain in priority:
|
|
246
|
+
*
|
|
247
|
+
* - the manual description
|
|
248
|
+
* - the advanced captioning when the asset is used in training flow
|
|
249
|
+
* - the automatic captioning
|
|
250
|
+
*/
|
|
251
|
+
description?: string;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* The embedding of the asset when requested.
|
|
255
|
+
*
|
|
256
|
+
* Only available when an asset can be embedded (ie: not Detection maps)
|
|
257
|
+
*/
|
|
258
|
+
embedding?: Array<number>;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* The video asset's first frame.
|
|
262
|
+
*
|
|
263
|
+
* Contains the assetId and the url of the first frame.
|
|
264
|
+
*/
|
|
265
|
+
firstFrame?: Asset.FirstFrame;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Whether the asset is hidden.
|
|
269
|
+
*/
|
|
270
|
+
isHidden?: boolean;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* The video asset's last frame.
|
|
274
|
+
*
|
|
275
|
+
* Contains the assetId and the url of the last frame.
|
|
276
|
+
*/
|
|
277
|
+
lastFrame?: Asset.LastFrame;
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* The NSFW labels
|
|
281
|
+
*/
|
|
282
|
+
nsfw?: Array<string>;
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* The original file url.
|
|
286
|
+
*
|
|
287
|
+
* Contains the url of the original file. without any conversion. Only available
|
|
288
|
+
* for some specific video, audio and threeD assets. Is only specified if the given
|
|
289
|
+
* asset data has been replaced with a new file during the creation of the asset.
|
|
290
|
+
*/
|
|
291
|
+
originalFileUrl?: string;
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* The output index of the asset within a job This index is an positive integer
|
|
295
|
+
* that starts at 0 It is used to differentiate between multiple outputs of the
|
|
296
|
+
* same job If the job has only one output, this index is 0
|
|
297
|
+
*/
|
|
298
|
+
outputIndex?: number;
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* The asset's preview.
|
|
302
|
+
*
|
|
303
|
+
* Contains the assetId and the url of the preview.
|
|
304
|
+
*/
|
|
305
|
+
preview?: Asset.Preview;
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* The asset's thumbnail.
|
|
309
|
+
*
|
|
310
|
+
* Contains the assetId and the url of the thumbnail.
|
|
311
|
+
*/
|
|
312
|
+
thumbnail?: Asset.Thumbnail;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
export namespace Asset {
|
|
316
|
+
/**
|
|
317
|
+
* Metadata of the asset with some additional information
|
|
318
|
+
*/
|
|
319
|
+
export interface Metadata {
|
|
320
|
+
kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* The type of the asset. Ex: 'inference-txt2img' will represent an asset generated
|
|
324
|
+
* from a text to image model
|
|
325
|
+
*/
|
|
326
|
+
type:
|
|
327
|
+
| '3d-texture'
|
|
328
|
+
| '3d-texture-albedo'
|
|
329
|
+
| '3d-texture-metallic'
|
|
330
|
+
| '3d-texture-mtl'
|
|
331
|
+
| '3d-texture-normal'
|
|
332
|
+
| '3d-texture-roughness'
|
|
333
|
+
| '3d23d'
|
|
334
|
+
| '3d23d-texture'
|
|
335
|
+
| 'audio2audio'
|
|
336
|
+
| 'background-removal'
|
|
337
|
+
| 'canvas'
|
|
338
|
+
| 'canvas-drawing'
|
|
339
|
+
| 'canvas-export'
|
|
340
|
+
| 'detection'
|
|
341
|
+
| 'generative-fill'
|
|
342
|
+
| 'image-prompt-editing'
|
|
343
|
+
| 'img23d'
|
|
344
|
+
| 'img2img'
|
|
345
|
+
| 'img2video'
|
|
346
|
+
| 'inference-controlnet'
|
|
347
|
+
| 'inference-controlnet-img2img'
|
|
348
|
+
| 'inference-controlnet-inpaint'
|
|
349
|
+
| 'inference-controlnet-inpaint-ip-adapter'
|
|
350
|
+
| 'inference-controlnet-ip-adapter'
|
|
351
|
+
| 'inference-controlnet-reference'
|
|
352
|
+
| 'inference-controlnet-texture'
|
|
353
|
+
| 'inference-img2img'
|
|
354
|
+
| 'inference-img2img-ip-adapter'
|
|
355
|
+
| 'inference-img2img-texture'
|
|
356
|
+
| 'inference-inpaint'
|
|
357
|
+
| 'inference-inpaint-ip-adapter'
|
|
358
|
+
| 'inference-reference'
|
|
359
|
+
| 'inference-reference-texture'
|
|
360
|
+
| 'inference-txt2img'
|
|
361
|
+
| 'inference-txt2img-ip-adapter'
|
|
362
|
+
| 'inference-txt2img-texture'
|
|
363
|
+
| 'patch'
|
|
364
|
+
| 'pixelization'
|
|
365
|
+
| 'reframe'
|
|
366
|
+
| 'restyle'
|
|
367
|
+
| 'segment'
|
|
368
|
+
| 'segmentation-image'
|
|
369
|
+
| 'segmentation-mask'
|
|
370
|
+
| 'skybox-3d'
|
|
371
|
+
| 'skybox-base-360'
|
|
372
|
+
| 'skybox-hdri'
|
|
373
|
+
| 'texture'
|
|
374
|
+
| 'texture-albedo'
|
|
375
|
+
| 'texture-ao'
|
|
376
|
+
| 'texture-edge'
|
|
377
|
+
| 'texture-height'
|
|
378
|
+
| 'texture-metallic'
|
|
379
|
+
| 'texture-normal'
|
|
380
|
+
| 'texture-smoothness'
|
|
381
|
+
| 'txt23d'
|
|
382
|
+
| 'txt2audio'
|
|
383
|
+
| 'txt2img'
|
|
384
|
+
| 'txt2video'
|
|
385
|
+
| 'unknown'
|
|
386
|
+
| 'uploaded'
|
|
387
|
+
| 'uploaded-3d'
|
|
388
|
+
| 'uploaded-audio'
|
|
389
|
+
| 'uploaded-avatar'
|
|
390
|
+
| 'uploaded-video'
|
|
391
|
+
| 'upscale'
|
|
392
|
+
| 'upscale-skybox'
|
|
393
|
+
| 'upscale-texture'
|
|
394
|
+
| 'upscale-video'
|
|
395
|
+
| 'vectorization'
|
|
396
|
+
| 'video2img'
|
|
397
|
+
| 'video2video';
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* How angular is the surface? 0 is like a sphere, 1 is like a mechanical object
|
|
401
|
+
*/
|
|
402
|
+
angular?: number;
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* The optional aspect ratio given for the generation, only applicable for some
|
|
406
|
+
* models
|
|
407
|
+
*/
|
|
408
|
+
aspectRatio?: string;
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Int to set between 0 and 255 for the opacity of the background in the result
|
|
412
|
+
* images.
|
|
413
|
+
*/
|
|
414
|
+
backgroundOpacity?: number;
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* The baseModelId that maybe changed at inference time
|
|
418
|
+
*/
|
|
419
|
+
baseModelId?: string;
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* A bounding box around the object of interest, in the format [x1, y1, x2, y2].
|
|
423
|
+
*/
|
|
424
|
+
bbox?: Array<unknown>;
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* Remove small dark spots (i.e. “pepper”) and connect small bright cracks.
|
|
428
|
+
*/
|
|
429
|
+
betterQuality?: boolean;
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* The control image already processed by canny detector. Must reference an
|
|
433
|
+
* existing AssetId.
|
|
434
|
+
*/
|
|
435
|
+
cannyStructureImage?: string;
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* Activate clustering.
|
|
439
|
+
*/
|
|
440
|
+
clustering?: boolean;
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* Ensure upscaled tile have the same color histogram as original tile.
|
|
444
|
+
*/
|
|
445
|
+
colorCorrection?: boolean;
|
|
446
|
+
|
|
447
|
+
colorMode?: string;
|
|
448
|
+
|
|
449
|
+
colorPrecision?: number;
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* Flux Kontext LoRA to style the image. For Flux Kontext Prompt Editing.
|
|
453
|
+
*/
|
|
454
|
+
concepts?: Array<Metadata.Concept>;
|
|
455
|
+
|
|
456
|
+
contours?: Array<Array<Array<Array<number>>>>;
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* End step for control.
|
|
460
|
+
*/
|
|
461
|
+
controlEnd?: number;
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* The date when the asset was copied to a project
|
|
465
|
+
*/
|
|
466
|
+
copiedAt?: string;
|
|
467
|
+
|
|
468
|
+
cornerThreshold?: number;
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* Allow the generation of "hallucinations" during the upscale process, which adds
|
|
472
|
+
* additional details and deviates from the original image. Default: optimized for
|
|
473
|
+
* your preset and style.
|
|
474
|
+
*/
|
|
475
|
+
creativity?: number;
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Amount of decay in creativity over the upscale process. The lowest the value,
|
|
479
|
+
* the less the creativity will be preserved over the upscale process.
|
|
480
|
+
*/
|
|
481
|
+
creativityDecay?: number;
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* If true, use the default parameters
|
|
485
|
+
*/
|
|
486
|
+
defaultParameters?: boolean;
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* The depth fidelity if a depth image provided
|
|
490
|
+
*/
|
|
491
|
+
depthFidelity?: number;
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* The control image processed by depth estimator. Must reference an existing
|
|
495
|
+
* AssetId.
|
|
496
|
+
*/
|
|
497
|
+
depthImage?: string;
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Amount of details to remove or add
|
|
501
|
+
*/
|
|
502
|
+
detailsLevel?: number;
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* The number of pixels to dilate the result masks.
|
|
506
|
+
*/
|
|
507
|
+
dilate?: number;
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* Contrast factor for Grayscale detector
|
|
511
|
+
*/
|
|
512
|
+
factor?: number;
|
|
513
|
+
|
|
514
|
+
filterSpeckle?: number;
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* Determine the scale at which the upscale process works.
|
|
518
|
+
*
|
|
519
|
+
* - With a small value, the upscale works at the largest scale, resulting in fewer
|
|
520
|
+
* added details and more coherent images. Ideal for portraits, for example.
|
|
521
|
+
* - With a large value, the upscale works at the smallest scale, resulting in more
|
|
522
|
+
* added details and more hallucinations. Ideal for landscapes, for example.
|
|
523
|
+
*
|
|
524
|
+
* (info): A small value is slower and more expensive to run.
|
|
525
|
+
*/
|
|
526
|
+
fractality?: number;
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* Apply extra control to the Skybox 360 geometry. The higher the value, the more
|
|
530
|
+
* the 360 geometry will influence the generated skybox image.
|
|
531
|
+
*
|
|
532
|
+
* Use with caution. Default is adapted to the other parameters.
|
|
533
|
+
*/
|
|
534
|
+
geometryEnforcement?: number;
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* The guidance used to generate this asset
|
|
538
|
+
*/
|
|
539
|
+
guidance?: number;
|
|
540
|
+
|
|
541
|
+
halfMode?: boolean;
|
|
542
|
+
|
|
543
|
+
hdr?: number;
|
|
544
|
+
|
|
545
|
+
height?: number;
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* High threshold for Canny detector
|
|
549
|
+
*/
|
|
550
|
+
highThreshold?: number;
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* (deprecated) Horizontal expansion ratio.
|
|
554
|
+
*/
|
|
555
|
+
horizontalExpansionRatio?: number;
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* The input image to process. Must reference an existing AssetId or be a data URL.
|
|
559
|
+
*/
|
|
560
|
+
image?: string;
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* Strengthen the similarity to the original image during the upscale. Default:
|
|
564
|
+
* optimized for your preset and style.
|
|
565
|
+
*/
|
|
566
|
+
imageFidelity?: number;
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* Preserve the seamless properties of skybox or texture images. Input has to be of
|
|
570
|
+
* same type (seamless).
|
|
571
|
+
*/
|
|
572
|
+
imageType?: 'seamfull' | 'skybox' | 'texture';
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* The id of the Inference describing how this image was generated
|
|
576
|
+
*/
|
|
577
|
+
inferenceId?: string;
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* When set to `high`, allows to better preserve details from the input images in
|
|
581
|
+
* the output. This is especially useful when using images that contain elements
|
|
582
|
+
* like faces or logos that require accurate preservation in the generated image.
|
|
583
|
+
*
|
|
584
|
+
* You can provide multiple input images that will all be preserved with high
|
|
585
|
+
* fidelity, but keep in mind that the first image will be preserved with richer
|
|
586
|
+
* textures and finer details, so if you include elements such as faces, consider
|
|
587
|
+
* placing them in the first image.
|
|
588
|
+
*
|
|
589
|
+
* Only available for the `gpt-image-1` model.
|
|
590
|
+
*/
|
|
591
|
+
inputFidelity?: 'high' | 'low';
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* Location of the input image in the output.
|
|
595
|
+
*/
|
|
596
|
+
inputLocation?: 'bottom' | 'left' | 'middle' | 'right' | 'top';
|
|
597
|
+
|
|
598
|
+
/**
|
|
599
|
+
* To invert the relief
|
|
600
|
+
*/
|
|
601
|
+
invert?: boolean;
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* How polished is the surface? 0 is like a rough surface, 1 is like a mirror
|
|
605
|
+
*/
|
|
606
|
+
keypointThreshold?: number;
|
|
607
|
+
|
|
608
|
+
layerDifference?: number;
|
|
609
|
+
|
|
610
|
+
lengthThreshold?: number;
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* The ISO timestamp when the lock on the canvas will expire
|
|
614
|
+
*/
|
|
615
|
+
lockExpiresAt?: string;
|
|
616
|
+
|
|
617
|
+
/**
|
|
618
|
+
* Low threshold for Canny detector
|
|
619
|
+
*/
|
|
620
|
+
lowThreshold?: number;
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* The mask used for the asset generation or editing
|
|
624
|
+
*/
|
|
625
|
+
mask?: string;
|
|
626
|
+
|
|
627
|
+
maxIterations?: number;
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* Maximum threshold for Grayscale conversion
|
|
631
|
+
*/
|
|
632
|
+
maxThreshold?: number;
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* Minimum threshold for Grayscale conversion
|
|
636
|
+
*/
|
|
637
|
+
minThreshold?: number;
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
* Modality to detect
|
|
641
|
+
*/
|
|
642
|
+
modality?:
|
|
643
|
+
| 'canny'
|
|
644
|
+
| 'depth'
|
|
645
|
+
| 'grayscale'
|
|
646
|
+
| 'lineart_anime'
|
|
647
|
+
| 'mlsd'
|
|
648
|
+
| 'normal'
|
|
649
|
+
| 'pose'
|
|
650
|
+
| 'scribble'
|
|
651
|
+
| 'segmentation'
|
|
652
|
+
| 'sketch';
|
|
653
|
+
|
|
654
|
+
mode?: string;
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
* The modelId used to generate this asset
|
|
658
|
+
*/
|
|
659
|
+
modelId?: string;
|
|
660
|
+
|
|
661
|
+
/**
|
|
662
|
+
* The type of the generator used
|
|
663
|
+
*/
|
|
664
|
+
modelType?:
|
|
665
|
+
| 'custom'
|
|
666
|
+
| 'flux.1'
|
|
667
|
+
| 'flux.1-composition'
|
|
668
|
+
| 'flux.1-kontext-dev'
|
|
669
|
+
| 'flux.1-kontext-lora'
|
|
670
|
+
| 'flux.1-krea-dev'
|
|
671
|
+
| 'flux.1-krea-lora'
|
|
672
|
+
| 'flux.1-lora'
|
|
673
|
+
| 'flux.1-pro'
|
|
674
|
+
| 'flux.1.1-pro-ultra'
|
|
675
|
+
| 'flux1.1-pro'
|
|
676
|
+
| 'gpt-image-1'
|
|
677
|
+
| 'sd-1_5'
|
|
678
|
+
| 'sd-1_5-composition'
|
|
679
|
+
| 'sd-1_5-lora'
|
|
680
|
+
| 'sd-xl'
|
|
681
|
+
| 'sd-xl-composition'
|
|
682
|
+
| 'sd-xl-lora';
|
|
683
|
+
|
|
684
|
+
name?: string;
|
|
685
|
+
|
|
686
|
+
nbMasks?: number;
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* The negative prompt used to generate this asset
|
|
690
|
+
*/
|
|
691
|
+
negativePrompt?: string;
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* Controls the influence of the negative prompt. Default 0 means the negative
|
|
695
|
+
* prompt has no effect. Higher values increase negative prompt influence. Must
|
|
696
|
+
* be > 0 if negativePrompt is provided.
|
|
697
|
+
*/
|
|
698
|
+
negativePromptStrength?: number;
|
|
699
|
+
|
|
700
|
+
/**
|
|
701
|
+
* The number of denoising steps for each image generation.
|
|
702
|
+
*/
|
|
703
|
+
numInferenceSteps?: number;
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* The number of outputs to generate.
|
|
707
|
+
*/
|
|
708
|
+
numOutputs?: number;
|
|
709
|
+
|
|
710
|
+
originalAssetId?: string;
|
|
711
|
+
|
|
712
|
+
outputIndex?: number;
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* Overlap percentage for the output image.
|
|
716
|
+
*/
|
|
717
|
+
overlapPercentage?: number;
|
|
718
|
+
|
|
719
|
+
/**
|
|
720
|
+
* Override the embeddings of the model. Only your prompt and negativePrompt will
|
|
721
|
+
* be used. Use with caution.
|
|
722
|
+
*/
|
|
723
|
+
overrideEmbeddings?: boolean;
|
|
724
|
+
|
|
725
|
+
parentId?: string;
|
|
726
|
+
|
|
727
|
+
parentJobId?: string;
|
|
728
|
+
|
|
729
|
+
pathPrecision?: number;
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
* List of points (label, x, y) in the image where label = 0 for background and 1
|
|
733
|
+
* for object.
|
|
734
|
+
*/
|
|
735
|
+
points?: Array<Array<unknown>>;
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* How polished is the surface? 0 is like a rough surface, 1 is like a mirror
|
|
739
|
+
*/
|
|
740
|
+
polished?: number;
|
|
741
|
+
|
|
742
|
+
preset?: string;
|
|
743
|
+
|
|
744
|
+
progressPercent?: number;
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* The prompt that guided the asset generation or editing
|
|
748
|
+
*/
|
|
749
|
+
prompt?: string;
|
|
750
|
+
|
|
751
|
+
/**
|
|
752
|
+
* Increase the fidelity to the prompt during upscale. Default: optimized for your
|
|
753
|
+
* preset and style.
|
|
754
|
+
*/
|
|
755
|
+
promptFidelity?: number;
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* How raised is the surface? 0 is flat like water, 1 is like a very rough rock
|
|
759
|
+
*/
|
|
760
|
+
raised?: number;
|
|
761
|
+
|
|
762
|
+
/**
|
|
763
|
+
* The reference images used for the asset generation or editing
|
|
764
|
+
*/
|
|
765
|
+
referenceImages?: Array<string>;
|
|
766
|
+
|
|
767
|
+
/**
|
|
768
|
+
* Additional refinement steps before scaling.
|
|
769
|
+
*
|
|
770
|
+
* If scalingFactor == 1, the refinement process will be applied (1 +
|
|
771
|
+
* refinementSteps) times. If scalingFactor > 1, the refinement process will be
|
|
772
|
+
* applied refinementSteps times.
|
|
773
|
+
*/
|
|
774
|
+
refinementSteps?: number;
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* Remove background for Grayscale detector
|
|
778
|
+
*/
|
|
779
|
+
removeBackground?: boolean;
|
|
780
|
+
|
|
781
|
+
/**
|
|
782
|
+
* Size proportion of the input image in the output.
|
|
783
|
+
*/
|
|
784
|
+
resizeOption?: number;
|
|
785
|
+
|
|
786
|
+
/**
|
|
787
|
+
* Boolean to output the contours.
|
|
788
|
+
*/
|
|
789
|
+
resultContours?: boolean;
|
|
790
|
+
|
|
791
|
+
/**
|
|
792
|
+
* Boolean to able output the cut out object.
|
|
793
|
+
*/
|
|
794
|
+
resultImage?: boolean;
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* Boolean to able return the masks (binary image) in the response.
|
|
798
|
+
*/
|
|
799
|
+
resultMask?: boolean;
|
|
800
|
+
|
|
801
|
+
rootParentId?: string;
|
|
802
|
+
|
|
803
|
+
/**
|
|
804
|
+
* Save a flipbook of the texture. Deactivated when the input texture is larger
|
|
805
|
+
* than 2048x2048px
|
|
806
|
+
*/
|
|
807
|
+
saveFlipbook?: boolean;
|
|
808
|
+
|
|
809
|
+
/**
|
|
810
|
+
* Scaling factor (when `targetWidth` not specified)
|
|
811
|
+
*/
|
|
812
|
+
scalingFactor?: number;
|
|
813
|
+
|
|
814
|
+
/**
|
|
815
|
+
* The scheduler used to generate this asset
|
|
816
|
+
*/
|
|
817
|
+
scheduler?: string;
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* The seed used to generate this asset
|
|
821
|
+
*/
|
|
822
|
+
seed?: string;
|
|
823
|
+
|
|
824
|
+
/**
|
|
825
|
+
* Sharpen tiles.
|
|
826
|
+
*/
|
|
827
|
+
sharpen?: boolean;
|
|
828
|
+
|
|
829
|
+
/**
|
|
830
|
+
* How shiny is the surface? 0 is like a matte surface, 1 is like a diamond
|
|
831
|
+
*/
|
|
832
|
+
shiny?: number;
|
|
833
|
+
|
|
834
|
+
size?: number;
|
|
835
|
+
|
|
836
|
+
/**
|
|
837
|
+
* Activate sketch detection instead of canny.
|
|
838
|
+
*/
|
|
839
|
+
sketch?: boolean;
|
|
840
|
+
|
|
841
|
+
sourceProjectId?: string;
|
|
842
|
+
|
|
843
|
+
spliceThreshold?: number;
|
|
844
|
+
|
|
845
|
+
/**
|
|
846
|
+
* The strength
|
|
847
|
+
*
|
|
848
|
+
* Only available for the `flux-kontext` LoRA model.
|
|
849
|
+
*/
|
|
850
|
+
strength?: number;
|
|
851
|
+
|
|
852
|
+
/**
|
|
853
|
+
* Strength for the input image structure preservation
|
|
854
|
+
*/
|
|
855
|
+
structureFidelity?: number;
|
|
856
|
+
|
|
857
|
+
/**
|
|
858
|
+
* The control image for structure. A canny detector will be applied to this image.
|
|
859
|
+
* Must reference an existing AssetId.
|
|
860
|
+
*/
|
|
861
|
+
structureImage?: string;
|
|
862
|
+
|
|
863
|
+
style?:
|
|
864
|
+
| '3d-cartoon'
|
|
865
|
+
| '3d-rendered'
|
|
866
|
+
| 'anime'
|
|
867
|
+
| 'cartoon'
|
|
868
|
+
| 'cinematic'
|
|
869
|
+
| 'claymation'
|
|
870
|
+
| 'cloud-skydome'
|
|
871
|
+
| 'comic'
|
|
872
|
+
| 'cyberpunk'
|
|
873
|
+
| 'enchanted'
|
|
874
|
+
| 'fantasy'
|
|
875
|
+
| 'ink'
|
|
876
|
+
| 'manga'
|
|
877
|
+
| 'manga-color'
|
|
878
|
+
| 'minimalist'
|
|
879
|
+
| 'neon-tron'
|
|
880
|
+
| 'oil-painting'
|
|
881
|
+
| 'pastel'
|
|
882
|
+
| 'photo'
|
|
883
|
+
| 'photography'
|
|
884
|
+
| 'psychedelic'
|
|
885
|
+
| 'retro-fantasy'
|
|
886
|
+
| 'scifi-concept-art'
|
|
887
|
+
| 'space'
|
|
888
|
+
| 'standard'
|
|
889
|
+
| 'whimsical';
|
|
890
|
+
|
|
891
|
+
/**
|
|
892
|
+
* The higher the value the more it will look like the style image(s)
|
|
893
|
+
*/
|
|
894
|
+
styleFidelity?: number;
|
|
895
|
+
|
|
896
|
+
/**
|
|
897
|
+
* List of style images. Most of the time, only one image is enough. It must be
|
|
898
|
+
* existing AssetIds.
|
|
899
|
+
*/
|
|
900
|
+
styleImages?: Array<string>;
|
|
901
|
+
|
|
902
|
+
/**
|
|
903
|
+
* Condition the influence of the style image(s). The higher the value, the more
|
|
904
|
+
* the style images will influence the upscaled image.
|
|
905
|
+
*/
|
|
906
|
+
styleImagesFidelity?: number;
|
|
907
|
+
|
|
908
|
+
/**
|
|
909
|
+
* The target height of the output image.
|
|
910
|
+
*/
|
|
911
|
+
targetHeight?: number;
|
|
912
|
+
|
|
913
|
+
/**
|
|
914
|
+
* Target width for the upscaled image, take priority over scaling factor
|
|
915
|
+
*/
|
|
916
|
+
targetWidth?: number;
|
|
917
|
+
|
|
918
|
+
/**
|
|
919
|
+
* A textual description / keywords describing the object of interest.
|
|
920
|
+
*/
|
|
921
|
+
text?: string;
|
|
922
|
+
|
|
923
|
+
/**
|
|
924
|
+
* The asset to convert in texture maps. Must reference an existing AssetId.
|
|
925
|
+
*/
|
|
926
|
+
texture?: string;
|
|
927
|
+
|
|
928
|
+
/**
|
|
929
|
+
* The thumbnail of the canvas
|
|
930
|
+
*/
|
|
931
|
+
thumbnail?: Metadata.Thumbnail;
|
|
932
|
+
|
|
933
|
+
/**
|
|
934
|
+
* If set to true, during the upscaling process, the model will match tiles of the
|
|
935
|
+
* source image with tiles of the style image(s). This will result in a more
|
|
936
|
+
* coherent restyle. Works best with style images that have a similar composition.
|
|
937
|
+
*/
|
|
938
|
+
tileStyle?: boolean;
|
|
939
|
+
|
|
940
|
+
trainingImage?: boolean;
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* (deprecated) Vertical expansion ratio.
|
|
944
|
+
*/
|
|
945
|
+
verticalExpansionRatio?: number;
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* The width of the rendered image.
|
|
949
|
+
*/
|
|
950
|
+
width?: number;
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
export namespace Metadata {
|
|
954
|
+
export interface Concept {
|
|
955
|
+
/**
|
|
956
|
+
* The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w")
|
|
957
|
+
*/
|
|
958
|
+
modelId: string;
|
|
959
|
+
|
|
960
|
+
/**
|
|
961
|
+
* The scale of the model (example: 1.0) For Flux Kontext Prompt Editing, the scale
|
|
962
|
+
* is between 0 and 2.
|
|
963
|
+
*/
|
|
964
|
+
scale: number;
|
|
965
|
+
|
|
966
|
+
/**
|
|
967
|
+
* The epoch of the model (example: "000001") Only available for Flux Lora Trained
|
|
968
|
+
* models
|
|
969
|
+
*/
|
|
970
|
+
modelEpoch?: string;
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
/**
|
|
974
|
+
* The thumbnail of the canvas
|
|
975
|
+
*/
|
|
976
|
+
export interface Thumbnail {
|
|
977
|
+
/**
|
|
978
|
+
* The AssetId of the image used as a thumbnail for the canvas (example:
|
|
979
|
+
* "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
980
|
+
*/
|
|
981
|
+
assetId: string;
|
|
982
|
+
|
|
983
|
+
/**
|
|
984
|
+
* The url of the image used as a thumbnail for the canvas
|
|
985
|
+
*/
|
|
986
|
+
url: string;
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
/**
|
|
991
|
+
* The properties of the asset, content may depend on the kind of asset returned
|
|
992
|
+
*/
|
|
993
|
+
export interface Properties {
|
|
994
|
+
size: number;
|
|
995
|
+
|
|
996
|
+
/**
|
|
997
|
+
* Number of animation frames if animations exist
|
|
998
|
+
*/
|
|
999
|
+
animationFrameCount?: number;
|
|
1000
|
+
|
|
1001
|
+
/**
|
|
1002
|
+
* Bitrate of the media in bits per second
|
|
1003
|
+
*/
|
|
1004
|
+
bitrate?: number;
|
|
1005
|
+
|
|
1006
|
+
/**
|
|
1007
|
+
* Number of bones if skeleton exists
|
|
1008
|
+
*/
|
|
1009
|
+
boneCount?: number;
|
|
1010
|
+
|
|
1011
|
+
/**
|
|
1012
|
+
* Number of channels of the audio
|
|
1013
|
+
*/
|
|
1014
|
+
channels?: number;
|
|
1015
|
+
|
|
1016
|
+
/**
|
|
1017
|
+
* Classification of the audio
|
|
1018
|
+
*/
|
|
1019
|
+
classification?: 'effect' | 'interview' | 'music' | 'other' | 'sound' | 'speech' | 'text' | 'unknown';
|
|
1020
|
+
|
|
1021
|
+
/**
|
|
1022
|
+
* Codec name of the media
|
|
1023
|
+
*/
|
|
1024
|
+
codecName?: string;
|
|
1025
|
+
|
|
1026
|
+
/**
|
|
1027
|
+
* Description of the audio
|
|
1028
|
+
*/
|
|
1029
|
+
description?: string;
|
|
1030
|
+
|
|
1031
|
+
/**
|
|
1032
|
+
* Bounding box dimensions [width, height, depth]
|
|
1033
|
+
*/
|
|
1034
|
+
dimensions?: Array<unknown>;
|
|
1035
|
+
|
|
1036
|
+
/**
|
|
1037
|
+
* Duration of the media in seconds
|
|
1038
|
+
*/
|
|
1039
|
+
duration?: number;
|
|
1040
|
+
|
|
1041
|
+
/**
|
|
1042
|
+
* Number of faces/triangles in the mesh
|
|
1043
|
+
*/
|
|
1044
|
+
faceCount?: number;
|
|
1045
|
+
|
|
1046
|
+
/**
|
|
1047
|
+
* Format of the mesh file (e.g. 'glb', etc.)
|
|
1048
|
+
*/
|
|
1049
|
+
format?: string;
|
|
1050
|
+
|
|
1051
|
+
/**
|
|
1052
|
+
* Frame rate of the video in frames per second
|
|
1053
|
+
*/
|
|
1054
|
+
frameRate?: number;
|
|
1055
|
+
|
|
1056
|
+
/**
|
|
1057
|
+
* Whether the mesh has animations
|
|
1058
|
+
*/
|
|
1059
|
+
hasAnimations?: boolean;
|
|
1060
|
+
|
|
1061
|
+
/**
|
|
1062
|
+
* Whether the mesh has normal vectors
|
|
1063
|
+
*/
|
|
1064
|
+
hasNormals?: boolean;
|
|
1065
|
+
|
|
1066
|
+
/**
|
|
1067
|
+
* Whether the mesh has bones/skeleton
|
|
1068
|
+
*/
|
|
1069
|
+
hasSkeleton?: boolean;
|
|
1070
|
+
|
|
1071
|
+
/**
|
|
1072
|
+
* Whether the mesh has UV coordinates
|
|
1073
|
+
*/
|
|
1074
|
+
hasUVs?: boolean;
|
|
1075
|
+
|
|
1076
|
+
height?: number;
|
|
1077
|
+
|
|
1078
|
+
/**
|
|
1079
|
+
* Number of frames in the video
|
|
1080
|
+
*/
|
|
1081
|
+
nbFrames?: number;
|
|
1082
|
+
|
|
1083
|
+
/**
|
|
1084
|
+
* Sample rate of the media in Hz
|
|
1085
|
+
*/
|
|
1086
|
+
sampleRate?: number;
|
|
1087
|
+
|
|
1088
|
+
/**
|
|
1089
|
+
* Transcription of the audio
|
|
1090
|
+
*/
|
|
1091
|
+
transcription?: Properties.Transcription;
|
|
1092
|
+
|
|
1093
|
+
/**
|
|
1094
|
+
* Number of vertices in the mesh
|
|
1095
|
+
*/
|
|
1096
|
+
vertexCount?: number;
|
|
1097
|
+
|
|
1098
|
+
width?: number;
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
export namespace Properties {
|
|
1102
|
+
/**
|
|
1103
|
+
* Transcription of the audio
|
|
1104
|
+
*/
|
|
1105
|
+
export interface Transcription {
|
|
1106
|
+
text: string;
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
/**
|
|
1111
|
+
* The video asset's first frame.
|
|
1112
|
+
*
|
|
1113
|
+
* Contains the assetId and the url of the first frame.
|
|
1114
|
+
*/
|
|
1115
|
+
export interface FirstFrame {
|
|
1116
|
+
assetId: string;
|
|
1117
|
+
|
|
1118
|
+
url: string;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
/**
|
|
1122
|
+
* The video asset's last frame.
|
|
1123
|
+
*
|
|
1124
|
+
* Contains the assetId and the url of the last frame.
|
|
1125
|
+
*/
|
|
1126
|
+
export interface LastFrame {
|
|
1127
|
+
assetId: string;
|
|
1128
|
+
|
|
1129
|
+
url: string;
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
/**
|
|
1133
|
+
* The asset's preview.
|
|
1134
|
+
*
|
|
1135
|
+
* Contains the assetId and the url of the preview.
|
|
1136
|
+
*/
|
|
1137
|
+
export interface Preview {
|
|
1138
|
+
assetId: string;
|
|
1139
|
+
|
|
1140
|
+
url: string;
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* The asset's thumbnail.
|
|
1145
|
+
*
|
|
1146
|
+
* Contains the assetId and the url of the thumbnail.
|
|
1147
|
+
*/
|
|
1148
|
+
export interface Thumbnail {
|
|
1149
|
+
assetId: string;
|
|
1150
|
+
|
|
1151
|
+
url: string;
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
/**
|
|
1156
|
+
* The inference parameters used to generate the asset
|
|
1157
|
+
*/
|
|
1158
|
+
export interface InferenceParameters {
|
|
1159
|
+
/**
|
|
1160
|
+
* Full text prompt including the model placeholder. (example: "an illustration of
|
|
1161
|
+
* phoenix in a fantasy world, flying over a mountain, 8k, bokeh effect")
|
|
1162
|
+
*/
|
|
1163
|
+
prompt: string;
|
|
1164
|
+
|
|
1165
|
+
/**
|
|
1166
|
+
* The type of inference to use. Example: txt2img, img2img, etc.
|
|
1167
|
+
*
|
|
1168
|
+
* Selecting the right type will condition the expected parameters.
|
|
1169
|
+
*
|
|
1170
|
+
* Note: if model.type is `sd-xl*` or `sd-1_5*`, when using the `"inpaint"`
|
|
1171
|
+
* inference type, Scenario determines the best available `baseModel` for a given
|
|
1172
|
+
* `modelId`: one of `["stable-diffusion-inpainting",
|
|
1173
|
+
* "stable-diffusion-xl-1.0-inpainting-0.1"] will be used.
|
|
1174
|
+
*/
|
|
1175
|
+
type:
|
|
1176
|
+
| 'controlnet'
|
|
1177
|
+
| 'controlnet_img2img'
|
|
1178
|
+
| 'controlnet_inpaint'
|
|
1179
|
+
| 'controlnet_inpaint_ip_adapter'
|
|
1180
|
+
| 'controlnet_ip_adapter'
|
|
1181
|
+
| 'controlnet_reference'
|
|
1182
|
+
| 'controlnet_texture'
|
|
1183
|
+
| 'img2img'
|
|
1184
|
+
| 'img2img_ip_adapter'
|
|
1185
|
+
| 'img2img_texture'
|
|
1186
|
+
| 'inpaint'
|
|
1187
|
+
| 'inpaint_ip_adapter'
|
|
1188
|
+
| 'outpaint'
|
|
1189
|
+
| 'reference'
|
|
1190
|
+
| 'reference_texture'
|
|
1191
|
+
| 'txt2img'
|
|
1192
|
+
| 'txt2img_ip_adapter'
|
|
1193
|
+
| 'txt2img_texture';
|
|
1194
|
+
|
|
1195
|
+
/**
|
|
1196
|
+
* The aspect ratio of the generated images. Only used for the model
|
|
1197
|
+
* flux.1.1-pro-ultra. The aspect ratio is a string formatted as "width:height"
|
|
1198
|
+
* (example: "16:9").
|
|
1199
|
+
*/
|
|
1200
|
+
aspectRatio?: '16:9' | '1:1' | '21:9' | '2:3' | '3:2' | '3:4' | '4:3' | '4:5' | '5:4' | '9:16' | '9:21';
|
|
1201
|
+
|
|
1202
|
+
/**
|
|
1203
|
+
* The base model to use for the inference. Only Flux LoRA models can use this
|
|
1204
|
+
* parameter. Allowed values are available in the model's attribute:
|
|
1205
|
+
* `compliantModelIds`
|
|
1206
|
+
*/
|
|
1207
|
+
baseModelId?: string;
|
|
1208
|
+
|
|
1209
|
+
concepts?: Array<InferenceParameters.Concept>;
|
|
1210
|
+
|
|
1211
|
+
/**
|
|
1212
|
+
* Specifies how long the ControlNet guidance should be applied during the
|
|
1213
|
+
* inference process.
|
|
1214
|
+
*
|
|
1215
|
+
* Only available for Flux.1-dev based models.
|
|
1216
|
+
*
|
|
1217
|
+
* The value represents the percentage of total inference steps where the
|
|
1218
|
+
* ControlNet guidance is active. For example:
|
|
1219
|
+
*
|
|
1220
|
+
* - 1.0: ControlNet guidance is applied during all inference steps
|
|
1221
|
+
* - 0.5: ControlNet guidance is only applied during the first half of inference
|
|
1222
|
+
* steps
|
|
1223
|
+
*
|
|
1224
|
+
* Default values:
|
|
1225
|
+
*
|
|
1226
|
+
* - 0.5 for Canny modality
|
|
1227
|
+
* - 0.6 for all other modalities
|
|
1228
|
+
*/
|
|
1229
|
+
controlEnd?: number;
|
|
1230
|
+
|
|
1231
|
+
/**
|
|
1232
|
+
* Signed URL to display the controlnet input image
|
|
1233
|
+
*/
|
|
1234
|
+
controlImage?: string;
|
|
1235
|
+
|
|
1236
|
+
/**
|
|
1237
|
+
* Asset id of the controlnet input image
|
|
1238
|
+
*/
|
|
1239
|
+
controlImageId?: string;
|
|
1240
|
+
|
|
1241
|
+
/**
|
|
1242
|
+
* Specifies the starting point of the ControlNet guidance during the inference
|
|
1243
|
+
* process.
|
|
1244
|
+
*
|
|
1245
|
+
* Only available for Flux.1-dev based models.
|
|
1246
|
+
*
|
|
1247
|
+
* The value represents the percentage of total inference steps where the
|
|
1248
|
+
* ControlNet guidance starts. For example:
|
|
1249
|
+
*
|
|
1250
|
+
* - 0.0: ControlNet guidance starts at the beginning of the inference steps
|
|
1251
|
+
* - 0.5: ControlNet guidance starts at the middle of the inference steps
|
|
1252
|
+
*/
|
|
1253
|
+
controlStart?: number;
|
|
1254
|
+
|
|
1255
|
+
/**
|
|
1256
|
+
* If set to true, the entire input image will likely change during inpainting.
|
|
1257
|
+
* This results in faster inferences, but the output image will be harder to
|
|
1258
|
+
* integrate if the input is just a small part of a larger image.
|
|
1259
|
+
*/
|
|
1260
|
+
disableMerging?: boolean;
|
|
1261
|
+
|
|
1262
|
+
/**
|
|
1263
|
+
* If false, the process uses the given image to detect the modality. If true
|
|
1264
|
+
* (default), the process will not try to detect the modality of the given image.
|
|
1265
|
+
*
|
|
1266
|
+
* For example: with `pose` modality and `false` value, the process will detect the
|
|
1267
|
+
* pose of people in the given image with `depth` modality and `false` value, the
|
|
1268
|
+
* process will detect the depth of the given image with `scribble` modality and
|
|
1269
|
+
* `true`value, the process will use the given image as a scribble
|
|
1270
|
+
*
|
|
1271
|
+
* ⚠️ For models of the FLUX schnell or dev families, this parameter is ignored.
|
|
1272
|
+
* The modality detection is always disabled. ⚠️
|
|
1273
|
+
*/
|
|
1274
|
+
disableModalityDetection?: boolean;
|
|
1275
|
+
|
|
1276
|
+
/**
|
|
1277
|
+
* Controls how closely the generated image follows the prompt. Higher values
|
|
1278
|
+
* result in stronger adherence to the prompt. Default and allowed values depend on
|
|
1279
|
+
* the model type:
|
|
1280
|
+
*
|
|
1281
|
+
* - For Flux dev models, the default is 3.5 and allowed values are within [0, 10]
|
|
1282
|
+
* - For Flux pro models, the default is 3 and allowed values are within [2, 5]
|
|
1283
|
+
* - For SDXL models, the default is 6 and allowed values are within [0, 20]
|
|
1284
|
+
* - For SD1.5 models, the default is 7.5 and allowed values are within [0, 20]
|
|
1285
|
+
*/
|
|
1286
|
+
guidance?: number;
|
|
1287
|
+
|
|
1288
|
+
/**
|
|
1289
|
+
* The height of the generated images, must be a 8 multiple (within [64, 2048],
|
|
1290
|
+
* default: 512) If model.type is `sd-xl`, `sd-xl-lora`, `sd-xl-composition` the
|
|
1291
|
+
* height must be within [512, 2048] If model.type is `sd-1_5`, the height must be
|
|
1292
|
+
* within [64, 1024] If model.type is `flux.1.1-pro-ultra`, you can use the
|
|
1293
|
+
* aspectRatio parameter instead
|
|
1294
|
+
*/
|
|
1295
|
+
height?: number;
|
|
1296
|
+
|
|
1297
|
+
/**
|
|
1298
|
+
* If set, generated assets will be hidden and not returned in the list of images
|
|
1299
|
+
* of the inference or when listing assets (default: false)
|
|
1300
|
+
*/
|
|
1301
|
+
hideResults?: boolean;
|
|
1302
|
+
|
|
1303
|
+
/**
|
|
1304
|
+
* Signed URL to display the input image
|
|
1305
|
+
*/
|
|
1306
|
+
image?: string;
|
|
1307
|
+
|
|
1308
|
+
/**
|
|
1309
|
+
* Asset id of the input image
|
|
1310
|
+
*/
|
|
1311
|
+
imageId?: string;
|
|
1312
|
+
|
|
1313
|
+
/**
|
|
1314
|
+
* Enable or disable the intermediate images generation (default: false)
|
|
1315
|
+
*/
|
|
1316
|
+
intermediateImages?: boolean;
|
|
1317
|
+
|
|
1318
|
+
/**
|
|
1319
|
+
* Signed URL to display the IpAdapter image
|
|
1320
|
+
*/
|
|
1321
|
+
ipAdapterImage?: string;
|
|
1322
|
+
|
|
1323
|
+
/**
|
|
1324
|
+
* Asset id of the input IpAdapter image
|
|
1325
|
+
*/
|
|
1326
|
+
ipAdapterImageId?: string;
|
|
1327
|
+
|
|
1328
|
+
/**
|
|
1329
|
+
* Asset id of the input IpAdapter images
|
|
1330
|
+
*/
|
|
1331
|
+
ipAdapterImageIds?: Array<string>;
|
|
1332
|
+
|
|
1333
|
+
/**
|
|
1334
|
+
* Signed URL to display the IpAdapter images
|
|
1335
|
+
*/
|
|
1336
|
+
ipAdapterImages?: Array<string>;
|
|
1337
|
+
|
|
1338
|
+
/**
|
|
1339
|
+
* IpAdapter scale factor (within [0.0, 1.0], default: 0.9).
|
|
1340
|
+
*/
|
|
1341
|
+
ipAdapterScale?: number;
|
|
1342
|
+
|
|
1343
|
+
/**
|
|
1344
|
+
* IpAdapter scale factors (within [0.0, 1.0], default: 0.9).
|
|
1345
|
+
*/
|
|
1346
|
+
ipAdapterScales?: Array<number>;
|
|
1347
|
+
|
|
1348
|
+
/**
|
|
1349
|
+
* The type of IP Adapter model to use. Must be one of [`style`, `character`],
|
|
1350
|
+
* default to `style``
|
|
1351
|
+
*/
|
|
1352
|
+
ipAdapterType?: 'character' | 'style';
|
|
1353
|
+
|
|
1354
|
+
/**
|
|
1355
|
+
* Signed URL to display the mask image
|
|
1356
|
+
*/
|
|
1357
|
+
mask?: string;
|
|
1358
|
+
|
|
1359
|
+
/**
|
|
1360
|
+
* Asset id of the mask image
|
|
1361
|
+
*/
|
|
1362
|
+
maskId?: string;
|
|
1363
|
+
|
|
1364
|
+
/**
|
|
1365
|
+
* The modality associated with the control image used for the generation: it can
|
|
1366
|
+
* either be an object with a combination of maximum
|
|
1367
|
+
*
|
|
1368
|
+
* For models of SD1.5 family:
|
|
1369
|
+
*
|
|
1370
|
+
* - up to 3 modalities from `canny`, `pose`, `depth`, `lines`, `seg`, `scribble`,
|
|
1371
|
+
* `lineart`, `normal-map`, `illusion`
|
|
1372
|
+
* - or one of the following presets: `character`, `landscape`, `city`, `interior`.
|
|
1373
|
+
*
|
|
1374
|
+
* For models of the SDXL family:
|
|
1375
|
+
*
|
|
1376
|
+
* - up to 3 modalities from `canny`, `pose`, `depth`, `seg`, `illusion`,
|
|
1377
|
+
* `scribble`
|
|
1378
|
+
* - or one of the following presets: `character`, `landscape`.
|
|
1379
|
+
*
|
|
1380
|
+
* For models of the FLUX schnell or dev families:
|
|
1381
|
+
*
|
|
1382
|
+
* - one modality from: `canny`, `tile`, `depth`, `blur`, `pose`, `gray`,
|
|
1383
|
+
* `low-quality`
|
|
1384
|
+
*
|
|
1385
|
+
* Optionally, you can associate a value to these modalities or presets. The value
|
|
1386
|
+
* must be within `]0.0, 1.0]`.
|
|
1387
|
+
*
|
|
1388
|
+
* Examples:
|
|
1389
|
+
*
|
|
1390
|
+
* - `canny`
|
|
1391
|
+
* - `depth:0.5,pose:1.0`
|
|
1392
|
+
* - `canny:0.5,depth:0.5,lines:0.3`
|
|
1393
|
+
* - `landscape`
|
|
1394
|
+
* - `character:0.5`
|
|
1395
|
+
* - `illusion:1`
|
|
1396
|
+
*
|
|
1397
|
+
* Note: if you use a value that is not supported by the model family, this will
|
|
1398
|
+
* result in an error.
|
|
1399
|
+
*/
|
|
1400
|
+
modality?:
|
|
1401
|
+
| 'blur'
|
|
1402
|
+
| 'canny'
|
|
1403
|
+
| 'depth'
|
|
1404
|
+
| 'gray'
|
|
1405
|
+
| 'illusion'
|
|
1406
|
+
| 'lineart'
|
|
1407
|
+
| 'lines'
|
|
1408
|
+
| 'low-quality'
|
|
1409
|
+
| 'normal-map'
|
|
1410
|
+
| 'pose'
|
|
1411
|
+
| 'scribble'
|
|
1412
|
+
| 'seg'
|
|
1413
|
+
| 'sketch'
|
|
1414
|
+
| 'tile';
|
|
1415
|
+
|
|
1416
|
+
/**
|
|
1417
|
+
* The epoch of the model to use for the inference. Only available for Flux Lora
|
|
1418
|
+
* Trained models.
|
|
1419
|
+
*/
|
|
1420
|
+
modelEpoch?: string;
|
|
1421
|
+
|
|
1422
|
+
/**
|
|
1423
|
+
* The prompt not to guide the image generation, ignored when guidance < 1
|
|
1424
|
+
* (example: "((ugly face))") For Flux based model (not Fast-Flux): requires
|
|
1425
|
+
* negativePromptStrength > 0 and active only for inference types txt2img / img2img
|
|
1426
|
+
* / controlnet.
|
|
1427
|
+
*/
|
|
1428
|
+
negativePrompt?: string;
|
|
1429
|
+
|
|
1430
|
+
/**
|
|
1431
|
+
* Only applicable for flux-dev based models for `txt2img`, `img2img`, and
|
|
1432
|
+
* `controlnet` inference types.
|
|
1433
|
+
*
|
|
1434
|
+
* Controls the influence of the negative prompt. Default 0 means the negative
|
|
1435
|
+
* prompt has no effect. Higher values increase negative prompt influence. Must
|
|
1436
|
+
* be > 0 if negativePrompt is provided.
|
|
1437
|
+
*/
|
|
1438
|
+
negativePromptStrength?: number;
|
|
1439
|
+
|
|
1440
|
+
/**
|
|
1441
|
+
* The number of denoising steps for each image generation (within [1, 150],
|
|
1442
|
+
* default: 30)
|
|
1443
|
+
*/
|
|
1444
|
+
numInferenceSteps?: number;
|
|
1445
|
+
|
|
1446
|
+
/**
|
|
1447
|
+
* The number of images to generate (within [1, 128], default: 4)
|
|
1448
|
+
*/
|
|
1449
|
+
numSamples?: number;
|
|
1450
|
+
|
|
1451
|
+
/**
|
|
1452
|
+
* Whether to use reference adain Only for "reference" inference type
|
|
1453
|
+
*/
|
|
1454
|
+
referenceAdain?: boolean;
|
|
1455
|
+
|
|
1456
|
+
/**
|
|
1457
|
+
* Whether to use reference query for self attention's context Only for "reference"
|
|
1458
|
+
* inference type
|
|
1459
|
+
*/
|
|
1460
|
+
referenceAttn?: boolean;
|
|
1461
|
+
|
|
1462
|
+
/**
|
|
1463
|
+
* The scheduler to use to override the default configured for the model. See
|
|
1464
|
+
* detailed documentation for more details.
|
|
1465
|
+
*/
|
|
1466
|
+
scheduler?:
|
|
1467
|
+
| 'DDIMScheduler'
|
|
1468
|
+
| 'DDPMScheduler'
|
|
1469
|
+
| 'DEISMultistepScheduler'
|
|
1470
|
+
| 'DPMSolverMultistepScheduler'
|
|
1471
|
+
| 'DPMSolverSinglestepScheduler'
|
|
1472
|
+
| 'EulerAncestralDiscreteScheduler'
|
|
1473
|
+
| 'EulerDiscreteScheduler'
|
|
1474
|
+
| 'HeunDiscreteScheduler'
|
|
1475
|
+
| 'KDPM2AncestralDiscreteScheduler'
|
|
1476
|
+
| 'KDPM2DiscreteScheduler'
|
|
1477
|
+
| 'LCMScheduler'
|
|
1478
|
+
| 'LMSDiscreteScheduler'
|
|
1479
|
+
| 'PNDMScheduler'
|
|
1480
|
+
| 'TCDScheduler'
|
|
1481
|
+
| 'UniPCMultistepScheduler';
|
|
1482
|
+
|
|
1483
|
+
/**
|
|
1484
|
+
* Used to reproduce previous results. Default: randomly generated number.
|
|
1485
|
+
*/
|
|
1486
|
+
seed?: string;
|
|
1487
|
+
|
|
1488
|
+
/**
|
|
1489
|
+
* Controls the noise intensity introduced to the input image, where a value of 1.0
|
|
1490
|
+
* completely erases the original image's details. Available for img2img and
|
|
1491
|
+
* inpainting. (within [0.01, 1.0], default: 0.75)
|
|
1492
|
+
*/
|
|
1493
|
+
strength?: number;
|
|
1494
|
+
|
|
1495
|
+
/**
|
|
1496
|
+
* If style_fidelity=1.0, control more important, else if style_fidelity=0.0,
|
|
1497
|
+
* prompt more important, else balanced Only for "reference" inference type
|
|
1498
|
+
*/
|
|
1499
|
+
styleFidelity?: number;
|
|
1500
|
+
|
|
1501
|
+
/**
|
|
1502
|
+
* The width of the generated images, must be a 8 multiple (within [64, 2048],
|
|
1503
|
+
* default: 512) If model.type is `sd-xl`, `sd-xl-lora`, `sd-xl-composition` the
|
|
1504
|
+
* width must be within [512, 2048] If model.type is `sd-1_5`, the width must be
|
|
1505
|
+
* within [64, 1024] If model.type is `flux.1.1-pro-ultra`, you can use the
|
|
1506
|
+
* aspectRatio parameter instead
|
|
1507
|
+
*/
|
|
1508
|
+
width?: number;
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
export namespace InferenceParameters {
|
|
1512
|
+
export interface Concept {
|
|
1513
|
+
/**
|
|
1514
|
+
* The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w")
|
|
1515
|
+
*/
|
|
1516
|
+
modelId: string;
|
|
1517
|
+
|
|
1518
|
+
/**
|
|
1519
|
+
* The scale of the model (example: 1.0) For Flux Kontext Prompt Editing, the scale
|
|
1520
|
+
* is between 0 and 2.
|
|
1521
|
+
*/
|
|
1522
|
+
scale: number;
|
|
1523
|
+
|
|
1524
|
+
/**
|
|
1525
|
+
* The epoch of the model (example: "000001") Only available for Flux Lora Trained
|
|
1526
|
+
* models
|
|
1527
|
+
*/
|
|
1528
|
+
modelEpoch?: string;
|
|
1529
|
+
}
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
/**
|
|
1533
|
+
* The job associated with the asset
|
|
1534
|
+
*/
|
|
1535
|
+
export interface Job {
|
|
1536
|
+
/**
|
|
1537
|
+
* The job creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
|
|
1538
|
+
*/
|
|
1539
|
+
createdAt: string;
|
|
1540
|
+
|
|
1541
|
+
/**
|
|
1542
|
+
* The job ID (example: "job_ocZCnG1Df35XRL1QyCZSRxAG8")
|
|
1543
|
+
*/
|
|
1544
|
+
jobId: string;
|
|
1545
|
+
|
|
1546
|
+
/**
|
|
1547
|
+
* The type of job
|
|
1548
|
+
*/
|
|
1549
|
+
jobType:
|
|
1550
|
+
| 'assets-download'
|
|
1551
|
+
| 'canvas-export'
|
|
1552
|
+
| 'caption'
|
|
1553
|
+
| 'caption-llava'
|
|
1554
|
+
| 'custom'
|
|
1555
|
+
| 'describe-style'
|
|
1556
|
+
| 'detection'
|
|
1557
|
+
| 'embed'
|
|
1558
|
+
| 'flux'
|
|
1559
|
+
| 'flux-model-training'
|
|
1560
|
+
| 'generate-prompt'
|
|
1561
|
+
| 'image-generation'
|
|
1562
|
+
| 'image-prompt-editing'
|
|
1563
|
+
| 'inference'
|
|
1564
|
+
| 'mesh-preview-rendering'
|
|
1565
|
+
| 'model-download'
|
|
1566
|
+
| 'model-import'
|
|
1567
|
+
| 'model-training'
|
|
1568
|
+
| 'openai-image-generation'
|
|
1569
|
+
| 'patch-image'
|
|
1570
|
+
| 'pixelate'
|
|
1571
|
+
| 'reframe'
|
|
1572
|
+
| 'remove-background'
|
|
1573
|
+
| 'repaint'
|
|
1574
|
+
| 'restyle'
|
|
1575
|
+
| 'segment'
|
|
1576
|
+
| 'skybox-3d'
|
|
1577
|
+
| 'skybox-base-360'
|
|
1578
|
+
| 'skybox-hdri'
|
|
1579
|
+
| 'skybox-upscale-360'
|
|
1580
|
+
| 'texture'
|
|
1581
|
+
| 'translate'
|
|
1582
|
+
| 'upload'
|
|
1583
|
+
| 'upscale'
|
|
1584
|
+
| 'upscale-skybox'
|
|
1585
|
+
| 'upscale-texture'
|
|
1586
|
+
| 'vectorize'
|
|
1587
|
+
| 'workflow';
|
|
1588
|
+
|
|
1589
|
+
/**
|
|
1590
|
+
* Metadata of the job with some additional information
|
|
1591
|
+
*/
|
|
1592
|
+
metadata: Job.Metadata;
|
|
1593
|
+
|
|
1594
|
+
/**
|
|
1595
|
+
* Progress of the job (between 0 and 1)
|
|
1596
|
+
*/
|
|
1597
|
+
progress: number;
|
|
1598
|
+
|
|
1599
|
+
/**
|
|
1600
|
+
* The current status of the job
|
|
1601
|
+
*/
|
|
1602
|
+
status:
|
|
1603
|
+
| 'canceled'
|
|
1604
|
+
| 'failure'
|
|
1605
|
+
| 'finalizing'
|
|
1606
|
+
| 'in-progress'
|
|
1607
|
+
| 'pending'
|
|
1608
|
+
| 'queued'
|
|
1609
|
+
| 'success'
|
|
1610
|
+
| 'warming-up';
|
|
1611
|
+
|
|
1612
|
+
/**
|
|
1613
|
+
* The history of the different statuses the job went through with the ISO string
|
|
1614
|
+
* date of when the job reached each statuses.
|
|
1615
|
+
*/
|
|
1616
|
+
statusHistory: Array<Job.StatusHistory>;
|
|
1617
|
+
|
|
1618
|
+
/**
|
|
1619
|
+
* The job last update date as an ISO string (example: "2023-02-03T11:19:41.579Z")
|
|
1620
|
+
*/
|
|
1621
|
+
updatedAt: string;
|
|
1622
|
+
|
|
1623
|
+
/**
|
|
1624
|
+
* The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea")
|
|
1625
|
+
*/
|
|
1626
|
+
authorId?: string;
|
|
1627
|
+
|
|
1628
|
+
/**
|
|
1629
|
+
* The billing of the job
|
|
1630
|
+
*/
|
|
1631
|
+
billing?: Job.Billing;
|
|
1632
|
+
|
|
1633
|
+
/**
|
|
1634
|
+
* The owner ID (example: "team_U3Qmc8PCdWXwAQJ4Dvw4tV6D")
|
|
1635
|
+
*/
|
|
1636
|
+
ownerId?: string;
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
export namespace Job {
|
|
1640
|
+
/**
|
|
1641
|
+
* Metadata of the job with some additional information
|
|
1642
|
+
*/
|
|
1643
|
+
export interface Metadata {
|
|
1644
|
+
/**
|
|
1645
|
+
* List of produced assets for this job
|
|
1646
|
+
*/
|
|
1647
|
+
assetIds?: Array<string>;
|
|
1648
|
+
|
|
1649
|
+
/**
|
|
1650
|
+
* The flow of the job. Only available for workflow jobs.
|
|
1651
|
+
*/
|
|
1652
|
+
flow?: Array<Metadata.Flow>;
|
|
1653
|
+
|
|
1654
|
+
/**
|
|
1655
|
+
* The inputs for the job
|
|
1656
|
+
*/
|
|
1657
|
+
input?: unknown;
|
|
1658
|
+
|
|
1659
|
+
/**
|
|
1660
|
+
* The output of the job
|
|
1661
|
+
*/
|
|
1662
|
+
output?: unknown;
|
|
1663
|
+
|
|
1664
|
+
/**
|
|
1665
|
+
* The workflow ID of the job if job is part of a workflow.
|
|
1666
|
+
*/
|
|
1667
|
+
workflowId?: string;
|
|
1668
|
+
|
|
1669
|
+
/**
|
|
1670
|
+
* The workflow job ID of the job if job is part of a workflow job.
|
|
1671
|
+
*/
|
|
1672
|
+
workflowJobId?: string;
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
export namespace Metadata {
|
|
1676
|
+
export interface Flow {
|
|
1677
|
+
/**
|
|
1678
|
+
* The id of the node.
|
|
1679
|
+
*/
|
|
1680
|
+
id: string;
|
|
1681
|
+
|
|
1682
|
+
/**
|
|
1683
|
+
* The status of the node. Only available for WorkflowJob nodes.
|
|
1684
|
+
*/
|
|
1685
|
+
status: 'failure' | 'pending' | 'processing' | 'skipped' | 'success';
|
|
1686
|
+
|
|
1687
|
+
/**
|
|
1688
|
+
* The type of the job for the node.
|
|
1689
|
+
*/
|
|
1690
|
+
type:
|
|
1691
|
+
| 'custom-model'
|
|
1692
|
+
| 'generate-prompt'
|
|
1693
|
+
| 'logic'
|
|
1694
|
+
| 'remove-background'
|
|
1695
|
+
| 'transform'
|
|
1696
|
+
| 'user-approval'
|
|
1697
|
+
| 'workflow';
|
|
1698
|
+
|
|
1699
|
+
/**
|
|
1700
|
+
* List of produced assets for this node.
|
|
1701
|
+
*/
|
|
1702
|
+
assets?: Array<Flow.Asset>;
|
|
1703
|
+
|
|
1704
|
+
/**
|
|
1705
|
+
* The nodes that this node depends on. Only available for nodes that have
|
|
1706
|
+
* dependencies. Mainly used for user approval nodes.
|
|
1707
|
+
*/
|
|
1708
|
+
dependsOn?: Array<string>;
|
|
1709
|
+
|
|
1710
|
+
/**
|
|
1711
|
+
* The inputs of the node.
|
|
1712
|
+
*/
|
|
1713
|
+
inputs?: Array<Flow.Input>;
|
|
1714
|
+
|
|
1715
|
+
/**
|
|
1716
|
+
* If the flow is part of a WorkflowJob, this is the jobId for the node. jobId is
|
|
1717
|
+
* only available for nodes started. A node "Pending" for a running workflow job is
|
|
1718
|
+
* not started.
|
|
1719
|
+
*/
|
|
1720
|
+
jobId?: string;
|
|
1721
|
+
|
|
1722
|
+
/**
|
|
1723
|
+
* The logic of the node. Only available for logic nodes.
|
|
1724
|
+
*/
|
|
1725
|
+
logic?: Flow.Logic;
|
|
1726
|
+
|
|
1727
|
+
/**
|
|
1728
|
+
* The type of the logic for the node. Only available for logic nodes.
|
|
1729
|
+
*/
|
|
1730
|
+
logicType?: 'if-else';
|
|
1731
|
+
|
|
1732
|
+
/**
|
|
1733
|
+
* The model id for the node. Mainly used for custom model tasks.
|
|
1734
|
+
*/
|
|
1735
|
+
modelId?: string;
|
|
1736
|
+
|
|
1737
|
+
/**
|
|
1738
|
+
* The workflow id for the node. Mainly used for workflow tasks.
|
|
1739
|
+
*/
|
|
1740
|
+
workflowId?: string;
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1743
|
+
export namespace Flow {
|
|
1744
|
+
export interface Asset {
|
|
1745
|
+
assetId: string;
|
|
1746
|
+
|
|
1747
|
+
url: string;
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
/**
|
|
1751
|
+
* This is used to run the flow.
|
|
1752
|
+
*/
|
|
1753
|
+
export interface Input {
|
|
1754
|
+
/**
|
|
1755
|
+
* The name that must be user to call the model through the API
|
|
1756
|
+
*/
|
|
1757
|
+
name: string;
|
|
1758
|
+
|
|
1759
|
+
/**
|
|
1760
|
+
* The data type of the input
|
|
1761
|
+
*/
|
|
1762
|
+
type:
|
|
1763
|
+
| 'boolean'
|
|
1764
|
+
| 'file'
|
|
1765
|
+
| 'file_array'
|
|
1766
|
+
| 'inputs_array'
|
|
1767
|
+
| 'model'
|
|
1768
|
+
| 'model_array'
|
|
1769
|
+
| 'number'
|
|
1770
|
+
| 'number_array'
|
|
1771
|
+
| 'string'
|
|
1772
|
+
| 'string_array';
|
|
1773
|
+
|
|
1774
|
+
/**
|
|
1775
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
1776
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
1777
|
+
* dropdown.
|
|
1778
|
+
*/
|
|
1779
|
+
allowedValues?: Array<unknown>;
|
|
1780
|
+
|
|
1781
|
+
/**
|
|
1782
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
1783
|
+
* \`file_array\` input types with kind \`image\`.
|
|
1784
|
+
*/
|
|
1785
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
1786
|
+
|
|
1787
|
+
/**
|
|
1788
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
1789
|
+
*/
|
|
1790
|
+
color?: boolean;
|
|
1791
|
+
|
|
1792
|
+
/**
|
|
1793
|
+
* Whether this input affects the model's cost calculation
|
|
1794
|
+
*/
|
|
1795
|
+
costImpact?: boolean;
|
|
1796
|
+
|
|
1797
|
+
/**
|
|
1798
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
1799
|
+
*/
|
|
1800
|
+
description?: string;
|
|
1801
|
+
|
|
1802
|
+
/**
|
|
1803
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
1804
|
+
* value appear consecutively in the UI.
|
|
1805
|
+
*/
|
|
1806
|
+
group?: string;
|
|
1807
|
+
|
|
1808
|
+
/**
|
|
1809
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
1810
|
+
*/
|
|
1811
|
+
hint?: string;
|
|
1812
|
+
|
|
1813
|
+
/**
|
|
1814
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
1815
|
+
* the same as the current object. This is only available for type inputs_array
|
|
1816
|
+
* inputs.
|
|
1817
|
+
*/
|
|
1818
|
+
inputs?: Array<unknown>;
|
|
1819
|
+
|
|
1820
|
+
/**
|
|
1821
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
1822
|
+
* \`file_array\` input types.
|
|
1823
|
+
*/
|
|
1824
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
1825
|
+
|
|
1826
|
+
/**
|
|
1827
|
+
* The label displayed in the UI for this input
|
|
1828
|
+
*/
|
|
1829
|
+
label?: string;
|
|
1830
|
+
|
|
1831
|
+
/**
|
|
1832
|
+
* The name of the file input field to use as the mask source
|
|
1833
|
+
*/
|
|
1834
|
+
maskFrom?: string;
|
|
1835
|
+
|
|
1836
|
+
/**
|
|
1837
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
1838
|
+
* types.
|
|
1839
|
+
*/
|
|
1840
|
+
max?: number;
|
|
1841
|
+
|
|
1842
|
+
/**
|
|
1843
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
1844
|
+
* \`string_array\`.
|
|
1845
|
+
*/
|
|
1846
|
+
maxLength?: number;
|
|
1847
|
+
|
|
1848
|
+
/**
|
|
1849
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
1850
|
+
*/
|
|
1851
|
+
min?: number;
|
|
1852
|
+
|
|
1853
|
+
/**
|
|
1854
|
+
* The minimum allowed length for string inputs. Also applies to each item in
|
|
1855
|
+
* \`string_array\`.
|
|
1856
|
+
*/
|
|
1857
|
+
minLength?: number;
|
|
1858
|
+
|
|
1859
|
+
/**
|
|
1860
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
1861
|
+
* available for \`model_array\` input type.
|
|
1862
|
+
*/
|
|
1863
|
+
modelTypes?: Array<
|
|
1864
|
+
| 'custom'
|
|
1865
|
+
| 'flux.1'
|
|
1866
|
+
| 'flux.1-composition'
|
|
1867
|
+
| 'flux.1-kontext-dev'
|
|
1868
|
+
| 'flux.1-kontext-lora'
|
|
1869
|
+
| 'flux.1-krea-dev'
|
|
1870
|
+
| 'flux.1-krea-lora'
|
|
1871
|
+
| 'flux.1-lora'
|
|
1872
|
+
| 'flux.1-pro'
|
|
1873
|
+
| 'flux.1.1-pro-ultra'
|
|
1874
|
+
| 'flux1.1-pro'
|
|
1875
|
+
| 'gpt-image-1'
|
|
1876
|
+
| 'sd-1_5'
|
|
1877
|
+
| 'sd-1_5-composition'
|
|
1878
|
+
| 'sd-1_5-lora'
|
|
1879
|
+
| 'sd-xl'
|
|
1880
|
+
| 'sd-xl-composition'
|
|
1881
|
+
| 'sd-xl-lora'
|
|
1882
|
+
>;
|
|
1883
|
+
|
|
1884
|
+
/**
|
|
1885
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
1886
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
1887
|
+
*
|
|
1888
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
1889
|
+
*/
|
|
1890
|
+
parent?: boolean;
|
|
1891
|
+
|
|
1892
|
+
/**
|
|
1893
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
1894
|
+
*/
|
|
1895
|
+
placeholder?: string;
|
|
1896
|
+
|
|
1897
|
+
/**
|
|
1898
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
1899
|
+
* spark feature. Only available for \`string\` input type.
|
|
1900
|
+
*/
|
|
1901
|
+
prompt?: boolean;
|
|
1902
|
+
|
|
1903
|
+
/**
|
|
1904
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
1905
|
+
* type.
|
|
1906
|
+
*/
|
|
1907
|
+
promptSpark?: boolean;
|
|
1908
|
+
|
|
1909
|
+
/**
|
|
1910
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
1911
|
+
* least one of node or conditional.
|
|
1912
|
+
*/
|
|
1913
|
+
ref?: Input.Ref;
|
|
1914
|
+
|
|
1915
|
+
/**
|
|
1916
|
+
* Set of rules that describes when this input is required:
|
|
1917
|
+
*
|
|
1918
|
+
* - \`always\`: Input is always required
|
|
1919
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
1920
|
+
* defined
|
|
1921
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
1922
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
1923
|
+
* value
|
|
1924
|
+
*
|
|
1925
|
+
* By default, the input is not required.
|
|
1926
|
+
*/
|
|
1927
|
+
required?: Input.Required;
|
|
1928
|
+
|
|
1929
|
+
/**
|
|
1930
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
1931
|
+
*/
|
|
1932
|
+
step?: number;
|
|
1933
|
+
}
|
|
1934
|
+
|
|
1935
|
+
export namespace Input {
|
|
1936
|
+
/**
|
|
1937
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
1938
|
+
* least one of node or conditional.
|
|
1939
|
+
*/
|
|
1940
|
+
export interface Ref {
|
|
1941
|
+
/**
|
|
1942
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
1943
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
1944
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
1945
|
+
*/
|
|
1946
|
+
conditional?: Array<string>;
|
|
1947
|
+
|
|
1948
|
+
/**
|
|
1949
|
+
* This is the desired node output value if ref is an if/else node.
|
|
1950
|
+
*/
|
|
1951
|
+
equal?: string;
|
|
1952
|
+
|
|
1953
|
+
/**
|
|
1954
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
1955
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
1956
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
1957
|
+
* all outputs of a node, you can use the name 'all'.
|
|
1958
|
+
*/
|
|
1959
|
+
name?: string;
|
|
1960
|
+
|
|
1961
|
+
/**
|
|
1962
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
1963
|
+
*/
|
|
1964
|
+
node?: string;
|
|
1965
|
+
}
|
|
1966
|
+
|
|
1967
|
+
/**
|
|
1968
|
+
* Set of rules that describes when this input is required:
|
|
1969
|
+
*
|
|
1970
|
+
* - \`always\`: Input is always required
|
|
1971
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
1972
|
+
* defined
|
|
1973
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
1974
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
1975
|
+
* value
|
|
1976
|
+
*
|
|
1977
|
+
* By default, the input is not required.
|
|
1978
|
+
*/
|
|
1979
|
+
export interface Required {
|
|
1980
|
+
/**
|
|
1981
|
+
* Whether the input is always required
|
|
1982
|
+
*/
|
|
1983
|
+
always?: boolean;
|
|
1984
|
+
|
|
1985
|
+
/**
|
|
1986
|
+
* Makes this input required when another input has a specific value:
|
|
1987
|
+
*
|
|
1988
|
+
* - Key: name of the input to check
|
|
1989
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
1990
|
+
*/
|
|
1991
|
+
conditionalValues?: unknown;
|
|
1992
|
+
|
|
1993
|
+
/**
|
|
1994
|
+
* Makes this input required when another input is defined:
|
|
1995
|
+
*
|
|
1996
|
+
* - Key: name of the input that must be defined
|
|
1997
|
+
* - Value: message to display when this input is required
|
|
1998
|
+
*/
|
|
1999
|
+
ifDefined?: unknown;
|
|
2000
|
+
|
|
2001
|
+
/**
|
|
2002
|
+
* Makes this input required when another input is not defined:
|
|
2003
|
+
*
|
|
2004
|
+
* - Key: name of the input that must be undefined
|
|
2005
|
+
* - Value: message to display when this input is required
|
|
2006
|
+
*/
|
|
2007
|
+
ifNotDefined?: unknown;
|
|
2008
|
+
}
|
|
2009
|
+
}
|
|
2010
|
+
|
|
2011
|
+
/**
|
|
2012
|
+
* The logic of the node. Only available for logic nodes.
|
|
2013
|
+
*/
|
|
2014
|
+
export interface Logic {
|
|
2015
|
+
/**
|
|
2016
|
+
* The cases of the logic. Only available for if/else nodes.
|
|
2017
|
+
*/
|
|
2018
|
+
cases?: Array<Logic.Case>;
|
|
2019
|
+
|
|
2020
|
+
/**
|
|
2021
|
+
* The default case of the logic. Contains the id/output of the node to execute if
|
|
2022
|
+
* no case is matched. Only available for if/else nodes.
|
|
2023
|
+
*/
|
|
2024
|
+
default?: string;
|
|
2025
|
+
|
|
2026
|
+
/**
|
|
2027
|
+
* The transform of the logic. Only available for transform nodes.
|
|
2028
|
+
*/
|
|
2029
|
+
transform?: string;
|
|
2030
|
+
}
|
|
2031
|
+
|
|
2032
|
+
export namespace Logic {
|
|
2033
|
+
export interface Case {
|
|
2034
|
+
condition: string;
|
|
2035
|
+
|
|
2036
|
+
value: string;
|
|
2037
|
+
}
|
|
2038
|
+
}
|
|
2039
|
+
}
|
|
2040
|
+
}
|
|
2041
|
+
|
|
2042
|
+
export interface StatusHistory {
|
|
2043
|
+
date: string;
|
|
2044
|
+
|
|
2045
|
+
status:
|
|
2046
|
+
| 'canceled'
|
|
2047
|
+
| 'failure'
|
|
2048
|
+
| 'finalizing'
|
|
2049
|
+
| 'in-progress'
|
|
2050
|
+
| 'pending'
|
|
2051
|
+
| 'queued'
|
|
2052
|
+
| 'success'
|
|
2053
|
+
| 'warming-up';
|
|
2054
|
+
}
|
|
2055
|
+
|
|
2056
|
+
/**
|
|
2057
|
+
* The billing of the job
|
|
2058
|
+
*/
|
|
2059
|
+
export interface Billing {
|
|
2060
|
+
cuCost: number;
|
|
2061
|
+
|
|
2062
|
+
cuDiscount: number;
|
|
2063
|
+
}
|
|
2064
|
+
}
|
|
2065
|
+
}
|
|
2066
|
+
}
|
|
2067
|
+
|
|
2068
|
+
export interface ExampleListResponse {
|
|
2069
|
+
examples: Array<ExampleListResponse.Example>;
|
|
2070
|
+
}
|
|
2071
|
+
|
|
2072
|
+
export namespace ExampleListResponse {
|
|
2073
|
+
export interface Example {
|
|
2074
|
+
/**
|
|
2075
|
+
* Asset generated by the inference
|
|
2076
|
+
*/
|
|
2077
|
+
asset: Example.Asset;
|
|
2078
|
+
|
|
2079
|
+
/**
|
|
2080
|
+
* Model id of the model used to generate the asset
|
|
2081
|
+
*/
|
|
2082
|
+
modelId: string;
|
|
2083
|
+
|
|
2084
|
+
/**
|
|
2085
|
+
* Inference id of the inference used to generate the asset
|
|
2086
|
+
*/
|
|
2087
|
+
inferenceId?: string;
|
|
2088
|
+
|
|
2089
|
+
/**
|
|
2090
|
+
* The inference parameters used to generate the asset
|
|
2091
|
+
*/
|
|
2092
|
+
inferenceParameters?: Example.InferenceParameters;
|
|
2093
|
+
|
|
2094
|
+
/**
|
|
2095
|
+
* The job associated with the asset
|
|
2096
|
+
*/
|
|
2097
|
+
job?: Example.Job;
|
|
2098
|
+
}
|
|
2099
|
+
|
|
2100
|
+
export namespace Example {
|
|
2101
|
+
/**
|
|
2102
|
+
* Asset generated by the inference
|
|
2103
|
+
*/
|
|
2104
|
+
export interface Asset {
|
|
2105
|
+
/**
|
|
2106
|
+
* The asset ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
2107
|
+
*/
|
|
2108
|
+
id: string;
|
|
2109
|
+
|
|
2110
|
+
/**
|
|
2111
|
+
* The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea")
|
|
2112
|
+
*/
|
|
2113
|
+
authorId: string;
|
|
2114
|
+
|
|
2115
|
+
/**
|
|
2116
|
+
* A list of CollectionId this asset belongs to
|
|
2117
|
+
*/
|
|
2118
|
+
collectionIds: Array<string>;
|
|
2119
|
+
|
|
2120
|
+
/**
|
|
2121
|
+
* The asset creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
|
|
2122
|
+
*/
|
|
2123
|
+
createdAt: string;
|
|
2124
|
+
|
|
2125
|
+
/**
|
|
2126
|
+
* List of edit capabilities
|
|
2127
|
+
*/
|
|
2128
|
+
editCapabilities: Array<
|
|
2129
|
+
| 'DETECTION'
|
|
2130
|
+
| 'GENERATIVE_FILL'
|
|
2131
|
+
| 'PIXELATE'
|
|
2132
|
+
| 'PROMPT_EDITING'
|
|
2133
|
+
| 'REFINE'
|
|
2134
|
+
| 'REFRAME'
|
|
2135
|
+
| 'REMOVE_BACKGROUND'
|
|
2136
|
+
| 'SEGMENTATION'
|
|
2137
|
+
| 'UPSCALE'
|
|
2138
|
+
| 'UPSCALE_360'
|
|
2139
|
+
| 'VECTORIZATION'
|
|
2140
|
+
>;
|
|
2141
|
+
|
|
2142
|
+
/**
|
|
2143
|
+
* The kind of asset
|
|
2144
|
+
*/
|
|
2145
|
+
kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
2146
|
+
|
|
2147
|
+
/**
|
|
2148
|
+
* Metadata of the asset with some additional information
|
|
2149
|
+
*/
|
|
2150
|
+
metadata: Asset.Metadata;
|
|
2151
|
+
|
|
2152
|
+
/**
|
|
2153
|
+
* The mime type of the asset (example: "image/png")
|
|
2154
|
+
*/
|
|
2155
|
+
mimeType: string;
|
|
2156
|
+
|
|
2157
|
+
/**
|
|
2158
|
+
* The owner (project) ID (example: "proj_23tlk332lkht3kl2" or
|
|
2159
|
+
* "team_dlkhgs23tlk3hlkth32lkht3kl2" for old teams)
|
|
2160
|
+
*/
|
|
2161
|
+
ownerId: string;
|
|
2162
|
+
|
|
2163
|
+
/**
|
|
2164
|
+
* The privacy of the asset
|
|
2165
|
+
*/
|
|
2166
|
+
privacy: 'private' | 'public' | 'unlisted';
|
|
2167
|
+
|
|
2168
|
+
/**
|
|
2169
|
+
* The properties of the asset, content may depend on the kind of asset returned
|
|
2170
|
+
*/
|
|
2171
|
+
properties: Asset.Properties;
|
|
2172
|
+
|
|
2173
|
+
/**
|
|
2174
|
+
* source of the asset
|
|
2175
|
+
*/
|
|
2176
|
+
source:
|
|
2177
|
+
| '3d23d'
|
|
2178
|
+
| '3d23d:texture'
|
|
2179
|
+
| '3d:texture'
|
|
2180
|
+
| '3d:texture:albedo'
|
|
2181
|
+
| '3d:texture:metallic'
|
|
2182
|
+
| '3d:texture:mtl'
|
|
2183
|
+
| '3d:texture:normal'
|
|
2184
|
+
| '3d:texture:roughness'
|
|
2185
|
+
| 'audio2audio'
|
|
2186
|
+
| 'background-removal'
|
|
2187
|
+
| 'canvas'
|
|
2188
|
+
| 'canvas-drawing'
|
|
2189
|
+
| 'canvas-export'
|
|
2190
|
+
| 'detection'
|
|
2191
|
+
| 'generative-fill'
|
|
2192
|
+
| 'image-prompt-editing'
|
|
2193
|
+
| 'img23d'
|
|
2194
|
+
| 'img2img'
|
|
2195
|
+
| 'img2video'
|
|
2196
|
+
| 'inference-control-net'
|
|
2197
|
+
| 'inference-control-net-img'
|
|
2198
|
+
| 'inference-control-net-inpainting'
|
|
2199
|
+
| 'inference-control-net-inpainting-ip-adapter'
|
|
2200
|
+
| 'inference-control-net-ip-adapter'
|
|
2201
|
+
| 'inference-control-net-reference'
|
|
2202
|
+
| 'inference-control-net-texture'
|
|
2203
|
+
| 'inference-img'
|
|
2204
|
+
| 'inference-img-ip-adapter'
|
|
2205
|
+
| 'inference-img-texture'
|
|
2206
|
+
| 'inference-in-paint'
|
|
2207
|
+
| 'inference-in-paint-ip-adapter'
|
|
2208
|
+
| 'inference-reference'
|
|
2209
|
+
| 'inference-reference-texture'
|
|
2210
|
+
| 'inference-txt'
|
|
2211
|
+
| 'inference-txt-ip-adapter'
|
|
2212
|
+
| 'inference-txt-texture'
|
|
2213
|
+
| 'patch'
|
|
2214
|
+
| 'pixelization'
|
|
2215
|
+
| 'reframe'
|
|
2216
|
+
| 'restyle'
|
|
2217
|
+
| 'segment'
|
|
2218
|
+
| 'segmentation-image'
|
|
2219
|
+
| 'segmentation-mask'
|
|
2220
|
+
| 'skybox-3d'
|
|
2221
|
+
| 'skybox-base-360'
|
|
2222
|
+
| 'skybox-hdri'
|
|
2223
|
+
| 'texture'
|
|
2224
|
+
| 'texture:albedo'
|
|
2225
|
+
| 'texture:ao'
|
|
2226
|
+
| 'texture:edge'
|
|
2227
|
+
| 'texture:height'
|
|
2228
|
+
| 'texture:metallic'
|
|
2229
|
+
| 'texture:normal'
|
|
2230
|
+
| 'texture:smoothness'
|
|
2231
|
+
| 'txt23d'
|
|
2232
|
+
| 'txt2audio'
|
|
2233
|
+
| 'txt2img'
|
|
2234
|
+
| 'txt2video'
|
|
2235
|
+
| 'unknown'
|
|
2236
|
+
| 'uploaded'
|
|
2237
|
+
| 'uploaded-3d'
|
|
2238
|
+
| 'uploaded-audio'
|
|
2239
|
+
| 'uploaded-avatar'
|
|
2240
|
+
| 'uploaded-video'
|
|
2241
|
+
| 'upscale'
|
|
2242
|
+
| 'upscale-skybox'
|
|
2243
|
+
| 'upscale-texture'
|
|
2244
|
+
| 'upscale-video'
|
|
2245
|
+
| 'vectorization'
|
|
2246
|
+
| 'video2img'
|
|
2247
|
+
| 'video2video';
|
|
2248
|
+
|
|
2249
|
+
/**
|
|
2250
|
+
* The actual status
|
|
2251
|
+
*/
|
|
2252
|
+
status: 'error' | 'pending' | 'success';
|
|
2253
|
+
|
|
2254
|
+
/**
|
|
2255
|
+
* The associated tags (example: ["sci-fi", "landscape"])
|
|
2256
|
+
*/
|
|
2257
|
+
tags: Array<string>;
|
|
2258
|
+
|
|
2259
|
+
/**
|
|
2260
|
+
* The asset last update date as an ISO string (example:
|
|
2261
|
+
* "2023-02-03T11:19:41.579Z")
|
|
2262
|
+
*/
|
|
2263
|
+
updatedAt: string;
|
|
2264
|
+
|
|
2265
|
+
/**
|
|
2266
|
+
* Signed URL to get the asset content
|
|
2267
|
+
*/
|
|
2268
|
+
url: string;
|
|
2269
|
+
|
|
2270
|
+
/**
|
|
2271
|
+
* Automatic captioning of the asset
|
|
2272
|
+
*/
|
|
2273
|
+
automaticCaptioning?: string;
|
|
2274
|
+
|
|
2275
|
+
/**
|
|
2276
|
+
* The description, it will contain in priority:
|
|
2277
|
+
*
|
|
2278
|
+
* - the manual description
|
|
2279
|
+
* - the advanced captioning when the asset is used in training flow
|
|
2280
|
+
* - the automatic captioning
|
|
2281
|
+
*/
|
|
2282
|
+
description?: string;
|
|
2283
|
+
|
|
2284
|
+
/**
|
|
2285
|
+
* The embedding of the asset when requested.
|
|
2286
|
+
*
|
|
2287
|
+
* Only available when an asset can be embedded (ie: not Detection maps)
|
|
2288
|
+
*/
|
|
2289
|
+
embedding?: Array<number>;
|
|
2290
|
+
|
|
2291
|
+
/**
|
|
2292
|
+
* The video asset's first frame.
|
|
2293
|
+
*
|
|
2294
|
+
* Contains the assetId and the url of the first frame.
|
|
2295
|
+
*/
|
|
2296
|
+
firstFrame?: Asset.FirstFrame;
|
|
2297
|
+
|
|
2298
|
+
/**
|
|
2299
|
+
* Whether the asset is hidden.
|
|
2300
|
+
*/
|
|
2301
|
+
isHidden?: boolean;
|
|
2302
|
+
|
|
2303
|
+
/**
|
|
2304
|
+
* The video asset's last frame.
|
|
2305
|
+
*
|
|
2306
|
+
* Contains the assetId and the url of the last frame.
|
|
2307
|
+
*/
|
|
2308
|
+
lastFrame?: Asset.LastFrame;
|
|
2309
|
+
|
|
2310
|
+
/**
|
|
2311
|
+
* The NSFW labels
|
|
2312
|
+
*/
|
|
2313
|
+
nsfw?: Array<string>;
|
|
2314
|
+
|
|
2315
|
+
/**
|
|
2316
|
+
* The original file url.
|
|
2317
|
+
*
|
|
2318
|
+
* Contains the url of the original file. without any conversion. Only available
|
|
2319
|
+
* for some specific video, audio and threeD assets. Is only specified if the given
|
|
2320
|
+
* asset data has been replaced with a new file during the creation of the asset.
|
|
2321
|
+
*/
|
|
2322
|
+
originalFileUrl?: string;
|
|
2323
|
+
|
|
2324
|
+
/**
|
|
2325
|
+
* The output index of the asset within a job This index is an positive integer
|
|
2326
|
+
* that starts at 0 It is used to differentiate between multiple outputs of the
|
|
2327
|
+
* same job If the job has only one output, this index is 0
|
|
2328
|
+
*/
|
|
2329
|
+
outputIndex?: number;
|
|
2330
|
+
|
|
2331
|
+
/**
|
|
2332
|
+
* The asset's preview.
|
|
2333
|
+
*
|
|
2334
|
+
* Contains the assetId and the url of the preview.
|
|
2335
|
+
*/
|
|
2336
|
+
preview?: Asset.Preview;
|
|
2337
|
+
|
|
2338
|
+
/**
|
|
2339
|
+
* The asset's thumbnail.
|
|
2340
|
+
*
|
|
2341
|
+
* Contains the assetId and the url of the thumbnail.
|
|
2342
|
+
*/
|
|
2343
|
+
thumbnail?: Asset.Thumbnail;
|
|
2344
|
+
}
|
|
2345
|
+
|
|
2346
|
+
export namespace Asset {
|
|
2347
|
+
/**
|
|
2348
|
+
* Metadata of the asset with some additional information
|
|
2349
|
+
*/
|
|
2350
|
+
export interface Metadata {
|
|
2351
|
+
kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
2352
|
+
|
|
2353
|
+
/**
|
|
2354
|
+
* The type of the asset. Ex: 'inference-txt2img' will represent an asset generated
|
|
2355
|
+
* from a text to image model
|
|
2356
|
+
*/
|
|
2357
|
+
type:
|
|
2358
|
+
| '3d-texture'
|
|
2359
|
+
| '3d-texture-albedo'
|
|
2360
|
+
| '3d-texture-metallic'
|
|
2361
|
+
| '3d-texture-mtl'
|
|
2362
|
+
| '3d-texture-normal'
|
|
2363
|
+
| '3d-texture-roughness'
|
|
2364
|
+
| '3d23d'
|
|
2365
|
+
| '3d23d-texture'
|
|
2366
|
+
| 'audio2audio'
|
|
2367
|
+
| 'background-removal'
|
|
2368
|
+
| 'canvas'
|
|
2369
|
+
| 'canvas-drawing'
|
|
2370
|
+
| 'canvas-export'
|
|
2371
|
+
| 'detection'
|
|
2372
|
+
| 'generative-fill'
|
|
2373
|
+
| 'image-prompt-editing'
|
|
2374
|
+
| 'img23d'
|
|
2375
|
+
| 'img2img'
|
|
2376
|
+
| 'img2video'
|
|
2377
|
+
| 'inference-controlnet'
|
|
2378
|
+
| 'inference-controlnet-img2img'
|
|
2379
|
+
| 'inference-controlnet-inpaint'
|
|
2380
|
+
| 'inference-controlnet-inpaint-ip-adapter'
|
|
2381
|
+
| 'inference-controlnet-ip-adapter'
|
|
2382
|
+
| 'inference-controlnet-reference'
|
|
2383
|
+
| 'inference-controlnet-texture'
|
|
2384
|
+
| 'inference-img2img'
|
|
2385
|
+
| 'inference-img2img-ip-adapter'
|
|
2386
|
+
| 'inference-img2img-texture'
|
|
2387
|
+
| 'inference-inpaint'
|
|
2388
|
+
| 'inference-inpaint-ip-adapter'
|
|
2389
|
+
| 'inference-reference'
|
|
2390
|
+
| 'inference-reference-texture'
|
|
2391
|
+
| 'inference-txt2img'
|
|
2392
|
+
| 'inference-txt2img-ip-adapter'
|
|
2393
|
+
| 'inference-txt2img-texture'
|
|
2394
|
+
| 'patch'
|
|
2395
|
+
| 'pixelization'
|
|
2396
|
+
| 'reframe'
|
|
2397
|
+
| 'restyle'
|
|
2398
|
+
| 'segment'
|
|
2399
|
+
| 'segmentation-image'
|
|
2400
|
+
| 'segmentation-mask'
|
|
2401
|
+
| 'skybox-3d'
|
|
2402
|
+
| 'skybox-base-360'
|
|
2403
|
+
| 'skybox-hdri'
|
|
2404
|
+
| 'texture'
|
|
2405
|
+
| 'texture-albedo'
|
|
2406
|
+
| 'texture-ao'
|
|
2407
|
+
| 'texture-edge'
|
|
2408
|
+
| 'texture-height'
|
|
2409
|
+
| 'texture-metallic'
|
|
2410
|
+
| 'texture-normal'
|
|
2411
|
+
| 'texture-smoothness'
|
|
2412
|
+
| 'txt23d'
|
|
2413
|
+
| 'txt2audio'
|
|
2414
|
+
| 'txt2img'
|
|
2415
|
+
| 'txt2video'
|
|
2416
|
+
| 'unknown'
|
|
2417
|
+
| 'uploaded'
|
|
2418
|
+
| 'uploaded-3d'
|
|
2419
|
+
| 'uploaded-audio'
|
|
2420
|
+
| 'uploaded-avatar'
|
|
2421
|
+
| 'uploaded-video'
|
|
2422
|
+
| 'upscale'
|
|
2423
|
+
| 'upscale-skybox'
|
|
2424
|
+
| 'upscale-texture'
|
|
2425
|
+
| 'upscale-video'
|
|
2426
|
+
| 'vectorization'
|
|
2427
|
+
| 'video2img'
|
|
2428
|
+
| 'video2video';
|
|
2429
|
+
|
|
2430
|
+
/**
|
|
2431
|
+
* How angular is the surface? 0 is like a sphere, 1 is like a mechanical object
|
|
2432
|
+
*/
|
|
2433
|
+
angular?: number;
|
|
2434
|
+
|
|
2435
|
+
/**
|
|
2436
|
+
* The optional aspect ratio given for the generation, only applicable for some
|
|
2437
|
+
* models
|
|
2438
|
+
*/
|
|
2439
|
+
aspectRatio?: string;
|
|
2440
|
+
|
|
2441
|
+
/**
|
|
2442
|
+
* Int to set between 0 and 255 for the opacity of the background in the result
|
|
2443
|
+
* images.
|
|
2444
|
+
*/
|
|
2445
|
+
backgroundOpacity?: number;
|
|
2446
|
+
|
|
2447
|
+
/**
|
|
2448
|
+
* The baseModelId that maybe changed at inference time
|
|
2449
|
+
*/
|
|
2450
|
+
baseModelId?: string;
|
|
2451
|
+
|
|
2452
|
+
/**
|
|
2453
|
+
* A bounding box around the object of interest, in the format [x1, y1, x2, y2].
|
|
2454
|
+
*/
|
|
2455
|
+
bbox?: Array<unknown>;
|
|
2456
|
+
|
|
2457
|
+
/**
|
|
2458
|
+
* Remove small dark spots (i.e. “pepper”) and connect small bright cracks.
|
|
2459
|
+
*/
|
|
2460
|
+
betterQuality?: boolean;
|
|
2461
|
+
|
|
2462
|
+
/**
|
|
2463
|
+
* The control image already processed by canny detector. Must reference an
|
|
2464
|
+
* existing AssetId.
|
|
2465
|
+
*/
|
|
2466
|
+
cannyStructureImage?: string;
|
|
2467
|
+
|
|
2468
|
+
/**
|
|
2469
|
+
* Activate clustering.
|
|
2470
|
+
*/
|
|
2471
|
+
clustering?: boolean;
|
|
2472
|
+
|
|
2473
|
+
/**
|
|
2474
|
+
* Ensure upscaled tile have the same color histogram as original tile.
|
|
2475
|
+
*/
|
|
2476
|
+
colorCorrection?: boolean;
|
|
2477
|
+
|
|
2478
|
+
colorMode?: string;
|
|
2479
|
+
|
|
2480
|
+
colorPrecision?: number;
|
|
2481
|
+
|
|
2482
|
+
/**
|
|
2483
|
+
* Flux Kontext LoRA to style the image. For Flux Kontext Prompt Editing.
|
|
2484
|
+
*/
|
|
2485
|
+
concepts?: Array<Metadata.Concept>;
|
|
2486
|
+
|
|
2487
|
+
contours?: Array<Array<Array<Array<number>>>>;
|
|
2488
|
+
|
|
2489
|
+
/**
|
|
2490
|
+
* End step for control.
|
|
2491
|
+
*/
|
|
2492
|
+
controlEnd?: number;
|
|
2493
|
+
|
|
2494
|
+
/**
|
|
2495
|
+
* The date when the asset was copied to a project
|
|
2496
|
+
*/
|
|
2497
|
+
copiedAt?: string;
|
|
2498
|
+
|
|
2499
|
+
cornerThreshold?: number;
|
|
2500
|
+
|
|
2501
|
+
/**
|
|
2502
|
+
* Allow the generation of "hallucinations" during the upscale process, which adds
|
|
2503
|
+
* additional details and deviates from the original image. Default: optimized for
|
|
2504
|
+
* your preset and style.
|
|
2505
|
+
*/
|
|
2506
|
+
creativity?: number;
|
|
2507
|
+
|
|
2508
|
+
/**
|
|
2509
|
+
* Amount of decay in creativity over the upscale process. The lowest the value,
|
|
2510
|
+
* the less the creativity will be preserved over the upscale process.
|
|
2511
|
+
*/
|
|
2512
|
+
creativityDecay?: number;
|
|
2513
|
+
|
|
2514
|
+
/**
|
|
2515
|
+
* If true, use the default parameters
|
|
2516
|
+
*/
|
|
2517
|
+
defaultParameters?: boolean;
|
|
2518
|
+
|
|
2519
|
+
/**
|
|
2520
|
+
* The depth fidelity if a depth image provided
|
|
2521
|
+
*/
|
|
2522
|
+
depthFidelity?: number;
|
|
2523
|
+
|
|
2524
|
+
/**
|
|
2525
|
+
* The control image processed by depth estimator. Must reference an existing
|
|
2526
|
+
* AssetId.
|
|
2527
|
+
*/
|
|
2528
|
+
depthImage?: string;
|
|
2529
|
+
|
|
2530
|
+
/**
|
|
2531
|
+
* Amount of details to remove or add
|
|
2532
|
+
*/
|
|
2533
|
+
detailsLevel?: number;
|
|
2534
|
+
|
|
2535
|
+
/**
|
|
2536
|
+
* The number of pixels to dilate the result masks.
|
|
2537
|
+
*/
|
|
2538
|
+
dilate?: number;
|
|
2539
|
+
|
|
2540
|
+
/**
|
|
2541
|
+
* Contrast factor for Grayscale detector
|
|
2542
|
+
*/
|
|
2543
|
+
factor?: number;
|
|
2544
|
+
|
|
2545
|
+
filterSpeckle?: number;
|
|
2546
|
+
|
|
2547
|
+
/**
|
|
2548
|
+
* Determine the scale at which the upscale process works.
|
|
2549
|
+
*
|
|
2550
|
+
* - With a small value, the upscale works at the largest scale, resulting in fewer
|
|
2551
|
+
* added details and more coherent images. Ideal for portraits, for example.
|
|
2552
|
+
* - With a large value, the upscale works at the smallest scale, resulting in more
|
|
2553
|
+
* added details and more hallucinations. Ideal for landscapes, for example.
|
|
2554
|
+
*
|
|
2555
|
+
* (info): A small value is slower and more expensive to run.
|
|
2556
|
+
*/
|
|
2557
|
+
fractality?: number;
|
|
2558
|
+
|
|
2559
|
+
/**
|
|
2560
|
+
* Apply extra control to the Skybox 360 geometry. The higher the value, the more
|
|
2561
|
+
* the 360 geometry will influence the generated skybox image.
|
|
2562
|
+
*
|
|
2563
|
+
* Use with caution. Default is adapted to the other parameters.
|
|
2564
|
+
*/
|
|
2565
|
+
geometryEnforcement?: number;
|
|
2566
|
+
|
|
2567
|
+
/**
|
|
2568
|
+
* The guidance used to generate this asset
|
|
2569
|
+
*/
|
|
2570
|
+
guidance?: number;
|
|
2571
|
+
|
|
2572
|
+
halfMode?: boolean;
|
|
2573
|
+
|
|
2574
|
+
hdr?: number;
|
|
2575
|
+
|
|
2576
|
+
height?: number;
|
|
2577
|
+
|
|
2578
|
+
/**
|
|
2579
|
+
* High threshold for Canny detector
|
|
2580
|
+
*/
|
|
2581
|
+
highThreshold?: number;
|
|
2582
|
+
|
|
2583
|
+
/**
|
|
2584
|
+
* (deprecated) Horizontal expansion ratio.
|
|
2585
|
+
*/
|
|
2586
|
+
horizontalExpansionRatio?: number;
|
|
2587
|
+
|
|
2588
|
+
/**
|
|
2589
|
+
* The input image to process. Must reference an existing AssetId or be a data URL.
|
|
2590
|
+
*/
|
|
2591
|
+
image?: string;
|
|
2592
|
+
|
|
2593
|
+
/**
|
|
2594
|
+
* Strengthen the similarity to the original image during the upscale. Default:
|
|
2595
|
+
* optimized for your preset and style.
|
|
2596
|
+
*/
|
|
2597
|
+
imageFidelity?: number;
|
|
2598
|
+
|
|
2599
|
+
/**
|
|
2600
|
+
* Preserve the seamless properties of skybox or texture images. Input has to be of
|
|
2601
|
+
* same type (seamless).
|
|
2602
|
+
*/
|
|
2603
|
+
imageType?: 'seamfull' | 'skybox' | 'texture';
|
|
2604
|
+
|
|
2605
|
+
/**
|
|
2606
|
+
* The id of the Inference describing how this image was generated
|
|
2607
|
+
*/
|
|
2608
|
+
inferenceId?: string;
|
|
2609
|
+
|
|
2610
|
+
/**
|
|
2611
|
+
* When set to `high`, allows to better preserve details from the input images in
|
|
2612
|
+
* the output. This is especially useful when using images that contain elements
|
|
2613
|
+
* like faces or logos that require accurate preservation in the generated image.
|
|
2614
|
+
*
|
|
2615
|
+
* You can provide multiple input images that will all be preserved with high
|
|
2616
|
+
* fidelity, but keep in mind that the first image will be preserved with richer
|
|
2617
|
+
* textures and finer details, so if you include elements such as faces, consider
|
|
2618
|
+
* placing them in the first image.
|
|
2619
|
+
*
|
|
2620
|
+
* Only available for the `gpt-image-1` model.
|
|
2621
|
+
*/
|
|
2622
|
+
inputFidelity?: 'high' | 'low';
|
|
2623
|
+
|
|
2624
|
+
/**
|
|
2625
|
+
* Location of the input image in the output.
|
|
2626
|
+
*/
|
|
2627
|
+
inputLocation?: 'bottom' | 'left' | 'middle' | 'right' | 'top';
|
|
2628
|
+
|
|
2629
|
+
/**
|
|
2630
|
+
* To invert the relief
|
|
2631
|
+
*/
|
|
2632
|
+
invert?: boolean;
|
|
2633
|
+
|
|
2634
|
+
/**
|
|
2635
|
+
* How polished is the surface? 0 is like a rough surface, 1 is like a mirror
|
|
2636
|
+
*/
|
|
2637
|
+
keypointThreshold?: number;
|
|
2638
|
+
|
|
2639
|
+
layerDifference?: number;
|
|
2640
|
+
|
|
2641
|
+
lengthThreshold?: number;
|
|
2642
|
+
|
|
2643
|
+
/**
|
|
2644
|
+
* The ISO timestamp when the lock on the canvas will expire
|
|
2645
|
+
*/
|
|
2646
|
+
lockExpiresAt?: string;
|
|
2647
|
+
|
|
2648
|
+
/**
|
|
2649
|
+
* Low threshold for Canny detector
|
|
2650
|
+
*/
|
|
2651
|
+
lowThreshold?: number;
|
|
2652
|
+
|
|
2653
|
+
/**
|
|
2654
|
+
* The mask used for the asset generation or editing
|
|
2655
|
+
*/
|
|
2656
|
+
mask?: string;
|
|
2657
|
+
|
|
2658
|
+
maxIterations?: number;
|
|
2659
|
+
|
|
2660
|
+
/**
|
|
2661
|
+
* Maximum threshold for Grayscale conversion
|
|
2662
|
+
*/
|
|
2663
|
+
maxThreshold?: number;
|
|
2664
|
+
|
|
2665
|
+
/**
|
|
2666
|
+
* Minimum threshold for Grayscale conversion
|
|
2667
|
+
*/
|
|
2668
|
+
minThreshold?: number;
|
|
2669
|
+
|
|
2670
|
+
/**
|
|
2671
|
+
* Modality to detect
|
|
2672
|
+
*/
|
|
2673
|
+
modality?:
|
|
2674
|
+
| 'canny'
|
|
2675
|
+
| 'depth'
|
|
2676
|
+
| 'grayscale'
|
|
2677
|
+
| 'lineart_anime'
|
|
2678
|
+
| 'mlsd'
|
|
2679
|
+
| 'normal'
|
|
2680
|
+
| 'pose'
|
|
2681
|
+
| 'scribble'
|
|
2682
|
+
| 'segmentation'
|
|
2683
|
+
| 'sketch';
|
|
2684
|
+
|
|
2685
|
+
mode?: string;
|
|
2686
|
+
|
|
2687
|
+
/**
|
|
2688
|
+
* The modelId used to generate this asset
|
|
2689
|
+
*/
|
|
2690
|
+
modelId?: string;
|
|
2691
|
+
|
|
2692
|
+
/**
|
|
2693
|
+
* The type of the generator used
|
|
2694
|
+
*/
|
|
2695
|
+
modelType?:
|
|
2696
|
+
| 'custom'
|
|
2697
|
+
| 'flux.1'
|
|
2698
|
+
| 'flux.1-composition'
|
|
2699
|
+
| 'flux.1-kontext-dev'
|
|
2700
|
+
| 'flux.1-kontext-lora'
|
|
2701
|
+
| 'flux.1-krea-dev'
|
|
2702
|
+
| 'flux.1-krea-lora'
|
|
2703
|
+
| 'flux.1-lora'
|
|
2704
|
+
| 'flux.1-pro'
|
|
2705
|
+
| 'flux.1.1-pro-ultra'
|
|
2706
|
+
| 'flux1.1-pro'
|
|
2707
|
+
| 'gpt-image-1'
|
|
2708
|
+
| 'sd-1_5'
|
|
2709
|
+
| 'sd-1_5-composition'
|
|
2710
|
+
| 'sd-1_5-lora'
|
|
2711
|
+
| 'sd-xl'
|
|
2712
|
+
| 'sd-xl-composition'
|
|
2713
|
+
| 'sd-xl-lora';
|
|
2714
|
+
|
|
2715
|
+
name?: string;
|
|
2716
|
+
|
|
2717
|
+
nbMasks?: number;
|
|
2718
|
+
|
|
2719
|
+
/**
|
|
2720
|
+
* The negative prompt used to generate this asset
|
|
2721
|
+
*/
|
|
2722
|
+
negativePrompt?: string;
|
|
2723
|
+
|
|
2724
|
+
/**
|
|
2725
|
+
* Controls the influence of the negative prompt. Default 0 means the negative
|
|
2726
|
+
* prompt has no effect. Higher values increase negative prompt influence. Must
|
|
2727
|
+
* be > 0 if negativePrompt is provided.
|
|
2728
|
+
*/
|
|
2729
|
+
negativePromptStrength?: number;
|
|
2730
|
+
|
|
2731
|
+
/**
|
|
2732
|
+
* The number of denoising steps for each image generation.
|
|
2733
|
+
*/
|
|
2734
|
+
numInferenceSteps?: number;
|
|
2735
|
+
|
|
2736
|
+
/**
|
|
2737
|
+
* The number of outputs to generate.
|
|
2738
|
+
*/
|
|
2739
|
+
numOutputs?: number;
|
|
2740
|
+
|
|
2741
|
+
originalAssetId?: string;
|
|
2742
|
+
|
|
2743
|
+
outputIndex?: number;
|
|
2744
|
+
|
|
2745
|
+
/**
|
|
2746
|
+
* Overlap percentage for the output image.
|
|
2747
|
+
*/
|
|
2748
|
+
overlapPercentage?: number;
|
|
2749
|
+
|
|
2750
|
+
/**
|
|
2751
|
+
* Override the embeddings of the model. Only your prompt and negativePrompt will
|
|
2752
|
+
* be used. Use with caution.
|
|
2753
|
+
*/
|
|
2754
|
+
overrideEmbeddings?: boolean;
|
|
2755
|
+
|
|
2756
|
+
parentId?: string;
|
|
2757
|
+
|
|
2758
|
+
parentJobId?: string;
|
|
2759
|
+
|
|
2760
|
+
pathPrecision?: number;
|
|
2761
|
+
|
|
2762
|
+
/**
|
|
2763
|
+
* List of points (label, x, y) in the image where label = 0 for background and 1
|
|
2764
|
+
* for object.
|
|
2765
|
+
*/
|
|
2766
|
+
points?: Array<Array<unknown>>;
|
|
2767
|
+
|
|
2768
|
+
/**
|
|
2769
|
+
* How polished is the surface? 0 is like a rough surface, 1 is like a mirror
|
|
2770
|
+
*/
|
|
2771
|
+
polished?: number;
|
|
2772
|
+
|
|
2773
|
+
preset?: string;
|
|
2774
|
+
|
|
2775
|
+
progressPercent?: number;
|
|
2776
|
+
|
|
2777
|
+
/**
|
|
2778
|
+
* The prompt that guided the asset generation or editing
|
|
2779
|
+
*/
|
|
2780
|
+
prompt?: string;
|
|
2781
|
+
|
|
2782
|
+
/**
|
|
2783
|
+
* Increase the fidelity to the prompt during upscale. Default: optimized for your
|
|
2784
|
+
* preset and style.
|
|
2785
|
+
*/
|
|
2786
|
+
promptFidelity?: number;
|
|
2787
|
+
|
|
2788
|
+
/**
|
|
2789
|
+
* How raised is the surface? 0 is flat like water, 1 is like a very rough rock
|
|
2790
|
+
*/
|
|
2791
|
+
raised?: number;
|
|
2792
|
+
|
|
2793
|
+
/**
|
|
2794
|
+
* The reference images used for the asset generation or editing
|
|
2795
|
+
*/
|
|
2796
|
+
referenceImages?: Array<string>;
|
|
2797
|
+
|
|
2798
|
+
/**
|
|
2799
|
+
* Additional refinement steps before scaling.
|
|
2800
|
+
*
|
|
2801
|
+
* If scalingFactor == 1, the refinement process will be applied (1 +
|
|
2802
|
+
* refinementSteps) times. If scalingFactor > 1, the refinement process will be
|
|
2803
|
+
* applied refinementSteps times.
|
|
2804
|
+
*/
|
|
2805
|
+
refinementSteps?: number;
|
|
2806
|
+
|
|
2807
|
+
/**
|
|
2808
|
+
* Remove background for Grayscale detector
|
|
2809
|
+
*/
|
|
2810
|
+
removeBackground?: boolean;
|
|
2811
|
+
|
|
2812
|
+
/**
|
|
2813
|
+
* Size proportion of the input image in the output.
|
|
2814
|
+
*/
|
|
2815
|
+
resizeOption?: number;
|
|
2816
|
+
|
|
2817
|
+
/**
|
|
2818
|
+
* Boolean to output the contours.
|
|
2819
|
+
*/
|
|
2820
|
+
resultContours?: boolean;
|
|
2821
|
+
|
|
2822
|
+
/**
|
|
2823
|
+
* Boolean to able output the cut out object.
|
|
2824
|
+
*/
|
|
2825
|
+
resultImage?: boolean;
|
|
2826
|
+
|
|
2827
|
+
/**
|
|
2828
|
+
* Boolean to able return the masks (binary image) in the response.
|
|
2829
|
+
*/
|
|
2830
|
+
resultMask?: boolean;
|
|
2831
|
+
|
|
2832
|
+
rootParentId?: string;
|
|
2833
|
+
|
|
2834
|
+
/**
|
|
2835
|
+
* Save a flipbook of the texture. Deactivated when the input texture is larger
|
|
2836
|
+
* than 2048x2048px
|
|
2837
|
+
*/
|
|
2838
|
+
saveFlipbook?: boolean;
|
|
2839
|
+
|
|
2840
|
+
/**
|
|
2841
|
+
* Scaling factor (when `targetWidth` not specified)
|
|
2842
|
+
*/
|
|
2843
|
+
scalingFactor?: number;
|
|
2844
|
+
|
|
2845
|
+
/**
|
|
2846
|
+
* The scheduler used to generate this asset
|
|
2847
|
+
*/
|
|
2848
|
+
scheduler?: string;
|
|
2849
|
+
|
|
2850
|
+
/**
|
|
2851
|
+
* The seed used to generate this asset
|
|
2852
|
+
*/
|
|
2853
|
+
seed?: string;
|
|
2854
|
+
|
|
2855
|
+
/**
|
|
2856
|
+
* Sharpen tiles.
|
|
2857
|
+
*/
|
|
2858
|
+
sharpen?: boolean;
|
|
2859
|
+
|
|
2860
|
+
/**
|
|
2861
|
+
* How shiny is the surface? 0 is like a matte surface, 1 is like a diamond
|
|
2862
|
+
*/
|
|
2863
|
+
shiny?: number;
|
|
2864
|
+
|
|
2865
|
+
size?: number;
|
|
2866
|
+
|
|
2867
|
+
/**
|
|
2868
|
+
* Activate sketch detection instead of canny.
|
|
2869
|
+
*/
|
|
2870
|
+
sketch?: boolean;
|
|
2871
|
+
|
|
2872
|
+
sourceProjectId?: string;
|
|
2873
|
+
|
|
2874
|
+
spliceThreshold?: number;
|
|
2875
|
+
|
|
2876
|
+
/**
|
|
2877
|
+
* The strength
|
|
2878
|
+
*
|
|
2879
|
+
* Only available for the `flux-kontext` LoRA model.
|
|
2880
|
+
*/
|
|
2881
|
+
strength?: number;
|
|
2882
|
+
|
|
2883
|
+
/**
|
|
2884
|
+
* Strength for the input image structure preservation
|
|
2885
|
+
*/
|
|
2886
|
+
structureFidelity?: number;
|
|
2887
|
+
|
|
2888
|
+
/**
|
|
2889
|
+
* The control image for structure. A canny detector will be applied to this image.
|
|
2890
|
+
* Must reference an existing AssetId.
|
|
2891
|
+
*/
|
|
2892
|
+
structureImage?: string;
|
|
2893
|
+
|
|
2894
|
+
style?:
|
|
2895
|
+
| '3d-cartoon'
|
|
2896
|
+
| '3d-rendered'
|
|
2897
|
+
| 'anime'
|
|
2898
|
+
| 'cartoon'
|
|
2899
|
+
| 'cinematic'
|
|
2900
|
+
| 'claymation'
|
|
2901
|
+
| 'cloud-skydome'
|
|
2902
|
+
| 'comic'
|
|
2903
|
+
| 'cyberpunk'
|
|
2904
|
+
| 'enchanted'
|
|
2905
|
+
| 'fantasy'
|
|
2906
|
+
| 'ink'
|
|
2907
|
+
| 'manga'
|
|
2908
|
+
| 'manga-color'
|
|
2909
|
+
| 'minimalist'
|
|
2910
|
+
| 'neon-tron'
|
|
2911
|
+
| 'oil-painting'
|
|
2912
|
+
| 'pastel'
|
|
2913
|
+
| 'photo'
|
|
2914
|
+
| 'photography'
|
|
2915
|
+
| 'psychedelic'
|
|
2916
|
+
| 'retro-fantasy'
|
|
2917
|
+
| 'scifi-concept-art'
|
|
2918
|
+
| 'space'
|
|
2919
|
+
| 'standard'
|
|
2920
|
+
| 'whimsical';
|
|
2921
|
+
|
|
2922
|
+
/**
|
|
2923
|
+
* The higher the value the more it will look like the style image(s)
|
|
2924
|
+
*/
|
|
2925
|
+
styleFidelity?: number;
|
|
2926
|
+
|
|
2927
|
+
/**
|
|
2928
|
+
* List of style images. Most of the time, only one image is enough. It must be
|
|
2929
|
+
* existing AssetIds.
|
|
2930
|
+
*/
|
|
2931
|
+
styleImages?: Array<string>;
|
|
2932
|
+
|
|
2933
|
+
/**
|
|
2934
|
+
* Condition the influence of the style image(s). The higher the value, the more
|
|
2935
|
+
* the style images will influence the upscaled image.
|
|
2936
|
+
*/
|
|
2937
|
+
styleImagesFidelity?: number;
|
|
2938
|
+
|
|
2939
|
+
/**
|
|
2940
|
+
* The target height of the output image.
|
|
2941
|
+
*/
|
|
2942
|
+
targetHeight?: number;
|
|
2943
|
+
|
|
2944
|
+
/**
|
|
2945
|
+
* Target width for the upscaled image, take priority over scaling factor
|
|
2946
|
+
*/
|
|
2947
|
+
targetWidth?: number;
|
|
2948
|
+
|
|
2949
|
+
/**
|
|
2950
|
+
* A textual description / keywords describing the object of interest.
|
|
2951
|
+
*/
|
|
2952
|
+
text?: string;
|
|
2953
|
+
|
|
2954
|
+
/**
|
|
2955
|
+
* The asset to convert in texture maps. Must reference an existing AssetId.
|
|
2956
|
+
*/
|
|
2957
|
+
texture?: string;
|
|
2958
|
+
|
|
2959
|
+
/**
|
|
2960
|
+
* The thumbnail of the canvas
|
|
2961
|
+
*/
|
|
2962
|
+
thumbnail?: Metadata.Thumbnail;
|
|
2963
|
+
|
|
2964
|
+
/**
|
|
2965
|
+
* If set to true, during the upscaling process, the model will match tiles of the
|
|
2966
|
+
* source image with tiles of the style image(s). This will result in a more
|
|
2967
|
+
* coherent restyle. Works best with style images that have a similar composition.
|
|
2968
|
+
*/
|
|
2969
|
+
tileStyle?: boolean;
|
|
2970
|
+
|
|
2971
|
+
trainingImage?: boolean;
|
|
2972
|
+
|
|
2973
|
+
/**
|
|
2974
|
+
* (deprecated) Vertical expansion ratio.
|
|
2975
|
+
*/
|
|
2976
|
+
verticalExpansionRatio?: number;
|
|
2977
|
+
|
|
2978
|
+
/**
|
|
2979
|
+
* The width of the rendered image.
|
|
2980
|
+
*/
|
|
2981
|
+
width?: number;
|
|
2982
|
+
}
|
|
2983
|
+
|
|
2984
|
+
export namespace Metadata {
|
|
2985
|
+
export interface Concept {
|
|
2986
|
+
/**
|
|
2987
|
+
* The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w")
|
|
2988
|
+
*/
|
|
2989
|
+
modelId: string;
|
|
2990
|
+
|
|
2991
|
+
/**
|
|
2992
|
+
* The scale of the model (example: 1.0) For Flux Kontext Prompt Editing, the scale
|
|
2993
|
+
* is between 0 and 2.
|
|
2994
|
+
*/
|
|
2995
|
+
scale: number;
|
|
2996
|
+
|
|
2997
|
+
/**
|
|
2998
|
+
* The epoch of the model (example: "000001") Only available for Flux Lora Trained
|
|
2999
|
+
* models
|
|
3000
|
+
*/
|
|
3001
|
+
modelEpoch?: string;
|
|
3002
|
+
}
|
|
3003
|
+
|
|
3004
|
+
/**
|
|
3005
|
+
* The thumbnail of the canvas
|
|
3006
|
+
*/
|
|
3007
|
+
export interface Thumbnail {
|
|
3008
|
+
/**
|
|
3009
|
+
* The AssetId of the image used as a thumbnail for the canvas (example:
|
|
3010
|
+
* "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
3011
|
+
*/
|
|
3012
|
+
assetId: string;
|
|
3013
|
+
|
|
3014
|
+
/**
|
|
3015
|
+
* The url of the image used as a thumbnail for the canvas
|
|
3016
|
+
*/
|
|
3017
|
+
url: string;
|
|
3018
|
+
}
|
|
3019
|
+
}
|
|
3020
|
+
|
|
3021
|
+
/**
|
|
3022
|
+
* The properties of the asset, content may depend on the kind of asset returned
|
|
3023
|
+
*/
|
|
3024
|
+
export interface Properties {
|
|
3025
|
+
size: number;
|
|
3026
|
+
|
|
3027
|
+
/**
|
|
3028
|
+
* Number of animation frames if animations exist
|
|
3029
|
+
*/
|
|
3030
|
+
animationFrameCount?: number;
|
|
3031
|
+
|
|
3032
|
+
/**
|
|
3033
|
+
* Bitrate of the media in bits per second
|
|
3034
|
+
*/
|
|
3035
|
+
bitrate?: number;
|
|
3036
|
+
|
|
3037
|
+
/**
|
|
3038
|
+
* Number of bones if skeleton exists
|
|
3039
|
+
*/
|
|
3040
|
+
boneCount?: number;
|
|
3041
|
+
|
|
3042
|
+
/**
|
|
3043
|
+
* Number of channels of the audio
|
|
3044
|
+
*/
|
|
3045
|
+
channels?: number;
|
|
3046
|
+
|
|
3047
|
+
/**
|
|
3048
|
+
* Classification of the audio
|
|
3049
|
+
*/
|
|
3050
|
+
classification?: 'effect' | 'interview' | 'music' | 'other' | 'sound' | 'speech' | 'text' | 'unknown';
|
|
3051
|
+
|
|
3052
|
+
/**
|
|
3053
|
+
* Codec name of the media
|
|
3054
|
+
*/
|
|
3055
|
+
codecName?: string;
|
|
3056
|
+
|
|
3057
|
+
/**
|
|
3058
|
+
* Description of the audio
|
|
3059
|
+
*/
|
|
3060
|
+
description?: string;
|
|
3061
|
+
|
|
3062
|
+
/**
|
|
3063
|
+
* Bounding box dimensions [width, height, depth]
|
|
3064
|
+
*/
|
|
3065
|
+
dimensions?: Array<unknown>;
|
|
3066
|
+
|
|
3067
|
+
/**
|
|
3068
|
+
* Duration of the media in seconds
|
|
3069
|
+
*/
|
|
3070
|
+
duration?: number;
|
|
3071
|
+
|
|
3072
|
+
/**
|
|
3073
|
+
* Number of faces/triangles in the mesh
|
|
3074
|
+
*/
|
|
3075
|
+
faceCount?: number;
|
|
3076
|
+
|
|
3077
|
+
/**
|
|
3078
|
+
* Format of the mesh file (e.g. 'glb', etc.)
|
|
3079
|
+
*/
|
|
3080
|
+
format?: string;
|
|
3081
|
+
|
|
3082
|
+
/**
|
|
3083
|
+
* Frame rate of the video in frames per second
|
|
3084
|
+
*/
|
|
3085
|
+
frameRate?: number;
|
|
3086
|
+
|
|
3087
|
+
/**
|
|
3088
|
+
* Whether the mesh has animations
|
|
3089
|
+
*/
|
|
3090
|
+
hasAnimations?: boolean;
|
|
3091
|
+
|
|
3092
|
+
/**
|
|
3093
|
+
* Whether the mesh has normal vectors
|
|
3094
|
+
*/
|
|
3095
|
+
hasNormals?: boolean;
|
|
3096
|
+
|
|
3097
|
+
/**
|
|
3098
|
+
* Whether the mesh has bones/skeleton
|
|
3099
|
+
*/
|
|
3100
|
+
hasSkeleton?: boolean;
|
|
3101
|
+
|
|
3102
|
+
/**
|
|
3103
|
+
* Whether the mesh has UV coordinates
|
|
3104
|
+
*/
|
|
3105
|
+
hasUVs?: boolean;
|
|
3106
|
+
|
|
3107
|
+
height?: number;
|
|
3108
|
+
|
|
3109
|
+
/**
|
|
3110
|
+
* Number of frames in the video
|
|
3111
|
+
*/
|
|
3112
|
+
nbFrames?: number;
|
|
3113
|
+
|
|
3114
|
+
/**
|
|
3115
|
+
* Sample rate of the media in Hz
|
|
3116
|
+
*/
|
|
3117
|
+
sampleRate?: number;
|
|
3118
|
+
|
|
3119
|
+
/**
|
|
3120
|
+
* Transcription of the audio
|
|
3121
|
+
*/
|
|
3122
|
+
transcription?: Properties.Transcription;
|
|
3123
|
+
|
|
3124
|
+
/**
|
|
3125
|
+
* Number of vertices in the mesh
|
|
3126
|
+
*/
|
|
3127
|
+
vertexCount?: number;
|
|
3128
|
+
|
|
3129
|
+
width?: number;
|
|
3130
|
+
}
|
|
3131
|
+
|
|
3132
|
+
export namespace Properties {
|
|
3133
|
+
/**
|
|
3134
|
+
* Transcription of the audio
|
|
3135
|
+
*/
|
|
3136
|
+
export interface Transcription {
|
|
3137
|
+
text: string;
|
|
3138
|
+
}
|
|
3139
|
+
}
|
|
3140
|
+
|
|
3141
|
+
/**
|
|
3142
|
+
* The video asset's first frame.
|
|
3143
|
+
*
|
|
3144
|
+
* Contains the assetId and the url of the first frame.
|
|
3145
|
+
*/
|
|
3146
|
+
export interface FirstFrame {
|
|
3147
|
+
assetId: string;
|
|
3148
|
+
|
|
3149
|
+
url: string;
|
|
3150
|
+
}
|
|
3151
|
+
|
|
3152
|
+
/**
|
|
3153
|
+
* The video asset's last frame.
|
|
3154
|
+
*
|
|
3155
|
+
* Contains the assetId and the url of the last frame.
|
|
3156
|
+
*/
|
|
3157
|
+
export interface LastFrame {
|
|
3158
|
+
assetId: string;
|
|
3159
|
+
|
|
3160
|
+
url: string;
|
|
3161
|
+
}
|
|
3162
|
+
|
|
3163
|
+
/**
|
|
3164
|
+
* The asset's preview.
|
|
3165
|
+
*
|
|
3166
|
+
* Contains the assetId and the url of the preview.
|
|
3167
|
+
*/
|
|
3168
|
+
export interface Preview {
|
|
3169
|
+
assetId: string;
|
|
3170
|
+
|
|
3171
|
+
url: string;
|
|
3172
|
+
}
|
|
3173
|
+
|
|
3174
|
+
/**
|
|
3175
|
+
* The asset's thumbnail.
|
|
3176
|
+
*
|
|
3177
|
+
* Contains the assetId and the url of the thumbnail.
|
|
3178
|
+
*/
|
|
3179
|
+
export interface Thumbnail {
|
|
3180
|
+
assetId: string;
|
|
3181
|
+
|
|
3182
|
+
url: string;
|
|
3183
|
+
}
|
|
3184
|
+
}
|
|
3185
|
+
|
|
3186
|
+
/**
|
|
3187
|
+
* The inference parameters used to generate the asset
|
|
3188
|
+
*/
|
|
3189
|
+
export interface InferenceParameters {
|
|
3190
|
+
/**
|
|
3191
|
+
* Full text prompt including the model placeholder. (example: "an illustration of
|
|
3192
|
+
* phoenix in a fantasy world, flying over a mountain, 8k, bokeh effect")
|
|
3193
|
+
*/
|
|
3194
|
+
prompt: string;
|
|
3195
|
+
|
|
3196
|
+
/**
|
|
3197
|
+
* The type of inference to use. Example: txt2img, img2img, etc.
|
|
3198
|
+
*
|
|
3199
|
+
* Selecting the right type will condition the expected parameters.
|
|
3200
|
+
*
|
|
3201
|
+
* Note: if model.type is `sd-xl*` or `sd-1_5*`, when using the `"inpaint"`
|
|
3202
|
+
* inference type, Scenario determines the best available `baseModel` for a given
|
|
3203
|
+
* `modelId`: one of `["stable-diffusion-inpainting",
|
|
3204
|
+
* "stable-diffusion-xl-1.0-inpainting-0.1"] will be used.
|
|
3205
|
+
*/
|
|
3206
|
+
type:
|
|
3207
|
+
| 'controlnet'
|
|
3208
|
+
| 'controlnet_img2img'
|
|
3209
|
+
| 'controlnet_inpaint'
|
|
3210
|
+
| 'controlnet_inpaint_ip_adapter'
|
|
3211
|
+
| 'controlnet_ip_adapter'
|
|
3212
|
+
| 'controlnet_reference'
|
|
3213
|
+
| 'controlnet_texture'
|
|
3214
|
+
| 'img2img'
|
|
3215
|
+
| 'img2img_ip_adapter'
|
|
3216
|
+
| 'img2img_texture'
|
|
3217
|
+
| 'inpaint'
|
|
3218
|
+
| 'inpaint_ip_adapter'
|
|
3219
|
+
| 'outpaint'
|
|
3220
|
+
| 'reference'
|
|
3221
|
+
| 'reference_texture'
|
|
3222
|
+
| 'txt2img'
|
|
3223
|
+
| 'txt2img_ip_adapter'
|
|
3224
|
+
| 'txt2img_texture';
|
|
3225
|
+
|
|
3226
|
+
/**
|
|
3227
|
+
* The aspect ratio of the generated images. Only used for the model
|
|
3228
|
+
* flux.1.1-pro-ultra. The aspect ratio is a string formatted as "width:height"
|
|
3229
|
+
* (example: "16:9").
|
|
3230
|
+
*/
|
|
3231
|
+
aspectRatio?: '16:9' | '1:1' | '21:9' | '2:3' | '3:2' | '3:4' | '4:3' | '4:5' | '5:4' | '9:16' | '9:21';
|
|
3232
|
+
|
|
3233
|
+
/**
|
|
3234
|
+
* The base model to use for the inference. Only Flux LoRA models can use this
|
|
3235
|
+
* parameter. Allowed values are available in the model's attribute:
|
|
3236
|
+
* `compliantModelIds`
|
|
3237
|
+
*/
|
|
3238
|
+
baseModelId?: string;
|
|
3239
|
+
|
|
3240
|
+
concepts?: Array<InferenceParameters.Concept>;
|
|
3241
|
+
|
|
3242
|
+
/**
|
|
3243
|
+
* Specifies how long the ControlNet guidance should be applied during the
|
|
3244
|
+
* inference process.
|
|
3245
|
+
*
|
|
3246
|
+
* Only available for Flux.1-dev based models.
|
|
3247
|
+
*
|
|
3248
|
+
* The value represents the percentage of total inference steps where the
|
|
3249
|
+
* ControlNet guidance is active. For example:
|
|
3250
|
+
*
|
|
3251
|
+
* - 1.0: ControlNet guidance is applied during all inference steps
|
|
3252
|
+
* - 0.5: ControlNet guidance is only applied during the first half of inference
|
|
3253
|
+
* steps
|
|
3254
|
+
*
|
|
3255
|
+
* Default values:
|
|
3256
|
+
*
|
|
3257
|
+
* - 0.5 for Canny modality
|
|
3258
|
+
* - 0.6 for all other modalities
|
|
3259
|
+
*/
|
|
3260
|
+
controlEnd?: number;
|
|
3261
|
+
|
|
3262
|
+
/**
|
|
3263
|
+
* Signed URL to display the controlnet input image
|
|
3264
|
+
*/
|
|
3265
|
+
controlImage?: string;
|
|
3266
|
+
|
|
3267
|
+
/**
|
|
3268
|
+
* Asset id of the controlnet input image
|
|
3269
|
+
*/
|
|
3270
|
+
controlImageId?: string;
|
|
3271
|
+
|
|
3272
|
+
/**
|
|
3273
|
+
* Specifies the starting point of the ControlNet guidance during the inference
|
|
3274
|
+
* process.
|
|
3275
|
+
*
|
|
3276
|
+
* Only available for Flux.1-dev based models.
|
|
3277
|
+
*
|
|
3278
|
+
* The value represents the percentage of total inference steps where the
|
|
3279
|
+
* ControlNet guidance starts. For example:
|
|
3280
|
+
*
|
|
3281
|
+
* - 0.0: ControlNet guidance starts at the beginning of the inference steps
|
|
3282
|
+
* - 0.5: ControlNet guidance starts at the middle of the inference steps
|
|
3283
|
+
*/
|
|
3284
|
+
controlStart?: number;
|
|
3285
|
+
|
|
3286
|
+
/**
|
|
3287
|
+
* If set to true, the entire input image will likely change during inpainting.
|
|
3288
|
+
* This results in faster inferences, but the output image will be harder to
|
|
3289
|
+
* integrate if the input is just a small part of a larger image.
|
|
3290
|
+
*/
|
|
3291
|
+
disableMerging?: boolean;
|
|
3292
|
+
|
|
3293
|
+
/**
|
|
3294
|
+
* If false, the process uses the given image to detect the modality. If true
|
|
3295
|
+
* (default), the process will not try to detect the modality of the given image.
|
|
3296
|
+
*
|
|
3297
|
+
* For example: with `pose` modality and `false` value, the process will detect the
|
|
3298
|
+
* pose of people in the given image with `depth` modality and `false` value, the
|
|
3299
|
+
* process will detect the depth of the given image with `scribble` modality and
|
|
3300
|
+
* `true`value, the process will use the given image as a scribble
|
|
3301
|
+
*
|
|
3302
|
+
* ⚠️ For models of the FLUX schnell or dev families, this parameter is ignored.
|
|
3303
|
+
* The modality detection is always disabled. ⚠️
|
|
3304
|
+
*/
|
|
3305
|
+
disableModalityDetection?: boolean;
|
|
3306
|
+
|
|
3307
|
+
/**
|
|
3308
|
+
* Controls how closely the generated image follows the prompt. Higher values
|
|
3309
|
+
* result in stronger adherence to the prompt. Default and allowed values depend on
|
|
3310
|
+
* the model type:
|
|
3311
|
+
*
|
|
3312
|
+
* - For Flux dev models, the default is 3.5 and allowed values are within [0, 10]
|
|
3313
|
+
* - For Flux pro models, the default is 3 and allowed values are within [2, 5]
|
|
3314
|
+
* - For SDXL models, the default is 6 and allowed values are within [0, 20]
|
|
3315
|
+
* - For SD1.5 models, the default is 7.5 and allowed values are within [0, 20]
|
|
3316
|
+
*/
|
|
3317
|
+
guidance?: number;
|
|
3318
|
+
|
|
3319
|
+
/**
|
|
3320
|
+
* The height of the generated images, must be a 8 multiple (within [64, 2048],
|
|
3321
|
+
* default: 512) If model.type is `sd-xl`, `sd-xl-lora`, `sd-xl-composition` the
|
|
3322
|
+
* height must be within [512, 2048] If model.type is `sd-1_5`, the height must be
|
|
3323
|
+
* within [64, 1024] If model.type is `flux.1.1-pro-ultra`, you can use the
|
|
3324
|
+
* aspectRatio parameter instead
|
|
3325
|
+
*/
|
|
3326
|
+
height?: number;
|
|
3327
|
+
|
|
3328
|
+
/**
|
|
3329
|
+
* If set, generated assets will be hidden and not returned in the list of images
|
|
3330
|
+
* of the inference or when listing assets (default: false)
|
|
3331
|
+
*/
|
|
3332
|
+
hideResults?: boolean;
|
|
3333
|
+
|
|
3334
|
+
/**
|
|
3335
|
+
* Signed URL to display the input image
|
|
3336
|
+
*/
|
|
3337
|
+
image?: string;
|
|
3338
|
+
|
|
3339
|
+
/**
|
|
3340
|
+
* Asset id of the input image
|
|
3341
|
+
*/
|
|
3342
|
+
imageId?: string;
|
|
3343
|
+
|
|
3344
|
+
/**
|
|
3345
|
+
* Enable or disable the intermediate images generation (default: false)
|
|
3346
|
+
*/
|
|
3347
|
+
intermediateImages?: boolean;
|
|
3348
|
+
|
|
3349
|
+
/**
|
|
3350
|
+
* Signed URL to display the IpAdapter image
|
|
3351
|
+
*/
|
|
3352
|
+
ipAdapterImage?: string;
|
|
3353
|
+
|
|
3354
|
+
/**
|
|
3355
|
+
* Asset id of the input IpAdapter image
|
|
3356
|
+
*/
|
|
3357
|
+
ipAdapterImageId?: string;
|
|
3358
|
+
|
|
3359
|
+
/**
|
|
3360
|
+
* Asset id of the input IpAdapter images
|
|
3361
|
+
*/
|
|
3362
|
+
ipAdapterImageIds?: Array<string>;
|
|
3363
|
+
|
|
3364
|
+
/**
|
|
3365
|
+
* Signed URL to display the IpAdapter images
|
|
3366
|
+
*/
|
|
3367
|
+
ipAdapterImages?: Array<string>;
|
|
3368
|
+
|
|
3369
|
+
/**
|
|
3370
|
+
* IpAdapter scale factor (within [0.0, 1.0], default: 0.9).
|
|
3371
|
+
*/
|
|
3372
|
+
ipAdapterScale?: number;
|
|
3373
|
+
|
|
3374
|
+
/**
|
|
3375
|
+
* IpAdapter scale factors (within [0.0, 1.0], default: 0.9).
|
|
3376
|
+
*/
|
|
3377
|
+
ipAdapterScales?: Array<number>;
|
|
3378
|
+
|
|
3379
|
+
/**
|
|
3380
|
+
* The type of IP Adapter model to use. Must be one of [`style`, `character`],
|
|
3381
|
+
* default to `style``
|
|
3382
|
+
*/
|
|
3383
|
+
ipAdapterType?: 'character' | 'style';
|
|
3384
|
+
|
|
3385
|
+
/**
|
|
3386
|
+
* Signed URL to display the mask image
|
|
3387
|
+
*/
|
|
3388
|
+
mask?: string;
|
|
3389
|
+
|
|
3390
|
+
/**
|
|
3391
|
+
* Asset id of the mask image
|
|
3392
|
+
*/
|
|
3393
|
+
maskId?: string;
|
|
3394
|
+
|
|
3395
|
+
/**
|
|
3396
|
+
* The modality associated with the control image used for the generation: it can
|
|
3397
|
+
* either be an object with a combination of maximum
|
|
3398
|
+
*
|
|
3399
|
+
* For models of SD1.5 family:
|
|
3400
|
+
*
|
|
3401
|
+
* - up to 3 modalities from `canny`, `pose`, `depth`, `lines`, `seg`, `scribble`,
|
|
3402
|
+
* `lineart`, `normal-map`, `illusion`
|
|
3403
|
+
* - or one of the following presets: `character`, `landscape`, `city`, `interior`.
|
|
3404
|
+
*
|
|
3405
|
+
* For models of the SDXL family:
|
|
3406
|
+
*
|
|
3407
|
+
* - up to 3 modalities from `canny`, `pose`, `depth`, `seg`, `illusion`,
|
|
3408
|
+
* `scribble`
|
|
3409
|
+
* - or one of the following presets: `character`, `landscape`.
|
|
3410
|
+
*
|
|
3411
|
+
* For models of the FLUX schnell or dev families:
|
|
3412
|
+
*
|
|
3413
|
+
* - one modality from: `canny`, `tile`, `depth`, `blur`, `pose`, `gray`,
|
|
3414
|
+
* `low-quality`
|
|
3415
|
+
*
|
|
3416
|
+
* Optionally, you can associate a value to these modalities or presets. The value
|
|
3417
|
+
* must be within `]0.0, 1.0]`.
|
|
3418
|
+
*
|
|
3419
|
+
* Examples:
|
|
3420
|
+
*
|
|
3421
|
+
* - `canny`
|
|
3422
|
+
* - `depth:0.5,pose:1.0`
|
|
3423
|
+
* - `canny:0.5,depth:0.5,lines:0.3`
|
|
3424
|
+
* - `landscape`
|
|
3425
|
+
* - `character:0.5`
|
|
3426
|
+
* - `illusion:1`
|
|
3427
|
+
*
|
|
3428
|
+
* Note: if you use a value that is not supported by the model family, this will
|
|
3429
|
+
* result in an error.
|
|
3430
|
+
*/
|
|
3431
|
+
modality?:
|
|
3432
|
+
| 'blur'
|
|
3433
|
+
| 'canny'
|
|
3434
|
+
| 'depth'
|
|
3435
|
+
| 'gray'
|
|
3436
|
+
| 'illusion'
|
|
3437
|
+
| 'lineart'
|
|
3438
|
+
| 'lines'
|
|
3439
|
+
| 'low-quality'
|
|
3440
|
+
| 'normal-map'
|
|
3441
|
+
| 'pose'
|
|
3442
|
+
| 'scribble'
|
|
3443
|
+
| 'seg'
|
|
3444
|
+
| 'sketch'
|
|
3445
|
+
| 'tile';
|
|
3446
|
+
|
|
3447
|
+
/**
|
|
3448
|
+
* The epoch of the model to use for the inference. Only available for Flux Lora
|
|
3449
|
+
* Trained models.
|
|
3450
|
+
*/
|
|
3451
|
+
modelEpoch?: string;
|
|
3452
|
+
|
|
3453
|
+
/**
|
|
3454
|
+
* The prompt not to guide the image generation, ignored when guidance < 1
|
|
3455
|
+
* (example: "((ugly face))") For Flux based model (not Fast-Flux): requires
|
|
3456
|
+
* negativePromptStrength > 0 and active only for inference types txt2img / img2img
|
|
3457
|
+
* / controlnet.
|
|
3458
|
+
*/
|
|
3459
|
+
negativePrompt?: string;
|
|
3460
|
+
|
|
3461
|
+
/**
|
|
3462
|
+
* Only applicable for flux-dev based models for `txt2img`, `img2img`, and
|
|
3463
|
+
* `controlnet` inference types.
|
|
3464
|
+
*
|
|
3465
|
+
* Controls the influence of the negative prompt. Default 0 means the negative
|
|
3466
|
+
* prompt has no effect. Higher values increase negative prompt influence. Must
|
|
3467
|
+
* be > 0 if negativePrompt is provided.
|
|
3468
|
+
*/
|
|
3469
|
+
negativePromptStrength?: number;
|
|
3470
|
+
|
|
3471
|
+
/**
|
|
3472
|
+
* The number of denoising steps for each image generation (within [1, 150],
|
|
3473
|
+
* default: 30)
|
|
3474
|
+
*/
|
|
3475
|
+
numInferenceSteps?: number;
|
|
3476
|
+
|
|
3477
|
+
/**
|
|
3478
|
+
* The number of images to generate (within [1, 128], default: 4)
|
|
3479
|
+
*/
|
|
3480
|
+
numSamples?: number;
|
|
3481
|
+
|
|
3482
|
+
/**
|
|
3483
|
+
* Whether to use reference adain Only for "reference" inference type
|
|
3484
|
+
*/
|
|
3485
|
+
referenceAdain?: boolean;
|
|
3486
|
+
|
|
3487
|
+
/**
|
|
3488
|
+
* Whether to use reference query for self attention's context Only for "reference"
|
|
3489
|
+
* inference type
|
|
3490
|
+
*/
|
|
3491
|
+
referenceAttn?: boolean;
|
|
3492
|
+
|
|
3493
|
+
/**
|
|
3494
|
+
* The scheduler to use to override the default configured for the model. See
|
|
3495
|
+
* detailed documentation for more details.
|
|
3496
|
+
*/
|
|
3497
|
+
scheduler?:
|
|
3498
|
+
| 'DDIMScheduler'
|
|
3499
|
+
| 'DDPMScheduler'
|
|
3500
|
+
| 'DEISMultistepScheduler'
|
|
3501
|
+
| 'DPMSolverMultistepScheduler'
|
|
3502
|
+
| 'DPMSolverSinglestepScheduler'
|
|
3503
|
+
| 'EulerAncestralDiscreteScheduler'
|
|
3504
|
+
| 'EulerDiscreteScheduler'
|
|
3505
|
+
| 'HeunDiscreteScheduler'
|
|
3506
|
+
| 'KDPM2AncestralDiscreteScheduler'
|
|
3507
|
+
| 'KDPM2DiscreteScheduler'
|
|
3508
|
+
| 'LCMScheduler'
|
|
3509
|
+
| 'LMSDiscreteScheduler'
|
|
3510
|
+
| 'PNDMScheduler'
|
|
3511
|
+
| 'TCDScheduler'
|
|
3512
|
+
| 'UniPCMultistepScheduler';
|
|
3513
|
+
|
|
3514
|
+
/**
|
|
3515
|
+
* Used to reproduce previous results. Default: randomly generated number.
|
|
3516
|
+
*/
|
|
3517
|
+
seed?: string;
|
|
3518
|
+
|
|
3519
|
+
/**
|
|
3520
|
+
* Controls the noise intensity introduced to the input image, where a value of 1.0
|
|
3521
|
+
* completely erases the original image's details. Available for img2img and
|
|
3522
|
+
* inpainting. (within [0.01, 1.0], default: 0.75)
|
|
3523
|
+
*/
|
|
3524
|
+
strength?: number;
|
|
3525
|
+
|
|
3526
|
+
/**
|
|
3527
|
+
* If style_fidelity=1.0, control more important, else if style_fidelity=0.0,
|
|
3528
|
+
* prompt more important, else balanced Only for "reference" inference type
|
|
3529
|
+
*/
|
|
3530
|
+
styleFidelity?: number;
|
|
3531
|
+
|
|
3532
|
+
/**
|
|
3533
|
+
* The width of the generated images, must be a 8 multiple (within [64, 2048],
|
|
3534
|
+
* default: 512) If model.type is `sd-xl`, `sd-xl-lora`, `sd-xl-composition` the
|
|
3535
|
+
* width must be within [512, 2048] If model.type is `sd-1_5`, the width must be
|
|
3536
|
+
* within [64, 1024] If model.type is `flux.1.1-pro-ultra`, you can use the
|
|
3537
|
+
* aspectRatio parameter instead
|
|
3538
|
+
*/
|
|
3539
|
+
width?: number;
|
|
3540
|
+
}
|
|
3541
|
+
|
|
3542
|
+
export namespace InferenceParameters {
|
|
3543
|
+
export interface Concept {
|
|
3544
|
+
/**
|
|
3545
|
+
* The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w")
|
|
3546
|
+
*/
|
|
3547
|
+
modelId: string;
|
|
3548
|
+
|
|
3549
|
+
/**
|
|
3550
|
+
* The scale of the model (example: 1.0) For Flux Kontext Prompt Editing, the scale
|
|
3551
|
+
* is between 0 and 2.
|
|
3552
|
+
*/
|
|
3553
|
+
scale: number;
|
|
3554
|
+
|
|
3555
|
+
/**
|
|
3556
|
+
* The epoch of the model (example: "000001") Only available for Flux Lora Trained
|
|
3557
|
+
* models
|
|
3558
|
+
*/
|
|
3559
|
+
modelEpoch?: string;
|
|
3560
|
+
}
|
|
3561
|
+
}
|
|
3562
|
+
|
|
3563
|
+
/**
|
|
3564
|
+
* The job associated with the asset
|
|
3565
|
+
*/
|
|
3566
|
+
export interface Job {
|
|
3567
|
+
/**
|
|
3568
|
+
* The job creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
|
|
3569
|
+
*/
|
|
3570
|
+
createdAt: string;
|
|
3571
|
+
|
|
3572
|
+
/**
|
|
3573
|
+
* The job ID (example: "job_ocZCnG1Df35XRL1QyCZSRxAG8")
|
|
3574
|
+
*/
|
|
3575
|
+
jobId: string;
|
|
3576
|
+
|
|
3577
|
+
/**
|
|
3578
|
+
* The type of job
|
|
3579
|
+
*/
|
|
3580
|
+
jobType:
|
|
3581
|
+
| 'assets-download'
|
|
3582
|
+
| 'canvas-export'
|
|
3583
|
+
| 'caption'
|
|
3584
|
+
| 'caption-llava'
|
|
3585
|
+
| 'custom'
|
|
3586
|
+
| 'describe-style'
|
|
3587
|
+
| 'detection'
|
|
3588
|
+
| 'embed'
|
|
3589
|
+
| 'flux'
|
|
3590
|
+
| 'flux-model-training'
|
|
3591
|
+
| 'generate-prompt'
|
|
3592
|
+
| 'image-generation'
|
|
3593
|
+
| 'image-prompt-editing'
|
|
3594
|
+
| 'inference'
|
|
3595
|
+
| 'mesh-preview-rendering'
|
|
3596
|
+
| 'model-download'
|
|
3597
|
+
| 'model-import'
|
|
3598
|
+
| 'model-training'
|
|
3599
|
+
| 'openai-image-generation'
|
|
3600
|
+
| 'patch-image'
|
|
3601
|
+
| 'pixelate'
|
|
3602
|
+
| 'reframe'
|
|
3603
|
+
| 'remove-background'
|
|
3604
|
+
| 'repaint'
|
|
3605
|
+
| 'restyle'
|
|
3606
|
+
| 'segment'
|
|
3607
|
+
| 'skybox-3d'
|
|
3608
|
+
| 'skybox-base-360'
|
|
3609
|
+
| 'skybox-hdri'
|
|
3610
|
+
| 'skybox-upscale-360'
|
|
3611
|
+
| 'texture'
|
|
3612
|
+
| 'translate'
|
|
3613
|
+
| 'upload'
|
|
3614
|
+
| 'upscale'
|
|
3615
|
+
| 'upscale-skybox'
|
|
3616
|
+
| 'upscale-texture'
|
|
3617
|
+
| 'vectorize'
|
|
3618
|
+
| 'workflow';
|
|
3619
|
+
|
|
3620
|
+
/**
|
|
3621
|
+
* Metadata of the job with some additional information
|
|
3622
|
+
*/
|
|
3623
|
+
metadata: Job.Metadata;
|
|
3624
|
+
|
|
3625
|
+
/**
|
|
3626
|
+
* Progress of the job (between 0 and 1)
|
|
3627
|
+
*/
|
|
3628
|
+
progress: number;
|
|
3629
|
+
|
|
3630
|
+
/**
|
|
3631
|
+
* The current status of the job
|
|
3632
|
+
*/
|
|
3633
|
+
status:
|
|
3634
|
+
| 'canceled'
|
|
3635
|
+
| 'failure'
|
|
3636
|
+
| 'finalizing'
|
|
3637
|
+
| 'in-progress'
|
|
3638
|
+
| 'pending'
|
|
3639
|
+
| 'queued'
|
|
3640
|
+
| 'success'
|
|
3641
|
+
| 'warming-up';
|
|
3642
|
+
|
|
3643
|
+
/**
|
|
3644
|
+
* The history of the different statuses the job went through with the ISO string
|
|
3645
|
+
* date of when the job reached each statuses.
|
|
3646
|
+
*/
|
|
3647
|
+
statusHistory: Array<Job.StatusHistory>;
|
|
3648
|
+
|
|
3649
|
+
/**
|
|
3650
|
+
* The job last update date as an ISO string (example: "2023-02-03T11:19:41.579Z")
|
|
3651
|
+
*/
|
|
3652
|
+
updatedAt: string;
|
|
3653
|
+
|
|
3654
|
+
/**
|
|
3655
|
+
* The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea")
|
|
3656
|
+
*/
|
|
3657
|
+
authorId?: string;
|
|
3658
|
+
|
|
3659
|
+
/**
|
|
3660
|
+
* The billing of the job
|
|
3661
|
+
*/
|
|
3662
|
+
billing?: Job.Billing;
|
|
3663
|
+
|
|
3664
|
+
/**
|
|
3665
|
+
* The owner ID (example: "team_U3Qmc8PCdWXwAQJ4Dvw4tV6D")
|
|
3666
|
+
*/
|
|
3667
|
+
ownerId?: string;
|
|
3668
|
+
}
|
|
3669
|
+
|
|
3670
|
+
export namespace Job {
|
|
3671
|
+
/**
|
|
3672
|
+
* Metadata of the job with some additional information
|
|
3673
|
+
*/
|
|
3674
|
+
export interface Metadata {
|
|
3675
|
+
/**
|
|
3676
|
+
* List of produced assets for this job
|
|
3677
|
+
*/
|
|
3678
|
+
assetIds?: Array<string>;
|
|
3679
|
+
|
|
3680
|
+
/**
|
|
3681
|
+
* The flow of the job. Only available for workflow jobs.
|
|
3682
|
+
*/
|
|
3683
|
+
flow?: Array<Metadata.Flow>;
|
|
3684
|
+
|
|
3685
|
+
/**
|
|
3686
|
+
* The inputs for the job
|
|
3687
|
+
*/
|
|
3688
|
+
input?: unknown;
|
|
3689
|
+
|
|
3690
|
+
/**
|
|
3691
|
+
* The output of the job
|
|
3692
|
+
*/
|
|
3693
|
+
output?: unknown;
|
|
3694
|
+
|
|
3695
|
+
/**
|
|
3696
|
+
* The workflow ID of the job if job is part of a workflow.
|
|
3697
|
+
*/
|
|
3698
|
+
workflowId?: string;
|
|
3699
|
+
|
|
3700
|
+
/**
|
|
3701
|
+
* The workflow job ID of the job if job is part of a workflow job.
|
|
3702
|
+
*/
|
|
3703
|
+
workflowJobId?: string;
|
|
3704
|
+
}
|
|
3705
|
+
|
|
3706
|
+
export namespace Metadata {
|
|
3707
|
+
export interface Flow {
|
|
3708
|
+
/**
|
|
3709
|
+
* The id of the node.
|
|
3710
|
+
*/
|
|
3711
|
+
id: string;
|
|
3712
|
+
|
|
3713
|
+
/**
|
|
3714
|
+
* The status of the node. Only available for WorkflowJob nodes.
|
|
3715
|
+
*/
|
|
3716
|
+
status: 'failure' | 'pending' | 'processing' | 'skipped' | 'success';
|
|
3717
|
+
|
|
3718
|
+
/**
|
|
3719
|
+
* The type of the job for the node.
|
|
3720
|
+
*/
|
|
3721
|
+
type:
|
|
3722
|
+
| 'custom-model'
|
|
3723
|
+
| 'generate-prompt'
|
|
3724
|
+
| 'logic'
|
|
3725
|
+
| 'remove-background'
|
|
3726
|
+
| 'transform'
|
|
3727
|
+
| 'user-approval'
|
|
3728
|
+
| 'workflow';
|
|
3729
|
+
|
|
3730
|
+
/**
|
|
3731
|
+
* List of produced assets for this node.
|
|
3732
|
+
*/
|
|
3733
|
+
assets?: Array<Flow.Asset>;
|
|
3734
|
+
|
|
3735
|
+
/**
|
|
3736
|
+
* The nodes that this node depends on. Only available for nodes that have
|
|
3737
|
+
* dependencies. Mainly used for user approval nodes.
|
|
3738
|
+
*/
|
|
3739
|
+
dependsOn?: Array<string>;
|
|
3740
|
+
|
|
3741
|
+
/**
|
|
3742
|
+
* The inputs of the node.
|
|
3743
|
+
*/
|
|
3744
|
+
inputs?: Array<Flow.Input>;
|
|
3745
|
+
|
|
3746
|
+
/**
|
|
3747
|
+
* If the flow is part of a WorkflowJob, this is the jobId for the node. jobId is
|
|
3748
|
+
* only available for nodes started. A node "Pending" for a running workflow job is
|
|
3749
|
+
* not started.
|
|
3750
|
+
*/
|
|
3751
|
+
jobId?: string;
|
|
3752
|
+
|
|
3753
|
+
/**
|
|
3754
|
+
* The logic of the node. Only available for logic nodes.
|
|
3755
|
+
*/
|
|
3756
|
+
logic?: Flow.Logic;
|
|
3757
|
+
|
|
3758
|
+
/**
|
|
3759
|
+
* The type of the logic for the node. Only available for logic nodes.
|
|
3760
|
+
*/
|
|
3761
|
+
logicType?: 'if-else';
|
|
3762
|
+
|
|
3763
|
+
/**
|
|
3764
|
+
* The model id for the node. Mainly used for custom model tasks.
|
|
3765
|
+
*/
|
|
3766
|
+
modelId?: string;
|
|
3767
|
+
|
|
3768
|
+
/**
|
|
3769
|
+
* The workflow id for the node. Mainly used for workflow tasks.
|
|
3770
|
+
*/
|
|
3771
|
+
workflowId?: string;
|
|
3772
|
+
}
|
|
3773
|
+
|
|
3774
|
+
export namespace Flow {
|
|
3775
|
+
export interface Asset {
|
|
3776
|
+
assetId: string;
|
|
3777
|
+
|
|
3778
|
+
url: string;
|
|
3779
|
+
}
|
|
3780
|
+
|
|
3781
|
+
/**
|
|
3782
|
+
* This is used to run the flow.
|
|
3783
|
+
*/
|
|
3784
|
+
export interface Input {
|
|
3785
|
+
/**
|
|
3786
|
+
* The name that must be user to call the model through the API
|
|
3787
|
+
*/
|
|
3788
|
+
name: string;
|
|
3789
|
+
|
|
3790
|
+
/**
|
|
3791
|
+
* The data type of the input
|
|
3792
|
+
*/
|
|
3793
|
+
type:
|
|
3794
|
+
| 'boolean'
|
|
3795
|
+
| 'file'
|
|
3796
|
+
| 'file_array'
|
|
3797
|
+
| 'inputs_array'
|
|
3798
|
+
| 'model'
|
|
3799
|
+
| 'model_array'
|
|
3800
|
+
| 'number'
|
|
3801
|
+
| 'number_array'
|
|
3802
|
+
| 'string'
|
|
3803
|
+
| 'string_array';
|
|
3804
|
+
|
|
3805
|
+
/**
|
|
3806
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
3807
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
3808
|
+
* dropdown.
|
|
3809
|
+
*/
|
|
3810
|
+
allowedValues?: Array<unknown>;
|
|
3811
|
+
|
|
3812
|
+
/**
|
|
3813
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
3814
|
+
* \`file_array\` input types with kind \`image\`.
|
|
3815
|
+
*/
|
|
3816
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
3817
|
+
|
|
3818
|
+
/**
|
|
3819
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
3820
|
+
*/
|
|
3821
|
+
color?: boolean;
|
|
3822
|
+
|
|
3823
|
+
/**
|
|
3824
|
+
* Whether this input affects the model's cost calculation
|
|
3825
|
+
*/
|
|
3826
|
+
costImpact?: boolean;
|
|
3827
|
+
|
|
3828
|
+
/**
|
|
3829
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
3830
|
+
*/
|
|
3831
|
+
description?: string;
|
|
3832
|
+
|
|
3833
|
+
/**
|
|
3834
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
3835
|
+
* value appear consecutively in the UI.
|
|
3836
|
+
*/
|
|
3837
|
+
group?: string;
|
|
3838
|
+
|
|
3839
|
+
/**
|
|
3840
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
3841
|
+
*/
|
|
3842
|
+
hint?: string;
|
|
3843
|
+
|
|
3844
|
+
/**
|
|
3845
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
3846
|
+
* the same as the current object. This is only available for type inputs_array
|
|
3847
|
+
* inputs.
|
|
3848
|
+
*/
|
|
3849
|
+
inputs?: Array<unknown>;
|
|
3850
|
+
|
|
3851
|
+
/**
|
|
3852
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
3853
|
+
* \`file_array\` input types.
|
|
3854
|
+
*/
|
|
3855
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
3856
|
+
|
|
3857
|
+
/**
|
|
3858
|
+
* The label displayed in the UI for this input
|
|
3859
|
+
*/
|
|
3860
|
+
label?: string;
|
|
3861
|
+
|
|
3862
|
+
/**
|
|
3863
|
+
* The name of the file input field to use as the mask source
|
|
3864
|
+
*/
|
|
3865
|
+
maskFrom?: string;
|
|
3866
|
+
|
|
3867
|
+
/**
|
|
3868
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
3869
|
+
* types.
|
|
3870
|
+
*/
|
|
3871
|
+
max?: number;
|
|
3872
|
+
|
|
3873
|
+
/**
|
|
3874
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
3875
|
+
* \`string_array\`.
|
|
3876
|
+
*/
|
|
3877
|
+
maxLength?: number;
|
|
3878
|
+
|
|
3879
|
+
/**
|
|
3880
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
3881
|
+
*/
|
|
3882
|
+
min?: number;
|
|
3883
|
+
|
|
3884
|
+
/**
|
|
3885
|
+
* The minimum allowed length for string inputs. Also applies to each item in
|
|
3886
|
+
* \`string_array\`.
|
|
3887
|
+
*/
|
|
3888
|
+
minLength?: number;
|
|
3889
|
+
|
|
3890
|
+
/**
|
|
3891
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
3892
|
+
* available for \`model_array\` input type.
|
|
3893
|
+
*/
|
|
3894
|
+
modelTypes?: Array<
|
|
3895
|
+
| 'custom'
|
|
3896
|
+
| 'flux.1'
|
|
3897
|
+
| 'flux.1-composition'
|
|
3898
|
+
| 'flux.1-kontext-dev'
|
|
3899
|
+
| 'flux.1-kontext-lora'
|
|
3900
|
+
| 'flux.1-krea-dev'
|
|
3901
|
+
| 'flux.1-krea-lora'
|
|
3902
|
+
| 'flux.1-lora'
|
|
3903
|
+
| 'flux.1-pro'
|
|
3904
|
+
| 'flux.1.1-pro-ultra'
|
|
3905
|
+
| 'flux1.1-pro'
|
|
3906
|
+
| 'gpt-image-1'
|
|
3907
|
+
| 'sd-1_5'
|
|
3908
|
+
| 'sd-1_5-composition'
|
|
3909
|
+
| 'sd-1_5-lora'
|
|
3910
|
+
| 'sd-xl'
|
|
3911
|
+
| 'sd-xl-composition'
|
|
3912
|
+
| 'sd-xl-lora'
|
|
3913
|
+
>;
|
|
3914
|
+
|
|
3915
|
+
/**
|
|
3916
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
3917
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
3918
|
+
*
|
|
3919
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
3920
|
+
*/
|
|
3921
|
+
parent?: boolean;
|
|
3922
|
+
|
|
3923
|
+
/**
|
|
3924
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
3925
|
+
*/
|
|
3926
|
+
placeholder?: string;
|
|
3927
|
+
|
|
3928
|
+
/**
|
|
3929
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
3930
|
+
* spark feature. Only available for \`string\` input type.
|
|
3931
|
+
*/
|
|
3932
|
+
prompt?: boolean;
|
|
3933
|
+
|
|
3934
|
+
/**
|
|
3935
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
3936
|
+
* type.
|
|
3937
|
+
*/
|
|
3938
|
+
promptSpark?: boolean;
|
|
3939
|
+
|
|
3940
|
+
/**
|
|
3941
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
3942
|
+
* least one of node or conditional.
|
|
3943
|
+
*/
|
|
3944
|
+
ref?: Input.Ref;
|
|
3945
|
+
|
|
3946
|
+
/**
|
|
3947
|
+
* Set of rules that describes when this input is required:
|
|
3948
|
+
*
|
|
3949
|
+
* - \`always\`: Input is always required
|
|
3950
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
3951
|
+
* defined
|
|
3952
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
3953
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
3954
|
+
* value
|
|
3955
|
+
*
|
|
3956
|
+
* By default, the input is not required.
|
|
3957
|
+
*/
|
|
3958
|
+
required?: Input.Required;
|
|
3959
|
+
|
|
3960
|
+
/**
|
|
3961
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
3962
|
+
*/
|
|
3963
|
+
step?: number;
|
|
3964
|
+
}
|
|
3965
|
+
|
|
3966
|
+
export namespace Input {
|
|
3967
|
+
/**
|
|
3968
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
3969
|
+
* least one of node or conditional.
|
|
3970
|
+
*/
|
|
3971
|
+
export interface Ref {
|
|
3972
|
+
/**
|
|
3973
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
3974
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
3975
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
3976
|
+
*/
|
|
3977
|
+
conditional?: Array<string>;
|
|
3978
|
+
|
|
3979
|
+
/**
|
|
3980
|
+
* This is the desired node output value if ref is an if/else node.
|
|
3981
|
+
*/
|
|
3982
|
+
equal?: string;
|
|
3983
|
+
|
|
3984
|
+
/**
|
|
3985
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
3986
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
3987
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
3988
|
+
* all outputs of a node, you can use the name 'all'.
|
|
3989
|
+
*/
|
|
3990
|
+
name?: string;
|
|
3991
|
+
|
|
3992
|
+
/**
|
|
3993
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
3994
|
+
*/
|
|
3995
|
+
node?: string;
|
|
3996
|
+
}
|
|
3997
|
+
|
|
3998
|
+
/**
|
|
3999
|
+
* Set of rules that describes when this input is required:
|
|
4000
|
+
*
|
|
4001
|
+
* - \`always\`: Input is always required
|
|
4002
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
4003
|
+
* defined
|
|
4004
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
4005
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
4006
|
+
* value
|
|
4007
|
+
*
|
|
4008
|
+
* By default, the input is not required.
|
|
4009
|
+
*/
|
|
4010
|
+
export interface Required {
|
|
4011
|
+
/**
|
|
4012
|
+
* Whether the input is always required
|
|
4013
|
+
*/
|
|
4014
|
+
always?: boolean;
|
|
4015
|
+
|
|
4016
|
+
/**
|
|
4017
|
+
* Makes this input required when another input has a specific value:
|
|
4018
|
+
*
|
|
4019
|
+
* - Key: name of the input to check
|
|
4020
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
4021
|
+
*/
|
|
4022
|
+
conditionalValues?: unknown;
|
|
4023
|
+
|
|
4024
|
+
/**
|
|
4025
|
+
* Makes this input required when another input is defined:
|
|
4026
|
+
*
|
|
4027
|
+
* - Key: name of the input that must be defined
|
|
4028
|
+
* - Value: message to display when this input is required
|
|
4029
|
+
*/
|
|
4030
|
+
ifDefined?: unknown;
|
|
4031
|
+
|
|
4032
|
+
/**
|
|
4033
|
+
* Makes this input required when another input is not defined:
|
|
4034
|
+
*
|
|
4035
|
+
* - Key: name of the input that must be undefined
|
|
4036
|
+
* - Value: message to display when this input is required
|
|
4037
|
+
*/
|
|
4038
|
+
ifNotDefined?: unknown;
|
|
4039
|
+
}
|
|
4040
|
+
}
|
|
4041
|
+
|
|
4042
|
+
/**
|
|
4043
|
+
* The logic of the node. Only available for logic nodes.
|
|
4044
|
+
*/
|
|
4045
|
+
export interface Logic {
|
|
4046
|
+
/**
|
|
4047
|
+
* The cases of the logic. Only available for if/else nodes.
|
|
4048
|
+
*/
|
|
4049
|
+
cases?: Array<Logic.Case>;
|
|
4050
|
+
|
|
4051
|
+
/**
|
|
4052
|
+
* The default case of the logic. Contains the id/output of the node to execute if
|
|
4053
|
+
* no case is matched. Only available for if/else nodes.
|
|
4054
|
+
*/
|
|
4055
|
+
default?: string;
|
|
4056
|
+
|
|
4057
|
+
/**
|
|
4058
|
+
* The transform of the logic. Only available for transform nodes.
|
|
4059
|
+
*/
|
|
4060
|
+
transform?: string;
|
|
4061
|
+
}
|
|
4062
|
+
|
|
4063
|
+
export namespace Logic {
|
|
4064
|
+
export interface Case {
|
|
4065
|
+
condition: string;
|
|
4066
|
+
|
|
4067
|
+
value: string;
|
|
4068
|
+
}
|
|
4069
|
+
}
|
|
4070
|
+
}
|
|
4071
|
+
}
|
|
4072
|
+
|
|
4073
|
+
export interface StatusHistory {
|
|
4074
|
+
date: string;
|
|
4075
|
+
|
|
4076
|
+
status:
|
|
4077
|
+
| 'canceled'
|
|
4078
|
+
| 'failure'
|
|
4079
|
+
| 'finalizing'
|
|
4080
|
+
| 'in-progress'
|
|
4081
|
+
| 'pending'
|
|
4082
|
+
| 'queued'
|
|
4083
|
+
| 'success'
|
|
4084
|
+
| 'warming-up';
|
|
4085
|
+
}
|
|
4086
|
+
|
|
4087
|
+
/**
|
|
4088
|
+
* The billing of the job
|
|
4089
|
+
*/
|
|
4090
|
+
export interface Billing {
|
|
4091
|
+
cuCost: number;
|
|
4092
|
+
|
|
4093
|
+
cuDiscount: number;
|
|
4094
|
+
}
|
|
4095
|
+
}
|
|
4096
|
+
}
|
|
4097
|
+
}
|
|
4098
|
+
|
|
4099
|
+
export interface ExampleUpdateParams {
|
|
4100
|
+
/**
|
|
4101
|
+
* Body param: The list of asset ids to use as examples of the model
|
|
4102
|
+
*/
|
|
4103
|
+
assetIds: Array<string>;
|
|
4104
|
+
|
|
4105
|
+
/**
|
|
4106
|
+
* Query param: If set to true, returns the original asset without transformation
|
|
4107
|
+
*/
|
|
4108
|
+
originalAssets?: string;
|
|
4109
|
+
}
|
|
4110
|
+
|
|
4111
|
+
export interface ExampleListParams {
|
|
4112
|
+
/**
|
|
4113
|
+
* If set to true, returns the original asset without transformation
|
|
4114
|
+
*/
|
|
4115
|
+
originalAssets?: string;
|
|
4116
|
+
}
|
|
4117
|
+
|
|
4118
|
+
export declare namespace Examples {
|
|
4119
|
+
export {
|
|
4120
|
+
type ExampleUpdateResponse as ExampleUpdateResponse,
|
|
4121
|
+
type ExampleListResponse as ExampleListResponse,
|
|
4122
|
+
type ExampleUpdateParams as ExampleUpdateParams,
|
|
4123
|
+
type ExampleListParams as ExampleListParams,
|
|
4124
|
+
};
|
|
4125
|
+
}
|