@picsart/ai-sdk 5.18.0 → 5.19.1

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.
@@ -109,7 +109,7 @@ interface SpeakerVoiceConfig$2 {
109
109
  speaker: string;
110
110
  voiceConfig: VoiceConfig$2;
111
111
  }
112
- type GeminiModel$1 = "gemini-2.5-pro" | "gemini-2.5-flash" | "gemini-2.5-flash-image-preview" | "gemini-2.5-flash-image" | "gemini-2.5-flash-lite-preview-06-17" | "gemini-2.0-flash" | "gemini-2.0-flash-preview-image-generation" | "gemini-2.0-flash-lite" | "gemini-1.5-flash" | "gemini-1.5-flash-8b" | "gemini-1.5-pro" | "gemini-embedding-exp" | "gemini-3-pro" | "gemini-3-pro-preview" | "gemini-3.1-pro-preview" | "gemini-3.1-flash-lite" | "gemini-3-pro-image" | "gemini-3-pro-image-preview" | "gemini-3.1-flash-image-preview" | "gemini-3.1-flash-image" | "gemini-3.1-flash-lite-image" | "gemini-2.5-flash-tts" | "gemini-2.5-pro-tts" | "instant-ramen";
112
+ type GeminiModel$1 = "gemini-2.5-pro" | "gemini-2.5-flash" | "gemini-2.5-flash-image-preview" | "gemini-2.5-flash-image" | "gemini-2.5-flash-lite-preview-06-17" | "gemini-2.0-flash" | "gemini-2.0-flash-preview-image-generation" | "gemini-2.0-flash-lite" | "gemini-1.5-flash" | "gemini-1.5-flash-8b" | "gemini-1.5-pro" | "gemini-embedding-exp" | "gemini-3-pro" | "gemini-3-pro-preview" | "gemini-3.1-pro-preview" | "gemini-3.1-flash-lite" | "gemini-3.1-flash-lite-preview" | "gemini-3-pro-image" | "gemini-3-pro-image-preview" | "gemini-3.1-flash-image-preview" | "gemini-3.1-flash-image" | "gemini-3.1-flash-lite-image" | "gemini-2.5-flash-tts" | "gemini-2.5-pro-tts" | "instant-ramen";
113
113
  interface GeminiResult$1 {
114
114
  id: string;
115
115
  status: "ACCEPTED" | "IN_PROGRESS" | "COMPLETED" | "FAILED";
@@ -435,7 +435,7 @@ interface SpeakerVoiceConfig$1 {
435
435
  speaker: string;
436
436
  voiceConfig: VoiceConfig$1;
437
437
  }
438
- type GeminiModel = "gemini-2.5-pro" | "gemini-2.5-flash" | "gemini-2.5-flash-image-preview" | "gemini-2.5-flash-image" | "gemini-2.5-flash-lite-preview-06-17" | "gemini-2.0-flash" | "gemini-2.0-flash-preview-image-generation" | "gemini-2.0-flash-lite" | "gemini-1.5-flash" | "gemini-1.5-flash-8b" | "gemini-1.5-pro" | "gemini-embedding-exp" | "gemini-3-pro" | "gemini-3-pro-preview" | "gemini-3.1-pro-preview" | "gemini-3.1-flash-lite" | "gemini-3-pro-image" | "gemini-3-pro-image-preview" | "gemini-3.1-flash-image-preview" | "gemini-3.1-flash-image" | "gemini-3.1-flash-lite-image" | "gemini-2.5-flash-tts" | "gemini-2.5-pro-tts" | "instant-ramen";
438
+ type GeminiModel = "gemini-2.5-pro" | "gemini-2.5-flash" | "gemini-2.5-flash-image-preview" | "gemini-2.5-flash-image" | "gemini-2.5-flash-lite-preview-06-17" | "gemini-2.0-flash" | "gemini-2.0-flash-preview-image-generation" | "gemini-2.0-flash-lite" | "gemini-1.5-flash" | "gemini-1.5-flash-8b" | "gemini-1.5-pro" | "gemini-embedding-exp" | "gemini-3-pro" | "gemini-3-pro-preview" | "gemini-3.1-pro-preview" | "gemini-3.1-flash-lite" | "gemini-3.1-flash-lite-preview" | "gemini-3-pro-image" | "gemini-3-pro-image-preview" | "gemini-3.1-flash-image-preview" | "gemini-3.1-flash-image" | "gemini-3.1-flash-lite-image" | "gemini-2.5-flash-tts" | "gemini-2.5-pro-tts" | "instant-ramen";
439
439
  interface GeminiResult {
440
440
  id: string;
441
441
  status: "ACCEPTED" | "IN_PROGRESS" | "COMPLETED" | "FAILED";
@@ -6762,22 +6762,22 @@ interface HappyhorseImageToVideoResult {
6762
6762
  interface WhisperxVideoCaptionsCommand {
6763
6763
  url: string;
6764
6764
  model?: "preview-model-whisperx-large-v3" | "model-whisperx-large-v3";
6765
- parameters?: WhisperParameters;
6766
- alignment?: AlignmentOptions;
6767
- diarization?: DiarizationOptions;
6768
- output?: OutputOptions;
6765
+ parameters?: WhisperParameters$1;
6766
+ alignment?: AlignmentOptions$1;
6767
+ diarization?: DiarizationOptions$1;
6768
+ output?: OutputOptions$1;
6769
6769
  options?: GenAIOptions$19;
6770
6770
  }
6771
- interface WhisperParameters {
6771
+ interface WhisperParameters$1 {
6772
6772
  language?: "en" | "es" | "fr" | "de" | "it" | "pt" | "nl" | "pl" | "ja" | "zh" | "ru";
6773
6773
  task?: "transcribe" | "translate";
6774
6774
  }
6775
- interface AlignmentOptions {
6775
+ interface AlignmentOptions$1 {
6776
6776
  enabled?: boolean;
6777
6777
  return_char_alignments?: boolean;
6778
6778
  interpolate_method?: "nearest" | "linear" | "ignore";
6779
6779
  }
6780
- interface DiarizationOptions {
6780
+ interface DiarizationOptions$1 {
6781
6781
  enabled?: boolean;
6782
6782
  num_speakers?: number;
6783
6783
  min_speakers?: number;
@@ -6786,7 +6786,7 @@ interface DiarizationOptions {
6786
6786
  fill_nearest?: boolean;
6787
6787
  apply_word_speakers?: boolean;
6788
6788
  }
6789
- interface OutputOptions {
6789
+ interface OutputOptions$1 {
6790
6790
  include_word_segments?: boolean;
6791
6791
  include_char_segments?: boolean;
6792
6792
  }
@@ -6813,24 +6813,24 @@ interface WhisperxVideoCaptionsResponse {
6813
6813
  }
6814
6814
  interface WhisperxVideoCaptionsResultData {
6815
6815
  language: string;
6816
- segments?: TranscriptionSegment[];
6816
+ segments?: TranscriptionSegment$1[];
6817
6817
  }
6818
- interface TranscriptionSegment {
6818
+ interface TranscriptionSegment$1 {
6819
6819
  start: number;
6820
6820
  end: number;
6821
6821
  text: string;
6822
6822
  speaker?: string;
6823
- words?: WordSegment[];
6824
- chars?: CharSegment[];
6823
+ words?: WordSegment$1[];
6824
+ chars?: CharSegment$1[];
6825
6825
  }
6826
- interface WordSegment {
6826
+ interface WordSegment$1 {
6827
6827
  word: string;
6828
6828
  start?: number;
6829
6829
  end?: number;
6830
6830
  score?: number;
6831
6831
  speaker?: string;
6832
6832
  }
6833
- interface CharSegment {
6833
+ interface CharSegment$1 {
6834
6834
  char: string;
6835
6835
  start?: number;
6836
6836
  end?: number;
@@ -9218,7 +9218,7 @@ interface ImageSegmentationResultData {
9218
9218
  interface WanV3VideoCommand {
9219
9219
  prompt?: string;
9220
9220
  media?: WanV3MediaItem[];
9221
- model?: "wan3.0-video";
9221
+ model?: "wan3.0-video" | "wan3.0-video-prime";
9222
9222
  resolution?: "480P" | "720P" | "1080P";
9223
9223
  ratio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "adaptive";
9224
9224
  duration?: number;
@@ -10333,6 +10333,69 @@ interface FaceCollageResultData {
10333
10333
  driveFile?: Record<string, unknown>;
10334
10334
  }
10335
10335
 
10336
+ interface WhisperxSliceCommand {
10337
+ url: string;
10338
+ start?: number;
10339
+ end?: number;
10340
+ model?: "preview-model-whisperx-large-v3" | "model-whisperx-large-v3";
10341
+ parameters?: WhisperParameters;
10342
+ alignment?: AlignmentOptions;
10343
+ diarization?: DiarizationOptions;
10344
+ output?: OutputOptions;
10345
+ }
10346
+ interface WhisperParameters {
10347
+ language?: "en" | "es" | "fr" | "de" | "it" | "pt" | "nl" | "pl" | "ja" | "zh" | "ru";
10348
+ task?: "transcribe" | "translate";
10349
+ }
10350
+ interface AlignmentOptions {
10351
+ enabled?: boolean;
10352
+ return_char_alignments?: boolean;
10353
+ interpolate_method?: "nearest" | "linear" | "ignore";
10354
+ }
10355
+ interface DiarizationOptions {
10356
+ enabled?: boolean;
10357
+ num_speakers?: number;
10358
+ min_speakers?: number;
10359
+ max_speakers?: number;
10360
+ return_embeddings?: boolean;
10361
+ fill_nearest?: boolean;
10362
+ apply_word_speakers?: boolean;
10363
+ }
10364
+ interface OutputOptions {
10365
+ include_word_segments?: boolean;
10366
+ include_char_segments?: boolean;
10367
+ }
10368
+ interface WhisperxSliceResponse {
10369
+ id: string;
10370
+ status: "ACCEPTED" | "IN_PROGRESS" | "COMPLETED" | "FAILED";
10371
+ result: WhisperxSliceResultData;
10372
+ }
10373
+ interface WhisperxSliceResultData {
10374
+ language: string;
10375
+ segments?: TranscriptionSegment[];
10376
+ }
10377
+ interface TranscriptionSegment {
10378
+ start: number;
10379
+ end: number;
10380
+ text: string;
10381
+ speaker?: string;
10382
+ words?: WordSegment[];
10383
+ chars?: CharSegment[];
10384
+ }
10385
+ interface WordSegment {
10386
+ word: string;
10387
+ start?: number;
10388
+ end?: number;
10389
+ score?: number;
10390
+ speaker?: string;
10391
+ }
10392
+ interface CharSegment {
10393
+ char: string;
10394
+ start?: number;
10395
+ end?: number;
10396
+ score?: number;
10397
+ }
10398
+
10336
10399
  interface WorkflowTypes {
10337
10400
  'check-text': {
10338
10401
  params: CheckTextCommand;
@@ -11334,6 +11397,10 @@ interface WorkflowTypes {
11334
11397
  params: FaceCollageCommand;
11335
11398
  result: FaceCollageResponse;
11336
11399
  };
11400
+ 'pcp/v1/whisperx-stt-slice': {
11401
+ params: WhisperxSliceCommand;
11402
+ result: WhisperxSliceResponse;
11403
+ };
11337
11404
  }
11338
11405
 
11339
11406
  export type { WorkflowTypes };
package/index.d.ts CHANGED
@@ -288,6 +288,17 @@ type ModelInputById = {
288
288
  imageUrls?: string[];
289
289
  thinking?: "off" | "low" | "medium" | "high";
290
290
  };
291
+ "gemini-omni-1.1-flash-preview": {
292
+ prompt: string;
293
+ aspectRatio?: "16:9" | "9:16";
294
+ resolution?: "360p" | "720p" | "1080p" | "4k";
295
+ duration?: 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
296
+ startFrame?: string;
297
+ endFrame?: string;
298
+ imageUrls?: string[];
299
+ videoUrl?: string;
300
+ videoUrls?: string[];
301
+ };
291
302
  "gemini-omni-flash-preview": {
292
303
  prompt: string;
293
304
  aspectRatio?: "16:9" | "9:16";
@@ -2492,6 +2503,7 @@ declare const Models: {
2492
2503
  readonly Gemini35FlashLite: "gemini-3.5-flash-lite";
2493
2504
  readonly Gemini36Flash: "gemini-3.6-flash";
2494
2505
  readonly Gemini37Flash: "gemini-3.7-flash";
2506
+ readonly GeminiOmni11FlashPreview: "gemini-omni-1.1-flash-preview";
2495
2507
  readonly GeminiOmniFlashPreview: "gemini-omni-flash-preview";
2496
2508
  readonly Gpt55: "gpt-5.5";
2497
2509
  readonly GptImage1: "gpt-image-1";
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);
@@ -5753,9 +5761,56 @@ var { MODELS: MODELS22 } = defineModels("google", [
5753
5761
  ...params.imageInput(1, "Source Image", false, "asset"),
5754
5762
  ...params.videoInput("Source Video", "asset", false)
5755
5763
  }
5764
+ },
5765
+ {
5766
+ id: "gemini-omni-1.1-flash-preview",
5767
+ name: "Gemini Omni 1.2 Flash",
5768
+ specName: "Gemini Omni 1.1 Flash Preview",
5769
+ addedAt: "2026-08-27",
5770
+ workflow: "gemini-omni/video",
5771
+ estimatedTime: { "360p": 30, "720p": 40, "1080p": 60, "4k": 90 },
5772
+ mode: "video",
5773
+ inputType: "t2v",
5774
+ description: "Gemini Omni with frame interpolation, video extension, reference-guided generation, and up to 4K output.",
5775
+ features: [feat("Start/End Frame", "input"), feat("Reference Images & Videos", "input"), feat("Video Extension", "input"), feat("4K", "resolution"), feat("3\u201310 sec", "duration")],
5776
+ paramConfig: {
5777
+ ...params.prompt(),
5778
+ ...params.aspectRatio(["16:9", "9:16"], "16:9"),
5779
+ ...params.resolution(["360p", "720p", "1080p", "4k"], "720p"),
5780
+ ...params.duration([3, 4, 5, 6, 7, 8, 9, 10], 8),
5781
+ ...params.startFrame("Start Frame"),
5782
+ ...params.endFrame("End Frame"),
5783
+ ...params.imageInput(5, "Reference Images", false, "reference"),
5784
+ // Extension source: the worker extends the clip by up to 10s; input must be under 30s.
5785
+ ...params.videoInput("Source Video", "asset", false, 30),
5786
+ ...params.videoInputs(3, "Reference Videos")
5787
+ }
5756
5788
  }
5757
5789
  ]);
5758
5790
 
5791
+ // src/vendors/catalog/gemini.payloads.ts
5792
+ function inferMimeType3(url) {
5793
+ return url.match(/\.png(\?|$)/i) ? "image/png" : "image/jpeg";
5794
+ }
5795
+ var toImage = (url) => ({ url, mimeType: inferMimeType3(url) });
5796
+ var buildOmniFlash11Payload = (input) => ({
5797
+ prompt: input.prompt,
5798
+ model: "gemini-omni-1.1-flash-preview",
5799
+ // Materialize the catalog defaults so direct SDK calls send the advertised
5800
+ // values rather than relying on the worker/vendor defaults.
5801
+ aspectRatio: input.aspectRatio ?? "16:9",
5802
+ durationSeconds: input.duration ?? 8,
5803
+ resolution: input.resolution ?? "720p",
5804
+ ...input.startFrame ? { image: toImage(input.startFrame) } : {},
5805
+ ...input.endFrame ? { lastFrame: toImage(input.endFrame) } : {},
5806
+ ...input.imageUrls?.length ? { referenceImages: input.imageUrls.map(toImage) } : {},
5807
+ ...input.videoUrl ? { video: { url: input.videoUrl } } : {},
5808
+ ...input.videoUrls?.length ? { referenceVideos: input.videoUrls.map((url) => ({ url })) } : {}
5809
+ });
5810
+ registerPayloads(MODELS22, {
5811
+ "gemini-omni-1.1-flash-preview": buildOmniFlash11Payload
5812
+ });
5813
+
5759
5814
  // src/vendors/catalog/openai.ts
5760
5815
  var GPT_IMAGE_AR_TO_SIZE = {
5761
5816
  "1:1": "1024x1024",
@@ -10465,6 +10520,7 @@ var Gemini31FlashLiteImage = "gemini-3.1-flash-lite-image";
10465
10520
  var Gemini35FlashLite = "gemini-3.5-flash-lite";
10466
10521
  var Gemini36Flash = "gemini-3.6-flash";
10467
10522
  var Gemini37Flash = "gemini-3.7-flash";
10523
+ var GeminiOmni11FlashPreview = "gemini-omni-1.1-flash-preview";
10468
10524
  var GeminiOmniFlashPreview = "gemini-omni-flash-preview";
10469
10525
  var Gpt55 = "gpt-5.5";
10470
10526
  var GptImage1 = "gpt-image-1";
@@ -10672,6 +10728,7 @@ var Models = {
10672
10728
  Gemini35FlashLite,
10673
10729
  Gemini36Flash,
10674
10730
  Gemini37Flash,
10731
+ GeminiOmni11FlashPreview,
10675
10732
  GeminiOmniFlashPreview,
10676
10733
  Gpt55,
10677
10734
  GptImage1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "5.18.0",
3
+ "version": "5.19.1",
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",