@picsart/ai-sdk 6.31.0 → 6.33.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
@@ -168,6 +168,10 @@ type ModelInputById = {
168
168
  prompt: string;
169
169
  imageUrls?: string[];
170
170
  };
171
+ "claude-haiku-5-5": {
172
+ prompt: string;
173
+ imageUrls?: string[];
174
+ };
171
175
  "claude-opus-4-8": {
172
176
  prompt: string;
173
177
  imageUrls?: string[];
@@ -1618,6 +1622,13 @@ type ModelInputById = {
1618
1622
  aspectRatio?: "16:9" | "9:16";
1619
1623
  imageUrls?: string[];
1620
1624
  };
1625
+ "sam-3-video": {
1626
+ prompt: string;
1627
+ videoUrl: string;
1628
+ detectionThreshold?: number;
1629
+ applyMask?: boolean;
1630
+ outputFormat?: "mp4" | "webm";
1631
+ };
1621
1632
  "seed-audio-1.0": {
1622
1633
  prompt: string;
1623
1634
  voiceId?: string;
@@ -2070,7 +2081,7 @@ type ModelInputById = {
2070
2081
  type TypedModelId = keyof ModelInputById;
2071
2082
  type ModelInput<M extends TypedModelId> = ModelInputById[M];
2072
2083
  /** IDs of text-generation (LLM) models — narrows generateText(). */
2073
- type TextModelId = "claude-fable-5" | "claude-fable-5-1" | "claude-haiku-4-5" | "claude-opus-4-8" | "claude-opus-5" | "claude-sonnet-4-5" | "claude-sonnet-4-6" | "claude-sonnet-5" | "eleven-speech-to-text" | "gemini-2.5-flash" | "gemini-3-pro" | "gemini-3.5-flash-lite" | "gemini-3.6-flash" | "gemini-3.7-flash" | "gemini-3.8-flash" | "gpt-4.1-mini" | "gpt-4.1-nano" | "gpt-4o" | "gpt-4o-mini" | "gpt-5" | "gpt-5-mini" | "gpt-5.1" | "gpt-5.2" | "gpt-5.5" | "gpt-5.6-luna" | "gpt-5.6-sol" | "gpt-5.6-terra" | "gpt-6-astra" | "gpt-6-luna" | "gpt-6-sol";
2084
+ type TextModelId = "claude-fable-5" | "claude-fable-5-1" | "claude-haiku-4-5" | "claude-haiku-5-5" | "claude-opus-4-8" | "claude-opus-5" | "claude-sonnet-4-5" | "claude-sonnet-4-6" | "claude-sonnet-5" | "eleven-speech-to-text" | "gemini-2.5-flash" | "gemini-3-pro" | "gemini-3.5-flash-lite" | "gemini-3.6-flash" | "gemini-3.7-flash" | "gemini-3.8-flash" | "gpt-4.1-mini" | "gpt-4.1-nano" | "gpt-4o" | "gpt-4o-mini" | "gpt-5" | "gpt-5-mini" | "gpt-5.1" | "gpt-5.2" | "gpt-5.5" | "gpt-5.6-luna" | "gpt-5.6-sol" | "gpt-5.6-terra" | "gpt-6-astra" | "gpt-6-luna" | "gpt-6-sol";
2074
2085
  type TextModelInputById = Pick<ModelInputById, TextModelId>;
2075
2086
  /** IDs of structured-output (json-mode) models — narrows run()'s result type. */
2076
2087
  type JsonModelId = "typesafe-evaluate";
@@ -3353,6 +3364,7 @@ declare const Models: {
3353
3364
  readonly ClaudeFable5: "claude-fable-5";
3354
3365
  readonly ClaudeFable51: "claude-fable-5-1";
3355
3366
  readonly ClaudeHaiku45: "claude-haiku-4-5";
3367
+ readonly ClaudeHaiku55: "claude-haiku-5-5";
3356
3368
  readonly ClaudeOpus48: "claude-opus-4-8";
3357
3369
  readonly ClaudeOpus5: "claude-opus-5";
3358
3370
  readonly ClaudeSonnet45: "claude-sonnet-4-5";
@@ -3558,6 +3570,7 @@ declare const Models: {
3558
3570
  readonly RunwayGen4Aleph: "runway-gen4-aleph";
3559
3571
  readonly RunwayGen4Ref: "runway-gen4-ref";
3560
3572
  readonly RunwayGen45: "runway-gen4.5";
3573
+ readonly Sam3Video: "sam-3-video";
3561
3574
  readonly SeedAudio10: "seed-audio-1.0";
3562
3575
  readonly SeedAudio10Multilingual: "seed-audio-1.0-multilingual";
3563
3576
  readonly Seedance15Pro: "seedance-1.5-pro";
package/index.js CHANGED
@@ -10149,6 +10149,19 @@ var { MODELS: ANTHROPIC } = defineModels("anthropic", [
10149
10149
  features: [feat("Vision", "input")],
10150
10150
  paramConfig: { ...params.prompt(), ...params.imageInput(8, "Images") }
10151
10151
  },
10152
+ {
10153
+ id: "claude-haiku-5-5",
10154
+ name: "Claude Haiku 5.5",
10155
+ workflow: "claude/v1/messages",
10156
+ addedAt: "2026-10-09",
10157
+ estimatedTime: 4,
10158
+ mode: "text",
10159
+ inputType: "i2t",
10160
+ badge: ["fast"],
10161
+ description: "Next-generation Haiku \u2014 fast, lightweight Claude for high-volume text tasks.",
10162
+ features: [feat("Vision", "input")],
10163
+ paramConfig: { ...params.prompt(), ...params.imageInput(8, "Images") }
10164
+ },
10152
10165
  {
10153
10166
  id: "claude-haiku-4-5",
10154
10167
  name: "Claude Haiku 4.5",
@@ -10569,6 +10582,7 @@ registerPayloads(MODELS35, {
10569
10582
  "claude-sonnet-5": buildClaudePayload("claude-sonnet-5"),
10570
10583
  "claude-sonnet-4-6": buildClaudePayload("claude-sonnet-4-6"),
10571
10584
  "claude-sonnet-4-5": buildClaudePayload("claude-sonnet-4-5"),
10585
+ "claude-haiku-5-5": buildClaudePayload("claude-haiku-5-5"),
10572
10586
  "claude-haiku-4-5": buildClaudePayload("claude-haiku-4-5"),
10573
10587
  "gpt-6-astra": buildOpenAiPayload("gpt-6-astra"),
10574
10588
  "gpt-6-sol": buildOpenAiPayload("gpt-6-sol"),
@@ -10672,6 +10686,30 @@ var { MODELS: MODELS37 } = defineModels("meta", [
10672
10686
  ...params.count(),
10673
10687
  ...params.imageInput(5, "Source Images")
10674
10688
  }
10689
+ },
10690
+ // ── Video ─────────────────────────────────────────
10691
+ {
10692
+ // Billed per second of the source clip at one flat rate, so none of the
10693
+ // knobs below changes the price.
10694
+ id: "sam-3-video",
10695
+ name: "SAM 3 Video",
10696
+ modelId: "fal-ai-sam-3-video",
10697
+ addedAt: "2026-10-12",
10698
+ workflow: "sam-3/video",
10699
+ estimatedTime: 60,
10700
+ mode: "video",
10701
+ inputType: "v2v",
10702
+ description: "Segment and track objects through a video from a text prompt \u2014 name several objects separated by commas and SAM 3 keeps each one masked across every frame.",
10703
+ features: [feat("Segmentation", "characteristic"), feat("Object Tracking", "characteristic"), feat("Video Input", "input")],
10704
+ paramConfig: {
10705
+ ...params.prompt({ placeholder: "person, cloth" }),
10706
+ ...params.videoInput("Source Video", "asset", true),
10707
+ // Lower finds more objects but less precisely.
10708
+ ...p.range("detectionThreshold", 0, 1, 0.5, { step: 0.05, label: "Detection Threshold" }),
10709
+ // Off returns the source frames without the mask overlay.
10710
+ ...p.boolean("applyMask", true, "Apply Mask"),
10711
+ ...p.enum("outputFormat", ["mp4", "webm"], "mp4", { label: "Format" })
10712
+ }
10675
10713
  }
10676
10714
  ]);
10677
10715
 
@@ -10704,8 +10742,20 @@ var buildMuseImageEditPayload = (input) => ({
10704
10742
  ...buildMuseCommonPayload(input),
10705
10743
  images: input.imageUrls ?? []
10706
10744
  });
10745
+ var SAM3_OUTPUT_TYPE = {
10746
+ mp4: "X264 (.mp4)",
10747
+ webm: "VP9 (.webm)"
10748
+ };
10749
+ var buildSam3VideoPayload = (input) => ({
10750
+ video_url: input.videoUrl,
10751
+ prompt: input.prompt,
10752
+ detection_threshold: input.detectionThreshold ?? 0.5,
10753
+ apply_mask: input.applyMask ?? true,
10754
+ video_output_type: SAM3_OUTPUT_TYPE[input.outputFormat ?? "mp4"]
10755
+ });
10707
10756
  registerPayloads(MODELS37, {
10708
- "muse-image-1.0": buildMuseImagePayload
10757
+ "muse-image-1.0": buildMuseImagePayload,
10758
+ "sam-3-video": buildSam3VideoPayload
10709
10759
  });
10710
10760
  registerEditPayloads(MODELS37, {
10711
10761
  "muse-image-1.0": buildMuseImageEditPayload
@@ -13690,6 +13740,7 @@ var CaptionsaiVideoCaptions = "captionsai-video-captions";
13690
13740
  var ClaudeFable5 = "claude-fable-5";
13691
13741
  var ClaudeFable51 = "claude-fable-5-1";
13692
13742
  var ClaudeHaiku45 = "claude-haiku-4-5";
13743
+ var ClaudeHaiku55 = "claude-haiku-5-5";
13693
13744
  var ClaudeOpus48 = "claude-opus-4-8";
13694
13745
  var ClaudeOpus5 = "claude-opus-5";
13695
13746
  var ClaudeSonnet45 = "claude-sonnet-4-5";
@@ -13895,6 +13946,7 @@ var RunwayGen3aTurbo = "runway-gen3a-turbo";
13895
13946
  var RunwayGen4Aleph = "runway-gen4-aleph";
13896
13947
  var RunwayGen4Ref = "runway-gen4-ref";
13897
13948
  var RunwayGen45 = "runway-gen4.5";
13949
+ var Sam3Video = "sam-3-video";
13898
13950
  var SeedAudio10 = "seed-audio-1.0";
13899
13951
  var SeedAudio10Multilingual = "seed-audio-1.0-multilingual";
13900
13952
  var Seedance15Pro = "seedance-1.5-pro";
@@ -13949,6 +14001,7 @@ var Models = {
13949
14001
  ClaudeFable5,
13950
14002
  ClaudeFable51,
13951
14003
  ClaudeHaiku45,
14004
+ ClaudeHaiku55,
13952
14005
  ClaudeOpus48,
13953
14006
  ClaudeOpus5,
13954
14007
  ClaudeSonnet45,
@@ -14154,6 +14207,7 @@ var Models = {
14154
14207
  RunwayGen4Aleph,
14155
14208
  RunwayGen4Ref,
14156
14209
  RunwayGen45,
14210
+ Sam3Video,
14157
14211
  SeedAudio10,
14158
14212
  SeedAudio10Multilingual,
14159
14213
  Seedance15Pro,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "6.31.0",
3
+ "version": "6.33.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",