@picsart/ai-sdk 3.18.0 → 3.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -1223,32 +1223,13 @@ type ModelInputById = {
1223
1223
  resolution?: "720p" | "1024p" | "1080p";
1224
1224
  duration?: 4 | 8 | 12 | 16 | 20;
1225
1225
  };
1226
- "topaz-enhance-cgi": {
1227
- imageUrls: [string, ...string[]];
1228
- };
1229
- "topaz-enhance-high-fidelity-v2": {
1230
- imageUrls: [string, ...string[]];
1231
- };
1232
- "topaz-enhance-low-res-v2": {
1233
- imageUrls: [string, ...string[]];
1234
- };
1235
- "topaz-enhance-recovery": {
1236
- imageUrls: [string, ...string[]];
1237
- };
1238
- "topaz-enhance-recovery-v2": {
1239
- imageUrls: [string, ...string[]];
1240
- };
1241
- "topaz-enhance-redefine": {
1242
- imageUrls: [string, ...string[]];
1243
- };
1244
- "topaz-enhance-standard-v2": {
1245
- imageUrls: [string, ...string[]];
1246
- };
1247
- "topaz-enhance-text-refine": {
1248
- imageUrls: [string, ...string[]];
1249
- };
1250
1226
  "topaz-upscale-image": {
1251
1227
  imageUrls: [string, ...string[]];
1228
+ model?: "Standard V2" | "Standard MAX" | "Low Resolution V2" | "High Fidelity V2" | "CGI" | "Text Refine" | "Redefine" | "Recovery" | "Recovery V2" | "Wonder" | "Wonder 3";
1229
+ };
1230
+ "topaz-upscale-video": {
1231
+ videoUrl: string;
1232
+ model?: "Proteus" | "Artemis HQ" | "Artemis MQ" | "Artemis LQ" | "Nyx" | "Nyx Fast" | "Nyx XL" | "Nyx HF" | "Gaia HQ" | "Gaia CG" | "Gaia 2" | "Starlight Precise 1" | "Starlight Precise 2" | "Starlight Precise 2.5" | "Starlight HQ" | "Starlight Mini" | "Starlight Sharp" | "Starlight Fast 1" | "Starlight Fast 2";
1252
1233
  };
