@picsart/ai-sdk 3.18.0 → 3.20.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
@@ -220,6 +220,15 @@ type ModelInputById = {
220
220
  thinkingLevel?: "minimal" | "high";
221
221
  imageUrls?: string[];
222
222
  };
223
+ "gemini-3.5-flash-lite": {
224
+ prompt: string;
225
+ imageUrls?: string[];
226
+ };
227
+ "gemini-3.6-flash": {
228
+ prompt: string;
229
+ imageUrls?: string[];
230
+ thinking?: "off" | "low" | "medium" | "high";
231
+ };
223
232
  "gemini-omni-flash-preview": {
224
233
  prompt: string;
225
234
  aspectRatio?: "16:9" | "9:16";
@@ -1223,32 +1232,13 @@ type ModelInputById = {
1223
1232
  resolution?: "720p" | "1024p" | "1080p";
1224
1233
  duration?: 4 | 8 | 12 | 16 | 20;
1225
1234
  };
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
1235
  "topaz-upscale-image": {
1251
1236
  imageUrls: [string, ...string[]];
1237
+ model?: "Standard V2" | "Standard MAX" | "Low Resolution V2" | "High Fidelity V2" | "CGI" | "Text Refine" | "Redefine" | "Recovery" | "Recovery V2" | "Wonder" | "Wonder 3";
1238
+ };
1239
+ "topaz-upscale-video": {
1240
+ videoUrl: string;
1241
+ 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
1242
  };
1253
1243
  "veed-fabric-v1": {
1254
1244
  prompt?: string;
@@ -1352,7 +1342,7 @@ type ModelInputById = {
1352
1342
  type TypedModelId = keyof ModelInputById;
1353
1343
  type ModelInput<M extends TypedModelId> = ModelInputById[M];
1354
1344
  /** IDs of text-generation (LLM) models — narrows generateText(). */
1355
- type TextModelId = "claude-haiku-4-5" | "claude-opus-4-8" | "claude-sonnet-4-6" | "gemini-3-pro" | "gpt-5.5";
1345
+ type TextModelId = "claude-haiku-4-5" | "claude-opus-4-8" | "claude-sonnet-4-6" | "gemini-3-pro" | "gemini-3.5-flash-lite" | "gemini-3.6-flash" | "gpt-5.5";
1356
1346
  type TextModelInputById = Pick<ModelInputById, TextModelId>;
1357
1347
 
1358
1348
  /**
@@ -2116,6 +2106,8 @@ declare const Models: {
2116
2106
  readonly Gemini3ProImage: "gemini-3-pro-image";
2117
2107
  readonly Gemini31FlashImage: "gemini-3.1-flash-image";
2118
2108
  readonly Gemini31FlashLiteImage: "gemini-3.1-flash-lite-image";
2109
+ readonly Gemini35FlashLite: "gemini-3.5-flash-lite";
2110
+ readonly Gemini36Flash: "gemini-3.6-flash";
2119
2111
  readonly GeminiOmniFlashPreview: "gemini-omni-flash-preview";
2120
2112
  readonly Gpt55: "gpt-5.5";
2121
2113
  readonly GptImage1: "gpt-image-1";
@@ -2259,15 +2251,8 @@ declare const Models: {
2259
2251
  readonly Sora2: "sora-2";
2260
2252
  readonly Sora2Extend: "sora-2-extend";
2261
2253
  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
2254
  readonly TopazUpscaleImage: "topaz-upscale-image";
2255
+ readonly TopazUpscaleVideo: "topaz-upscale-video";
2271
2256
  readonly VeedFabricV1: "veed-fabric-v1";
2272
2257
  readonly VeedFabricV1Fast: "veed-fabric-v1-fast";
2273
2258
  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) => {
@@ -7735,6 +7768,39 @@ var { MODELS: GEMINI_LLM } = defineModels("google", [
7735
7768
  ...params.videoInput("Video", "reference", false),
7736
7769
  ...thinkingParam(["low", "high"])
7737
7770
  }
7771
+ },
7772
+ {
7773
+ id: "gemini-3.6-flash",
7774
+ name: "Gemini 3.6 Flash",
7775
+ workflow: "chat-completions",
7776
+ addedAt: "2026-07-22",
7777
+ estimatedTime: 5,
7778
+ mode: "text",
7779
+ inputType: "i2t",
7780
+ badge: ["fast"],
7781
+ description: "Fast Gemini model \u2014 low-latency multimodal text generation.",
7782
+ features: [feat("Vision", "input"), feat("Thinking", "characteristic")],
7783
+ paramConfig: {
7784
+ ...params.prompt(),
7785
+ ...params.imageInput(8, "Images"),
7786
+ ...thinkingParam(["low", "medium", "high"])
7787
+ }
7788
+ },
7789
+ {
7790
+ id: "gemini-3.5-flash-lite",
7791
+ name: "Gemini 3.5 Flash Lite",
7792
+ workflow: "chat-completions",
7793
+ addedAt: "2026-07-22",
7794
+ estimatedTime: 4,
7795
+ mode: "text",
7796
+ inputType: "i2t",
7797
+ badge: ["fast"],
7798
+ description: "Lightweight Gemini model \u2014 the fastest, most cost-efficient tier.",
7799
+ features: [feat("Vision", "input")],
7800
+ paramConfig: {
7801
+ ...params.prompt(),
7802
+ ...params.imageInput(8, "Images")
7803
+ }
7738
7804
  }
7739
7805
  ]);
7740
7806
  var MODELS36 = [...ANTHROPIC, ...OPENAI_LLM, ...GEMINI_LLM];
@@ -7793,7 +7859,11 @@ registerPayloads(MODELS36, {
7793
7859
  "claude-sonnet-4-6": buildClaudePayload("claude-sonnet-4-6"),
7794
7860
  "claude-haiku-4-5": buildClaudePayload("claude-haiku-4-5"),
7795
7861
  "gpt-5.5": buildOpenAiPayload("gpt-5.5"),
7796
- "gemini-3-pro": buildGeminiPayload("gemini-3-pro-preview")
7862
+ "gemini-3-pro": buildGeminiPayload("gemini-3-pro-preview"),
7863
+ // Flash models route through chat-completions (OpenAI-shaped), not the
7864
+ // native `gemini` workflow. flash-lite has no thinking param → reasoning_effort omitted.
7865
+ "gemini-3.6-flash": buildOpenAiPayload("gemini-3.6-flash"),
7866
+ "gemini-3.5-flash-lite": buildOpenAiPayload("gemini-3.5-flash-lite")
7797
7867
  });
7798
7868
 
7799
7869
  // src/vendors/catalog/index.ts
@@ -9753,6 +9823,8 @@ var Gemini3Pro = "gemini-3-pro";
9753
9823
  var Gemini3ProImage = "gemini-3-pro-image";
9754
9824
  var Gemini31FlashImage = "gemini-3.1-flash-image";
9755
9825
  var Gemini31FlashLiteImage = "gemini-3.1-flash-lite-image";
9826
+ var Gemini35FlashLite = "gemini-3.5-flash-lite";
9827
+ var Gemini36Flash = "gemini-3.6-flash";
9756
9828
  var GeminiOmniFlashPreview = "gemini-omni-flash-preview";
9757
9829
  var Gpt55 = "gpt-5.5";
9758
9830
  var GptImage1 = "gpt-image-1";
@@ -9896,15 +9968,8 @@ var Seedream50Pro = "seedream-5.0-pro";
9896
9968
  var Sora2 = "sora-2";
9897
9969
  var Sora2Extend = "sora-2-extend";
9898
9970
  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
9971
  var TopazUpscaleImage = "topaz-upscale-image";
9972
+ var TopazUpscaleVideo = "topaz-upscale-video";
9908
9973
  var VeedFabricV1 = "veed-fabric-v1";
9909
9974
  var VeedFabricV1Fast = "veed-fabric-v1-fast";
9910
9975
  var Veo31 = "veo-3.1";
@@ -9949,6 +10014,8 @@ var Models = {
9949
10014
  Gemini3ProImage,
9950
10015
  Gemini31FlashImage,
9951
10016
  Gemini31FlashLiteImage,
10017
+ Gemini35FlashLite,
10018
+ Gemini36Flash,
9952
10019
  GeminiOmniFlashPreview,
9953
10020
  Gpt55,
9954
10021
  GptImage1,
@@ -10092,15 +10159,8 @@ var Models = {
10092
10159
  Sora2,
10093
10160
  Sora2Extend,
10094
10161
  Sora2Pro,
10095
- TopazEnhanceCgi,
10096
- TopazEnhanceHighFidelityV2,
10097
- TopazEnhanceLowResV2,
10098
- TopazEnhanceRecovery,
10099
- TopazEnhanceRecoveryV2,
10100
- TopazEnhanceRedefine,
10101
- TopazEnhanceStandardV2,
10102
- TopazEnhanceTextRefine,
10103
10162
  TopazUpscaleImage,
10163
+ TopazUpscaleVideo,
10104
10164
  VeedFabricV1,
10105
10165
  VeedFabricV1Fast,
10106
10166
  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.20.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",