@picsart/ai-sdk 5.19.0 → 5.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.
Files changed (3) hide show
  1. package/index.d.ts +8 -0
  2. package/index.js +40 -0
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -227,6 +227,13 @@ type ModelInputById = {
227
227
  count?: 1 | 2 | 4 | 6 | 8 | 10;
228
228
  imageUrls?: string[];
229
229
  };
230
+ "flux-video-upscale": {
231
+ videoUrl: string;
232
+ upscaleFactor?: number;
233
+ creativity?: 0 | 1;
234
+ prompt?: string;
235
+ safetyTolerance?: number;
236
+ };
230
237
  "gemini-2.5-flash-image": {
231
238
  prompt: string;
232
239
  aspectRatio?: "1:1" | "16:9" | "9:16" | "3:4" | "4:3" | "2:3" | "21:9";
@@ -2493,6 +2500,7 @@ declare const Models: {
2493
2500
  readonly Flux3Video: "flux-3-video";
2494
2501
  readonly FluxKontextMax: "flux-kontext-max";
2495
2502
  readonly FluxKontextPro: "flux-kontext-pro";
2503
+ readonly FluxVideoUpscale: "flux-video-upscale";
2496
2504
  readonly Gemini25FlashImage: "gemini-2.5-flash-image";
2497
2505
  readonly Gemini25FlashTts: "gemini-2.5-flash-tts";
2498
2506
  readonly Gemini25ProTts: "gemini-2.5-pro-tts";
package/index.js CHANGED
@@ -3786,6 +3786,12 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
3786
3786
  badge: ["new", "premium", "hot"],
3787
3787
  description: "Latest cinematic video with audio, multi-reference input, and mp4/mov output. Up to 30s.",
3788
3788
  features: [feat("Reference Image", "frame"), feat("Start/End Frame", "frame"), feat("Audio", "audio"), feat("1080p", "resolution"), feat("4-30 sec", "duration")],
3789
+ // 1080p / 30s runs, and the whole extend path, outlast the global 10-min
3790
+ // polling default: measured p90 for seedance-2.5-video-extend sits above
3791
+ // the 600s ceiling. Widened to 5s × 360 attempts (30 min), same request
3792
+ // count, 3x the wall clock. Deliberately NOT derived from estimatedTime,
3793
+ // which understates seedance latency by ~10x.
3794
+ pollOptions: { intervalMs: 5e3, maxAttempts: 360 },
3789
3795
  paramConfig: {
3790
3796
  ...params.prompt(),
3791
3797
  ...params.aspectRatio(SEEDANCE_AR),
@@ -3815,6 +3821,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
3815
3821
  badge: ["new", "premium", "hot"],
3816
3822
  description: "Edit video \u2014 replace subjects, add or remove objects, restyle scenes with reference images.",
3817
3823
  features: [feat("Video Input", "input"), feat("Multi-Image Input", "input"), feat("Audio", "audio"), feat("1080p", "resolution"), feat("Source length", "duration")],
3824
+ pollOptions: { intervalMs: 5e3, maxAttempts: 360 },
3818
3825
  paramConfig: {
3819
3826
  ...params.prompt(),
3820
3827
  // Editing mode: aspect ratio is fixed to 'adaptive' and duration is
@@ -3841,6 +3848,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
3841
3848
  badge: ["new", "premium", "hot"],
3842
3849
  description: "Stitch up to 10 clips into one continuous, extended video.",
3843
3850
  features: [feat("Multi-Video Input", "input"), feat("Audio", "audio"), feat("1080p", "resolution"), feat("4-30 sec", "duration")],
3851
+ pollOptions: { intervalMs: 5e3, maxAttempts: 360 },
3844
3852
  paramConfig: {
3845
3853
  ...params.prompt(),
3846
3854
  // Extension mode: aspect ratio is locked to 'adaptive' (vendor rule);
@@ -5498,6 +5506,36 @@ var { MODELS: MODELS21 } = defineModels("flux", [
5498
5506
  // draft: fast low-step preview.
5499
5507
  ...p.boolean("draft", false, "Draft")
5500
5508
  }
5509
+ },
5510
+ {
5511
+ // Pure pass-through: the worker Command takes the SDK's own field names
5512
+ // (videoUrl, upscaleFactor, creativity, prompt, safetyTolerance) — no
5513
+ // payload builder needed. webhookUrl is polling plumbing, not surfaced
5514
+ // (same as flux-3-video).
5515
+ id: "flux-video-upscale",
5516
+ name: "Flux Video Upscale",
5517
+ workflow: "flux/v1/video-upscale",
5518
+ mode: "video",
5519
+ inputType: "v2v",
5520
+ addedAt: "2026-08-28",
5521
+ estimatedTime: 180,
5522
+ description: "Upscale videos toward 4K (1.5x\u20133x) in precise (source-faithful) or creative (detail-enhancing) mode. Source clips up to 20 seconds and 2K.",
5523
+ features: [
5524
+ feat("Upscale", "quality"),
5525
+ feat("Video Required", "input"),
5526
+ feat("Up to 4K", "resolution")
5527
+ ],
5528
+ paramConfig: {
5529
+ // Vendor source caps: 20s, 50 MB, 2560x1440 (2K).
5530
+ ...params.videoInput("Source Video", "asset", true, 20, 1440, 50 * 1024 * 1024),
5531
+ ...p.range("upscaleFactor", 1.5, 3, 2, { step: 0.5, label: "Upscale Factor" }),
5532
+ // Vendor switch: 0 preserves the source precisely; 1 (default) allows
5533
+ // creative detail enhancement and is the more expensive pricing tier.
5534
+ ...p.enum("creativity", [{ id: 0, label: "Precise" }, { id: 1, label: "Creative" }], 1, { label: "Creativity" }),
5535
+ ...params.prompt({ required: false }),
5536
+ // Moderation level: 0 (strict) … 4 (permissive).
5537
+ ...p.range("safetyTolerance", 0, 4, 2, { label: "Safety Tolerance" })
5538
+ }
5501
5539
  }
5502
5540
  ]);
5503
5541
 
@@ -10502,6 +10540,7 @@ var Flux2Pro = "flux-2-pro";
10502
10540
  var Flux3Video = "flux-3-video";
10503
10541
  var FluxKontextMax = "flux-kontext-max";
10504
10542
  var FluxKontextPro = "flux-kontext-pro";
10543
+ var FluxVideoUpscale = "flux-video-upscale";
10505
10544
  var Gemini25FlashImage = "gemini-2.5-flash-image";
10506
10545
  var Gemini25FlashTts = "gemini-2.5-flash-tts";
10507
10546
  var Gemini25ProTts = "gemini-2.5-pro-tts";
@@ -10710,6 +10749,7 @@ var Models = {
10710
10749
  Flux3Video,
10711
10750
  FluxKontextMax,
10712
10751
  FluxKontextPro,
10752
+ FluxVideoUpscale,
10713
10753
  Gemini25FlashImage,
10714
10754
  Gemini25FlashTts,
10715
10755
  Gemini25ProTts,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "5.19.0",
3
+ "version": "5.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",