@picsart/ai-sdk 5.24.0 → 5.24.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.
package/index.d.ts CHANGED
@@ -822,6 +822,18 @@ type ModelInputById = {
822
822
  bitrate?: 32000 | 64000 | 128000 | 256000;
823
823
  format?: "mp3" | "wav" | "pcm";
824
824
  };
825
+ "muse-image-1.0": {
826
+ prompt: string;
827
+ aspectRatio?: "1:1" | "3:2" | "2:3" | "16:9" | "9:16" | "4:3" | "3:4";
828
+ reasoningStrength?: "low" | "high";
829
+ moderation?: "auto" | "low" | "none";
830
+ enableImageSearch?: boolean;
831
+ enableWebSearch?: boolean;
832
+ enableShell?: boolean;
833
+ outputFormat?: "png" | "jpeg" | "webp";
834
+ count?: 1 | 2 | 4 | 6 | 8 | 10;
835
+ imageUrls?: string[];
836
+ };
825
837
  "ovi": {
826
838
  prompt: string;
827
839
  size?: "9:16" | "16:9" | "1:1" | "9:16+" | "16:9+" | "2:5" | "5:2";
@@ -2026,7 +2038,7 @@ interface ModelFilter$1 {
2026
2038
  release?: ReleaseTag[];
2027
2039
  }
2028
2040
 
2029
- type AppProvider = 'picsart' | 'google' | 'kling' | 'grok' | 'openai' | 'flux' | 'ideogram' | 'elevenlabs' | 'minimax' | 'wan' | 'seedance' | 'ltx' | 'seedream' | 'seedaudio' | 'hunyuan' | 'pika' | 'runway' | 'luma' | 'ovi' | 'creatify' | 'veed' | 'bytedance' | 'qwen' | 'reve' | 'recraft' | 'videography' | 'topaz' | 'heygen' | 'happyhorse' | 'pixverse' | 'anthropic' | 'async' | 'captionsai';
2041
+ type AppProvider = 'picsart' | 'google' | 'kling' | 'grok' | 'openai' | 'flux' | 'ideogram' | 'elevenlabs' | 'minimax' | 'wan' | 'seedance' | 'ltx' | 'seedream' | 'seedaudio' | 'hunyuan' | 'pika' | 'runway' | 'luma' | 'ovi' | 'creatify' | 'veed' | 'bytedance' | 'qwen' | 'reve' | 'recraft' | 'videography' | 'topaz' | 'heygen' | 'happyhorse' | 'pixverse' | 'anthropic' | 'async' | 'captionsai' | 'meta';
2030
2042
  /** Provider used by model definitions. */
2031
2043
  type Provider = AppProvider;
2032
2044
  /** App generation modes. */
@@ -2631,6 +2643,7 @@ declare const Models: {
2631
2643
  readonly MinimaxH3Max: "minimax-h3-max";
2632
2644
  readonly MinimaxMusicV2: "minimax-music-v2";
2633
2645
  readonly MinimaxMusicV3: "minimax-music-v3";
2646
+ readonly MuseImage10: "muse-image-1.0";
2634
2647
  readonly Ovi: "ovi";
2635
2648
  readonly PicsartChangeBg: "picsart-change-bg";
2636
2649
  readonly PicsartEnhance: "picsart-enhance";
package/index.js CHANGED
@@ -821,7 +821,8 @@ var providers = {
821
821
  pixverse: { color: "#7C3AED", label: "PV", name: "PixVerse" },
822
822
  anthropic: { color: "#D97757", label: "CL", name: "Anthropic" },
823
823
  async: { color: "#5E5CE6", label: "AA", name: "Async AI" },
824
- captionsai: { color: "#1D1F20", label: "MR", name: "Mirage" }
824
+ captionsai: { color: "#1D1F20", label: "MR", name: "Mirage" },
825
+ meta: { color: "#0081FB", label: "MT", name: "Meta" }
825
826
  };
826
827
 
827
828
  // src/core/descriptors/presets.ts
@@ -1177,7 +1178,7 @@ var passthroughPayload = (paramConfig) => (ctx) => {
1177
1178
  return payload;
1178
1179
  };
1179
1180
  function defineModels(provider, configs) {
1180
- const MODELS38 = [];
1181
+ const MODELS39 = [];
1181
1182
  for (const c of configs) {
1182
1183
  const prov = c.provider ?? provider;
1183
1184
  const resolvedPayload = c.buildPayload ?? passthroughPayload(c.paramConfig);
@@ -1213,19 +1214,19 @@ function defineModels(provider, configs) {
1213
1214
  if (c.constraints !== void 0) model.constraints = c.constraints;
1214
1215
  const contract = createModelContract(model);
1215
1216
  model.outputSchema = c.outputSchema ?? contract.output;
1216
- MODELS38.push(model);
1217
+ MODELS39.push(model);
1217
1218
  }
1218
- return { MODELS: MODELS38 };
1219
+ return { MODELS: MODELS39 };
1219
1220
  }
1220
- function registerPayloads(MODELS38, payloads) {
1221
+ function registerPayloads(MODELS39, payloads) {
1221
1222
  for (const [id, builder] of Object.entries(payloads)) {
1222
- const model = MODELS38.find((m) => m.id === id);
1223
+ const model = MODELS39.find((m) => m.id === id);
1223
1224
  if (model) model.buildPayload = builder;
1224
1225
  }
1225
1226
  }
1226
- function registerEditPayloads(MODELS38, payloads) {
1227
+ function registerEditPayloads(MODELS39, payloads) {
1227
1228
  for (const [id, builder] of Object.entries(payloads)) {
1228
- const model = MODELS38.find((m) => m.id === id);
1229
+ const model = MODELS39.find((m) => m.id === id);
1229
1230
  if (model) model.buildEditPayload = builder;
1230
1231
  }
1231
1232
  }
@@ -8561,6 +8562,74 @@ registerPayloads(MODELS37, {
8561
8562
  "captionsai-video-captions": buildCaptionsPayload
8562
8563
  });
8563
8564
 
8565
+ // src/vendors/catalog/meta.ts
8566
+ var { MODELS: MODELS38 } = defineModels("meta", [
8567
+ // ── Image ─────────────────────────────────────────
8568
+ {
8569
+ id: "muse-image-1.0",
8570
+ name: "Muse Image 1.0",
8571
+ addedAt: "2026-08-31",
8572
+ workflow: "meta/v1/images/generations",
8573
+ editWorkflow: "meta/v1/images/edits",
8574
+ estimatedTime: 60,
8575
+ mode: "image",
8576
+ inputType: "t2i",
8577
+ description: "Meta's agentic image model \u2014 plans with reasoning, web and image search before rendering.",
8578
+ features: [feat("Multi-Image Input", "input"), feat("Web Search", "characteristic"), feat("High Quality", "quality")],
8579
+ paramConfig: {
8580
+ ...params.prompt(),
8581
+ ...params.aspectRatio(["1:1", "3:2", "2:3", "16:9", "9:16", "4:3", "3:4"], "1:1"),
8582
+ // Vendor-side reasoning tier for the agentic planner; vendor default high.
8583
+ ...p.enum("reasoningStrength", ["low", "high"], "high", { label: "Reasoning" }),
8584
+ ...p.enum("moderation", ["auto", "low", "none"], "auto", { label: "Moderation" }),
8585
+ // Per-tool planner controls — all-true matches the vendor default
8586
+ // (omitting tool_enablement enables every tool).
8587
+ ...p.boolean("enableImageSearch", true, "Image Search"),
8588
+ ...p.boolean("enableWebSearch", true, "Web Search"),
8589
+ ...p.boolean("enableShell", true, "Layout & Chart Tools"),
8590
+ ...p.enum("outputFormat", ["png", "jpeg", "webp"], "png", { label: "Format" }),
8591
+ ...params.count(),
8592
+ ...params.imageInput(5, "Source Images")
8593
+ }
8594
+ }
8595
+ ]);
8596
+
8597
+ // src/vendors/catalog/meta.payloads.ts
8598
+ var MUSE_AR_TO_SIZE = {
8599
+ "1:1": "1024x1024",
8600
+ "3:2": "1536x1024",
8601
+ "2:3": "1024x1536",
8602
+ "16:9": "1820x1024",
8603
+ "9:16": "1024x1820",
8604
+ "4:3": "1365x1024",
8605
+ "3:4": "1024x1365"
8606
+ };
8607
+ var buildMuseCommonPayload = (input) => ({
8608
+ model: "muse-image-1.0",
8609
+ prompt: input.prompt,
8610
+ n: input.count ?? 1,
8611
+ size: MUSE_AR_TO_SIZE[input.aspectRatio ?? ""] ?? "1024x1024",
8612
+ ...input.outputFormat ? { output_format: input.outputFormat } : {},
8613
+ ...input.reasoningStrength ? { reasoning_strength: input.reasoningStrength } : {},
8614
+ ...input.moderation ? { moderation: input.moderation } : {},
8615
+ tool_enablement: {
8616
+ enable_image_search: input.enableImageSearch ?? true,
8617
+ enable_web_search: input.enableWebSearch ?? true,
8618
+ enable_shell: input.enableShell ?? true
8619
+ }
8620
+ });
8621
+ var buildMuseImagePayload = (input) => buildMuseCommonPayload(input);
8622
+ var buildMuseImageEditPayload = (input) => ({
8623
+ ...buildMuseCommonPayload(input),
8624
+ images: input.imageUrls ?? []
8625
+ });
8626
+ registerPayloads(MODELS38, {
8627
+ "muse-image-1.0": buildMuseImagePayload
8628
+ });
8629
+ registerEditPayloads(MODELS38, {
8630
+ "muse-image-1.0": buildMuseImageEditPayload
8631
+ });
8632
+
8564
8633
  // src/vendors/catalog/index.ts
8565
8634
  var ALL_MODELS = [
8566
8635
  ...MODELS,
@@ -8599,7 +8668,8 @@ var ALL_MODELS = [
8599
8668
  ...MODELS34,
8600
8669
  ...MODELS35,
8601
8670
  ...MODELS36,
8602
- ...MODELS37
8671
+ ...MODELS37,
8672
+ ...MODELS38
8603
8673
  ];
8604
8674
  var getModelsByMode = (mode, includeDisabled = false) => ALL_MODELS.filter((m) => m.mode === mode && (includeDisabled || isVisibleForReleases(m)));
8605
8675
 
@@ -10795,6 +10865,7 @@ var MinimaxH3 = "minimax-h3";
10795
10865
  var MinimaxH3Max = "minimax-h3-max";
10796
10866
  var MinimaxMusicV2 = "minimax-music-v2";
10797
10867
  var MinimaxMusicV3 = "minimax-music-v3";
10868
+ var MuseImage10 = "muse-image-1.0";
10798
10869
  var Ovi = "ovi";
10799
10870
  var PicsartChangeBg = "picsart-change-bg";
10800
10871
  var PicsartEnhance = "picsart-enhance";
@@ -11007,6 +11078,7 @@ var Models = {
11007
11078
  MinimaxH3Max,
11008
11079
  MinimaxMusicV2,
11009
11080
  MinimaxMusicV3,
11081
+ MuseImage10,
11010
11082
  Ovi,
11011
11083
  PicsartChangeBg,
11012
11084
  PicsartEnhance,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "5.24.0",
3
+ "version": "5.24.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",