@picsart/ai-sdk 5.18.0 → 5.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.
@@ -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
@@ -5753,9 +5753,56 @@ var { MODELS: MODELS22 } = defineModels("google", [
5753
5753
  ...params.imageInput(1, "Source Image", false, "asset"),
5754
5754
  ...params.videoInput("Source Video", "asset", false)
5755
5755
  }
5756
+ },
5757
+ {
5758
+ id: "gemini-omni-1.1-flash-preview",
5759
+ name: "Gemini Omni 1.2 Flash",
5760
+ specName: "Gemini Omni 1.1 Flash Preview",
5761
+ addedAt: "2026-08-27",
5762
+ workflow: "gemini-omni/video",
5763
+ estimatedTime: { "360p": 30, "720p": 40, "1080p": 60, "4k": 90 },
5764
+ mode: "video",
5765
+ inputType: "t2v",
5766
+ description: "Gemini Omni with frame interpolation, video extension, reference-guided generation, and up to 4K output.",
5767
+ features: [feat("Start/End Frame", "input"), feat("Reference Images & Videos", "input"), feat("Video Extension", "input"), feat("4K", "resolution"), feat("3\u201310 sec", "duration")],
5768
+ paramConfig: {
5769
+ ...params.prompt(),
5770
+ ...params.aspectRatio(["16:9", "9:16"], "16:9"),
5771
+ ...params.resolution(["360p", "720p", "1080p", "4k"], "720p"),
5772
+ ...params.duration([3, 4, 5, 6, 7, 8, 9, 10], 8),
5773
+ ...params.startFrame("Start Frame"),
5774
+ ...params.endFrame("End Frame"),
5775
+ ...params.imageInput(5, "Reference Images", false, "reference"),
5776
+ // Extension source: the worker extends the clip by up to 10s; input must be under 30s.
5777
+ ...params.videoInput("Source Video", "asset", false, 30),
5778
+ ...params.videoInputs(3, "Reference Videos")
5779
+ }
5756
5780
  }
5757
5781
  ]);
5758
5782
 
5783
+ // src/vendors/catalog/gemini.payloads.ts
5784
+ function inferMimeType3(url) {
5785
+ return url.match(/\.png(\?|$)/i) ? "image/png" : "image/jpeg";
5786
+ }
5787
+ var toImage = (url) => ({ url, mimeType: inferMimeType3(url) });
5788
+ var buildOmniFlash11Payload = (input) => ({
5789
+ prompt: input.prompt,
5790
+ model: "gemini-omni-1.1-flash-preview",
5791
+ // Materialize the catalog defaults so direct SDK calls send the advertised
5792
+ // values rather than relying on the worker/vendor defaults.
5793
+ aspectRatio: input.aspectRatio ?? "16:9",
5794
+ durationSeconds: input.duration ?? 8,
5795
+ resolution: input.resolution ?? "720p",
5796
+ ...input.startFrame ? { image: toImage(input.startFrame) } : {},
5797
+ ...input.endFrame ? { lastFrame: toImage(input.endFrame) } : {},
5798
+ ...input.imageUrls?.length ? { referenceImages: input.imageUrls.map(toImage) } : {},
5799
+ ...input.videoUrl ? { video: { url: input.videoUrl } } : {},
5800
+ ...input.videoUrls?.length ? { referenceVideos: input.videoUrls.map((url) => ({ url })) } : {}
5801
+ });
5802
+ registerPayloads(MODELS22, {
5803
+ "gemini-omni-1.1-flash-preview": buildOmniFlash11Payload
5804
+ });
5805
+
5759
5806
  // src/vendors/catalog/openai.ts
5760
5807
  var GPT_IMAGE_AR_TO_SIZE = {
5761
5808
  "1:1": "1024x1024",
@@ -10465,6 +10512,7 @@ var Gemini31FlashLiteImage = "gemini-3.1-flash-lite-image";
10465
10512
  var Gemini35FlashLite = "gemini-3.5-flash-lite";
10466
10513
  var Gemini36Flash = "gemini-3.6-flash";
10467
10514
  var Gemini37Flash = "gemini-3.7-flash";
10515
+ var GeminiOmni11FlashPreview = "gemini-omni-1.1-flash-preview";
10468
10516
  var GeminiOmniFlashPreview = "gemini-omni-flash-preview";
10469
10517
  var Gpt55 = "gpt-5.5";
10470
10518
  var GptImage1 = "gpt-image-1";
@@ -10672,6 +10720,7 @@ var Models = {
10672
10720
  Gemini35FlashLite,
10673
10721
  Gemini36Flash,
10674
10722
  Gemini37Flash,
10723
+ GeminiOmni11FlashPreview,
10675
10724
  GeminiOmniFlashPreview,
10676
10725
  Gpt55,
10677
10726
  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.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",