1253
1234
  "veed-fabric-v1": {
1254
1235
  prompt?: string;
@@ -2259,15 +2240,8 @@ declare const Models: {
2259
2240
  readonly Sora2: "sora-2";
2260
2241
  readonly Sora2Extend: "sora-2-extend";
2261
2242
  readonly Sora2Pro: "sora-2-pro";
2262
- readonly TopazEnhanceCgi: "topaz-enhance-cgi";
2263
- readonly TopazEnhanceHighFidelityV2: "topaz-enhance-high-fidelity-v2";
2264
- readonly TopazEnhanceLowResV2: "topaz-enhance-low-res-v2";
2265
- readonly TopazEnhanceRecovery: "topaz-enhance-recovery";
2266
- readonly TopazEnhanceRecoveryV2: "topaz-enhance-recovery-v2";
2267
- readonly TopazEnhanceRedefine: "topaz-enhance-redefine";
2268
- readonly TopazEnhanceStandardV2: "topaz-enhance-standard-v2";
2269
- readonly TopazEnhanceTextRefine: "topaz-enhance-text-refine";
2270
2243
  readonly TopazUpscaleImage: "topaz-upscale-image";
2244
+ readonly TopazUpscaleVideo: "topaz-upscale-video";
2271
2245
  readonly VeedFabricV1: "veed-fabric-v1";
2272
2246
  readonly VeedFabricV1Fast: "veed-fabric-v1-fast";
2273
2247
  readonly Veo31: "veo-3.1";
package/index.js CHANGED
@@ -6918,63 +6918,96 @@ var { MODELS: MODELS29 } = defineModels("recraft", [
6918
6918
  ]);
6919
6919
 
6920
6920
  // src/vendors/catalog/topaz.ts
6921
- var buildTopazUpscalePayload = (ctx) => ({
6922
- face_enhancement: false,
6923
- face_enhancement_creativity: 0,
6924
- face_enhancement_strength: 0.8,
6925
- output_format: "png",
6926
- subject_detection: "All",
6927
- model: "Standard V2",
6928
- image_url: ctx.imageUrls?.[0] ?? "",
6929
- upscale_factor: 2,
6930
- crop_to_fill: false
6931
- });
6932
- var buildTopazEnhancePayload = (model) => (ctx) => ({
6933
- image_url: ctx.imageUrls?.[0] ?? "",
6934
- upscale_factor: 1,
6935
- output_format: "png",
6936
- model
6937
- });
6938
- var TOPAZ_ENHANCE_VARIANTS = [
6939
- { key: "standard-v2", label: "Topaz Standard", model: "Standard V2" },
6940
- { key: "low-res-v2", label: "Topaz Low Res", model: "Low Resolution V2" },
6941
- { key: "cgi", label: "Topaz CGI", model: "CGI" },
6942
- { key: "high-fidelity-v2", label: "Topaz Hi-Fi", model: "High Fidelity V2" },
6943
- { key: "text-refine", label: "Topaz Text", model: "Text Refine" },
6944
- { key: "redefine", label: "Topaz Redefine", model: "Redefine" },
6945
- { key: "recovery", label: "Topaz Recovery", model: "Recovery" },
6946
- { key: "recovery-v2", label: "Topaz Recovery V2", model: "Recovery V2" }
6921
+ var TOPAZ_IMAGE_MODEL_OPTIONS = [
6922
+ "Standard V2",
6923
+ "Standard MAX",
6924
+ "Low Resolution V2",
6925
+ "High Fidelity V2",
6926
+ "CGI",
6927
+ "Text Refine",
6928
+ "Redefine",
6929
+ "Recovery",
6930
+ "Recovery V2",
6931
+ "Wonder",
6932
+ "Wonder 3"
6933
+ ];
6934
+ var TOPAZ_VIDEO_MODEL_OPTIONS = [
6935
+ "Proteus",
6936
+ "Artemis HQ",
6937
+ "Artemis MQ",
6938
+ "Artemis LQ",
6939
+ "Nyx",
6940
+ "Nyx Fast",
6941
+ "Nyx XL",
6942
+ "Nyx HF",
6943
+ "Gaia HQ",
6944
+ "Gaia CG",
6945
+ "Gaia 2",
6946
+ "Starlight Precise 1",
6947
+ "Starlight Precise 2",
6948
+ "Starlight Precise 2.5",
6949
+ "Starlight HQ",
6950
+ "Starlight Mini",
6951
+ "Starlight Sharp",
6952
+ "Starlight Fast 1",
6953
+ "Starlight Fast 2"
6947
6954
  ];
6948
6955
  var { MODELS: MODELS30 } = defineModels("topaz", [
6949
6956
  {
6950
6957
  id: "topaz-upscale-image",
6951
- name: "Topaz HD Upscale",
6958
+ name: "Topaz Image Upscale",
6952
6959
  addedAt: "2026-03-06",
6953
6960
  workflow: "topaz/upscale/image",
6954
- buildPayload: buildTopazUpscalePayload,
6955
6961
  estimatedTime: 30,
6956
6962
  mode: "image",
6957
6963
  inputType: "i2i",
6958
- description: "2x image upscale with Topaz AI.",
6964
+ description: "Image upscaling and enhancement with Topaz AI \u2014 Standard, Hi-Fi, CGI, Recovery and Wonder models.",
6959
6965
  features: [feat("Upscale", "quality"), feat("Image Required", "input")],
6960
- paramConfig: { ...params.imageInput(1, "Image", true) }
6966
+ paramConfig: {
6967
+ ...params.imageInput(1, "Image", true),
6968
+ ...p.enum("model", [...TOPAZ_IMAGE_MODEL_OPTIONS], "Standard V2", { label: "Model" })
6969
+ }
6961
6970
  },
6962
- ...TOPAZ_ENHANCE_VARIANTS.map((v) => ({
6963
- id: `topaz-enhance-${v.key}`,
6964
- modelId: "topaz-upscale-image",
6965
- addedAt: "2026-03-06",
6966
- name: v.label,
6967
- workflow: "topaz/upscale/image",
6968
- buildPayload: buildTopazEnhancePayload(v.model),
6969
- estimatedTime: 30,
6970
- mode: "image",
6971
- inputType: "i2i",
6972
- description: `${v.model} image enhancement`,
6973
- features: [feat("Enhancement", "quality"), feat("Image Required", "input")],
6974
- paramConfig: { ...params.imageInput(1, "Image", true) }
6975
- }))
6971
+ {
6972
+ id: "topaz-upscale-video",
6973
+ name: "Topaz Video Upscale",
6974
+ addedAt: "2026-07-21",
6975
+ workflow: "topaz/upscale/video",
6976
+ estimatedTime: 600,
6977
+ mode: "video",
6978
+ inputType: "v2v",
6979
+ description: "Video upscaling and enhancement with Topaz AI \u2014 Proteus, Artemis, Nyx, Gaia and Starlight models.",
6980
+ features: [feat("Upscale", "quality"), feat("Video Required", "input")],
6981
+ paramConfig: {
6982
+ ...params.videoInput("Source Video", "asset", true),
6983
+ ...p.enum("model", [...TOPAZ_VIDEO_MODEL_OPTIONS], "Proteus", { label: "Model" })
6984
+ }
6985
+ }
6976
6986
  ]);
6977
6987
 
6988
+ // src/vendors/catalog/topaz.payloads.ts
6989
+ var buildTopazImagePayload = (input) => ({
6990
+ image_url: input.imageUrls[0],
6991
+ model: input.model ?? "Standard V2",
6992
+ upscale_factor: 2,
6993
+ output_format: "png",
6994
+ face_enhancement: false,
6995
+ face_enhancement_creativity: 0,
6996
+ face_enhancement_strength: 0.8,
6997
+ subject_detection: "All",
6998
+ crop_to_fill: false
6999
+ });
7000
+ var buildTopazVideoPayload = (input) => ({
7001
+ video_url: input.videoUrl,
7002
+ model: input.model ?? "Proteus",
7003
+ upscale_factor: 2,
7004
+ H264_output: false
7005
+ });
7006
+ registerPayloads(MODELS30, {
7007
+ "topaz-upscale-image": buildTopazImagePayload,
7008
+ "topaz-upscale-video": buildTopazVideoPayload
7009
+ });
7010
+
6978
7011
  // src/vendors/catalog/picsart.ts
6979
7012
  var MAX_WORDS = 77;
6980
7013
  var truncateWords = (text) => {
@@ -9896,15 +9929,8 @@ var Seedream50Pro = "seedream-5.0-pro";
9896
9929
  var Sora2 = "sora-2";
9897
9930
  var Sora2Extend = "sora-2-extend";
9898
9931
  var Sora2Pro = "sora-2-pro";
9899
- var TopazEnhanceCgi = "topaz-enhance-cgi";
9900
- var TopazEnhanceHighFidelityV2 = "topaz-enhance-high-fidelity-v2";
9901
- var TopazEnhanceLowResV2 = "topaz-enhance-low-res-v2";
9902
- var TopazEnhanceRecovery = "topaz-enhance-recovery";
9903
- var TopazEnhanceRecoveryV2 = "topaz-enhance-recovery-v2";
9904
- var TopazEnhanceRedefine = "topaz-enhance-redefine";
9905
- var TopazEnhanceStandardV2 = "topaz-enhance-standard-v2";
9906
- var TopazEnhanceTextRefine = "topaz-enhance-text-refine";
9907
9932
  var TopazUpscaleImage = "topaz-upscale-image";
9933
+ var TopazUpscaleVideo = "topaz-upscale-video";
9908
9934
  var VeedFabricV1 = "veed-fabric-v1";
9909
9935
  var VeedFabricV1Fast = "veed-fabric-v1-fast";
9910
9936
  var Veo31 = "veo-3.1";
@@ -10092,15 +10118,8 @@ var Models = {
10092
10118
  Sora2,
10093
10119
  Sora2Extend,
10094
10120
  Sora2Pro,
10095
- TopazEnhanceCgi,
10096
- TopazEnhanceHighFidelityV2,
10097
- TopazEnhanceLowResV2,
10098
- TopazEnhanceRecovery,
10099
- TopazEnhanceRecoveryV2,
10100
- TopazEnhanceRedefine,
10101
- TopazEnhanceStandardV2,
10102
- TopazEnhanceTextRefine,
10103
10121
  TopazUpscaleImage,
10122
+ TopazUpscaleVideo,
10104
10123
  VeedFabricV1,
10105
10124
  VeedFabricV1Fast,
10106
10125
  Veo31,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "3.18.0",
3
+ "version": "3.19.0",
4
4
  "type": "module",
5
5
  "description": "Type-safe SDK for 100+ AI models — image, video, audio, and text generation with Picsart",
6
6
  "license": "MIT",