@picsart/ai-sdk 6.53.2 → 6.55.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
@@ -138,6 +138,18 @@ type ModelInputById = {
138
138
  encoding?: "pcm_s16le" | "pcm_f32le";
139
139
  bitRate?: number;
140
140
  };
141
+ "aurora-img-alpha": {
142
+ prompt: string;
143
+ aspectRatio?: "1:1" | "3:2" | "2:3" | "16:9" | "9:16" | "4:3" | "3:4" | "auto";
144
+ resolution?: "1K" | "2K" | "4K";
145
+ size?: string;
146
+ reasoningEffort?: "max" | "xhigh" | "high" | "medium" | "low";
147
+ temperature?: number;
148
+ background?: "opaque" | "transparent";
149
+ outputFormat?: "png" | "jpeg" | "webp";
150
+ count?: 1 | 2 | 4 | 6 | 8 | 10;
151
+ imageUrls?: string[];
152
+ };
141
153
  "bytedance-omnihuman-v1.5": {
142
154
  prompt?: string;
143
155
  imageUrls: [string, ...string[]];
@@ -1348,6 +1360,15 @@ type ModelInputById = {
1348
1360
  seed?: number;
1349
1361
  enableSafetyChecker?: boolean;
1350
1362
  };
1363
+ "minimax-m3": {
1364
+ prompt: string;
1365
+ imageUrls?: string[];
1366
+ };
1367
+ "minimax-m3.1-flash": {
1368
+ prompt: string;
1369
+ imageUrls?: string[];
1370
+ thinking?: "low" | "medium" | "high";
1371
+ };
1351
1372
  "minimax-music-v2": {
1352
1373
  prompt: string;
1353
1374
  lyricsPrompt?: string;
@@ -2032,6 +2053,18 @@ type ModelInputById = {
2032
2053
  imageUrls?: string[];
2033
2054
  negativePrompt?: string;
2034
2055
  };
2056
+ "star-swirl-alpha": {
2057
+ prompt: string;
2058
+ aspectRatio?: "1:1" | "3:2" | "2:3" | "16:9" | "9:16" | "4:3" | "3:4" | "auto";
2059
+ resolution?: "1K" | "2K" | "4K";
2060
+ size?: string;
2061
+ reasoningEffort?: "max" | "xhigh" | "high" | "medium" | "low";
2062
+ temperature?: number;
2063
+ background?: "opaque" | "transparent";
2064
+ outputFormat?: "png" | "jpeg" | "webp";
2065
+ count?: 1 | 2 | 4 | 6 | 8 | 10;
2066
+ imageUrls?: string[];
2067
+ };
2035
2068
  "topaz-upscale-image": {
2036
2069
  imageUrls: [string, ...string[]];
2037
2070
  model?: "Standard V2" | "Standard MAX" | "Low Resolution V2" | "High Fidelity V2" | "CGI" | "Text Refine" | "Redefine" | "Recovery" | "Recovery V2" | "Wonder" | "Wonder 3";
@@ -2170,7 +2203,7 @@ type ModelInputById = {
2170
2203
  type TypedModelId = keyof ModelInputById;
2171
2204
  type ModelInput<M extends TypedModelId> = ModelInputById[M];
2172
2205
  /** IDs of text-generation (LLM) models — narrows generateText(). */
2173
- 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" | "gemini-4-argon" | "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" | "grok-4.7" | "kimi-k3" | "minimax-h3-context-ir";
2206
+ 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" | "gemini-4-argon" | "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" | "grok-4.7" | "kimi-k3" | "minimax-h3-context-ir" | "minimax-m3" | "minimax-m3.1-flash";
2174
2207
  type TextModelInputById = Pick<ModelInputById, TextModelId>;
2175
2208
  /** IDs of structured-output (json-mode) models — narrows run()'s result type. */
2176
2209
  type JsonModelId = "typesafe-evaluate";
@@ -3537,6 +3570,7 @@ declare function createClient(config: ClientConfig): AiClient;
3537
3570
 
3538
3571
  declare const Models: {
3539
3572
  readonly AsyncFlashV1: "async-flash-v1";
3573
+ readonly AuroraImgAlpha: "aurora-img-alpha";
3540
3574
  readonly BytedanceOmnihumanV15: "bytedance-omnihuman-v1.5";
3541
3575
  readonly BytedanceOmnihumanV20: "bytedance-omnihuman-v2.0";
3542
3576
  readonly BytedanceVideoEnhance: "bytedance-video-enhance";
@@ -3699,6 +3733,8 @@ declare const Models: {
3699
3733
  readonly MinimaxH3MaxLipSync: "minimax-h3-max-lip-sync";
3700
3734
  readonly MinimaxH3MaxRelight: "minimax-h3-max-relight";
3701
3735
  readonly MinimaxH3MaxTurbo: "minimax-h3-max-turbo";
3736
+ readonly MinimaxM3: "minimax-m3";
3737
+ readonly MinimaxM31Flash: "minimax-m3.1-flash";
3702
3738
  readonly MinimaxMusicV2: "minimax-music-v2";
3703
3739
  readonly MinimaxMusicV3: "minimax-music-v3";
3704
3740
  readonly MireloSfx20TextToAudio: "mirelo-sfx-2.0-text-to-audio";
@@ -3788,6 +3824,7 @@ declare const Models: {
3788
3824
  readonly Seedream50Flash: "seedream-5.0-flash";
3789
3825
  readonly Seedream50Lite: "seedream-5.0-lite";
3790
3826
  readonly Seedream50Pro: "seedream-5.0-pro";
3827
+ readonly StarSwirlAlpha: "star-swirl-alpha";
3791
3828
  readonly TopazUpscaleImage: "topaz-upscale-image";
3792
3829
  readonly TopazUpscaleVideo: "topaz-upscale-video";
3793
3830
  readonly TypesafeEvaluate: "typesafe-evaluate";
package/index.js CHANGED
@@ -7445,6 +7445,7 @@ var buildGptImage2EditPayload = (ctx) => ({
7445
7445
  });
7446
7446
  var GPT_IMAGE_PROMPT_MAX = 32e3;
7447
7447
  var GPT_IMAGE_25_QUALITIES = ["max", "xhigh", "high", "medium", "low"];
7448
+ var IMAGEGEN_26_ALPHA_EFFORTS = ["max", "xhigh", "high", "medium", "low"];
7448
7449
  var GPT_IMAGE_25_ASPECT_RATIOS = ["1:1", "3:2", "2:3", "16:9", "9:16", "4:3", "3:4", "auto"];
7449
7450
  var GPT_IMAGE_25_RESOLUTIONS = Object.keys(GPT_IMAGE_25_SIZES);
7450
7451
  var GPT_IMAGE_25_MAX_INPUT_IMAGES = 16;
@@ -7485,6 +7486,64 @@ var validateGptImage25Input = (input) => {
7485
7486
  };
7486
7487
  var { MODELS: MODELS22 } = defineModels("openai", [
7487
7488
  // ── Image ─────────────────────────────────────────
7489
+ // ImageGen 2.6 alpha (preview) — same two OpenAI image workflows as the
7490
+ // gpt-image tiers, but driven by reasoning.effort + temperature instead of
7491
+ // quality (quality is withheld for these models). aurora is the base tier,
7492
+ // star-swirl the smaller one; both token-priced like gpt-image-2.5.
7493
+ {
7494
+ id: "aurora-img-alpha",
7495
+ name: "Aurora (ImageGen 2.6 Alpha)",
7496
+ addedAt: "2026-10-23",
7497
+ release: "preview",
7498
+ workflow: "openai-images-generate",
7499
+ editWorkflow: "openai-image-editing",
7500
+ estimatedTime: 60,
7501
+ mode: "image",
7502
+ inputType: "t2i",
7503
+ description: "ImageGen 2.6 alpha (preview) \u2014 base tier tuned by reasoning effort and temperature rather than quality. Strong text rendering and complex layouts.",
7504
+ features: [feat("Multi-Image Input", "input"), feat("High Quality", "quality")],
7505
+ paramConfig: {
7506
+ ...params.prompt({ maxLength: GPT_IMAGE_PROMPT_MAX }),
7507
+ ...params.aspectRatio(GPT_IMAGE_25_ASPECT_RATIOS, "1:1"),
7508
+ ...params.resolution(GPT_IMAGE_25_RESOLUTIONS, "1K"),
7509
+ ...p.text("size", { label: "Custom Size", placeholder: "WIDTHxHEIGHT, e.g. 2048x1152" }),
7510
+ ...p.enum("reasoningEffort", IMAGEGEN_26_ALPHA_EFFORTS, "high", { label: "Reasoning Effort" }),
7511
+ ...p.range("temperature", 0, 2, 1, { step: 0.1, label: "Temperature" }),
7512
+ ...p.enum("background", ["opaque", "transparent"], "opaque", { label: "Background" }),
7513
+ ...p.enum("outputFormat", ["png", "jpeg", "webp"], "png", { label: "Format" }),
7514
+ ...params.count(),
7515
+ ...params.imageInput(GPT_IMAGE_25_MAX_INPUT_IMAGES, "Source Images")
7516
+ },
7517
+ constraints: [...gptImageBgConstraints, ...gptImage25SizeConstraints],
7518
+ validateInput: validateGptImage25Input
7519
+ },
7520
+ {
7521
+ id: "star-swirl-alpha",
7522
+ name: "Star Swirl (ImageGen 2.6 Alpha)",
7523
+ addedAt: "2026-10-23",
7524
+ release: "preview",
7525
+ workflow: "openai-images-generate",
7526
+ editWorkflow: "openai-image-editing",
7527
+ estimatedTime: 40,
7528
+ mode: "image",
7529
+ inputType: "t2i",
7530
+ description: "ImageGen 2.6 alpha (preview) \u2014 smaller, faster tier tuned by reasoning effort and temperature rather than quality. Quick, precise edits and generation.",
7531
+ features: [feat("Multi-Image Input", "input"), feat("Fast", "characteristic")],
7532
+ paramConfig: {
7533
+ ...params.prompt({ maxLength: GPT_IMAGE_PROMPT_MAX }),
7534
+ ...params.aspectRatio(GPT_IMAGE_25_ASPECT_RATIOS, "1:1"),
7535
+ ...params.resolution(GPT_IMAGE_25_RESOLUTIONS, "1K"),
7536
+ ...p.text("size", { label: "Custom Size", placeholder: "WIDTHxHEIGHT, e.g. 2048x1152" }),
7537
+ ...p.enum("reasoningEffort", IMAGEGEN_26_ALPHA_EFFORTS, "high", { label: "Reasoning Effort" }),
7538
+ ...p.range("temperature", 0, 2, 1, { step: 0.1, label: "Temperature" }),
7539
+ ...p.enum("background", ["opaque", "transparent"], "opaque", { label: "Background" }),
7540
+ ...p.enum("outputFormat", ["png", "jpeg", "webp"], "png", { label: "Format" }),
7541
+ ...params.count(),
7542
+ ...params.imageInput(GPT_IMAGE_25_MAX_INPUT_IMAGES, "Source Images")
7543
+ },
7544
+ constraints: [...gptImageBgConstraints, ...gptImage25SizeConstraints],
7545
+ validateInput: validateGptImage25Input
7546
+ },
7488
7547
  {
7489
7548
  id: "gpt-image-2.5-sunburst",
7490
7549
  name: "GPT Image 2.5 Sunburst",
@@ -7649,6 +7708,37 @@ registerEditPayloads(MODELS22, {
7649
7708
  "gpt-image-2.5-flare": editFor("gpt-image-2.5-flare"),
7650
7709
  "gpt-image-2.5-sunburst": editFor("gpt-image-2.5-sunburst")
7651
7710
  });
7711
+ var alphaPlanningControls = (input) => ({
7712
+ ...input.reasoningEffort ? { reasoning: { effort: input.reasoningEffort } } : {},
7713
+ ...input.temperature !== void 0 ? { temperature: input.temperature } : {}
7714
+ });
7715
+ var generateAlphaFor = (model) => (input) => ({
7716
+ prompt: input.prompt,
7717
+ model,
7718
+ n: input.count ?? 1,
7719
+ size: resolveSize(input, "1:1"),
7720
+ ...alphaPlanningControls(input),
7721
+ ...input.background ? { background: input.background } : {},
7722
+ ...input.outputFormat ? { output_format: input.outputFormat } : {}
7723
+ });
7724
+ var editAlphaFor = (model) => (input) => ({
7725
+ prompt: input.prompt,
7726
+ model,
7727
+ images: input.imageUrls ?? [],
7728
+ n: input.count ?? 1,
7729
+ size: resolveSize(input, "auto"),
7730
+ ...alphaPlanningControls(input),
7731
+ ...input.background ? { background: input.background } : {},
7732
+ ...input.outputFormat ? { output_format: input.outputFormat } : {}
7733
+ });
7734
+ registerPayloads(MODELS22, {
7735
+ "aurora-img-alpha": generateAlphaFor("aurora-img-alpha"),
7736
+ "star-swirl-alpha": generateAlphaFor("star-swirl-alpha")
7737
+ });
7738
+ registerEditPayloads(MODELS22, {
7739
+ "aurora-img-alpha": editAlphaFor("aurora-img-alpha"),
7740
+ "star-swirl-alpha": editAlphaFor("star-swirl-alpha")
7741
+ });
7652
7742
 
7653
7743
  // src/vendors/catalog/elevenlabs.ts
7654
7744
  var VOICE_CATALOG = { workflow: "elevenlabs/v1/catalog/voices" };
@@ -11029,7 +11119,41 @@ var h3ContextIrConstraints = [
11029
11119
  { when: { videoUrls: { exists: true } }, then: H3_REFERENCE_EXCLUDES_FRAMES },
11030
11120
  { when: { audioUrls: { exists: true } }, then: H3_REFERENCE_EXCLUDES_FRAMES }
11031
11121
  ];
11122
+ var minimaxFlashThinkingParam = () => p.enum("thinking", ["low", "medium", "high"], "high", { label: "Thinking" });
11032
11123
  var { MODELS: MINIMAX_LLM } = defineModels("minimax", [
11124
+ {
11125
+ id: "minimax-m3",
11126
+ name: "MiniMax M3",
11127
+ workflow: "chat-completions",
11128
+ addedAt: "2026-10-26",
11129
+ estimatedTime: 10,
11130
+ mode: "text",
11131
+ inputType: "i2t",
11132
+ badge: ["new"],
11133
+ description: "MiniMax\u2019s flagship model \u2014 adaptive reasoning with a 1M-token context.",
11134
+ features: [feat("Vision", "input"), feat("Thinking", "characteristic")],
11135
+ paramConfig: {
11136
+ ...params.prompt(),
11137
+ ...params.imageInput(8, "Images")
11138
+ }
11139
+ },
11140
+ {
11141
+ id: "minimax-m3.1-flash",
11142
+ name: "MiniMax M3.1 Flash",
11143
+ workflow: "chat-completions",
11144
+ addedAt: "2026-10-26",
11145
+ estimatedTime: 8,
11146
+ mode: "text",
11147
+ inputType: "i2t",
11148
+ badge: ["new"],
11149
+ description: "Fast, low-cost MiniMax model \u2014 always-on reasoning with a 1M-token context.",
11150
+ features: [feat("Vision", "input"), feat("Thinking", "characteristic")],
11151
+ paramConfig: {
11152
+ ...params.prompt(),
11153
+ ...params.imageInput(8, "Images"),
11154
+ ...minimaxFlashThinkingParam()
11155
+ }
11156
+ },
11033
11157
  {
11034
11158
  id: "minimax-h3-context-ir",
11035
11159
  name: "MiniMax H3 Context IR",
@@ -11162,7 +11286,9 @@ registerPayloads(MODELS34, {
11162
11286
  "gemini-3.5-flash-lite": buildOpenAiPayload("gemini-3.5-flash-lite"),
11163
11287
  "gemini-2.5-flash": buildOpenAiPayload("gemini-2.5-flash"),
11164
11288
  "kimi-k3": buildOpenAiPayload("kimi-k3"),
11165
- "grok-4.7": buildOpenAiPayload("grok-4.7")
11289
+ "grok-4.7": buildOpenAiPayload("grok-4.7"),
11290
+ "minimax-m3": buildOpenAiPayload("minimax-m3"),
11291
+ "minimax-m3.1-flash": buildOpenAiPayload("minimax-m3.1-flash")
11166
11292
  });
11167
11293
 
11168
11294
  // src/vendors/catalog/captionsai.ts
@@ -15237,6 +15363,7 @@ function createClient(config) {
15237
15363
 
15238
15364
  // src/generated/model-constants.ts
15239
15365
  var AsyncFlashV1 = "async-flash-v1";
15366
+ var AuroraImgAlpha = "aurora-img-alpha";
15240
15367
  var BytedanceOmnihumanV15 = "bytedance-omnihuman-v1.5";
15241
15368
  var BytedanceOmnihumanV20 = "bytedance-omnihuman-v2.0";
15242
15369
  var BytedanceVideoEnhance = "bytedance-video-enhance";
@@ -15399,6 +15526,8 @@ var MinimaxH3MaxExtend = "minimax-h3-max-extend";
15399
15526
  var MinimaxH3MaxLipSync = "minimax-h3-max-lip-sync";
15400
15527
  var MinimaxH3MaxRelight = "minimax-h3-max-relight";
15401
15528
  var MinimaxH3MaxTurbo = "minimax-h3-max-turbo";
15529
+ var MinimaxM3 = "minimax-m3";
15530
+ var MinimaxM31Flash = "minimax-m3.1-flash";
15402
15531
  var MinimaxMusicV2 = "minimax-music-v2";
15403
15532
  var MinimaxMusicV3 = "minimax-music-v3";
15404
15533
  var MireloSfx20TextToAudio = "mirelo-sfx-2.0-text-to-audio";
@@ -15488,6 +15617,7 @@ var Seedream47 = "seedream-4.7";
15488
15617
  var Seedream50Flash = "seedream-5.0-flash";
15489
15618
  var Seedream50Lite = "seedream-5.0-lite";
15490
15619
  var Seedream50Pro = "seedream-5.0-pro";
15620
+ var StarSwirlAlpha = "star-swirl-alpha";
15491
15621
  var TopazUpscaleImage = "topaz-upscale-image";
15492
15622
  var TopazUpscaleVideo = "topaz-upscale-video";
15493
15623
  var TypesafeEvaluate = "typesafe-evaluate";
@@ -15505,6 +15635,7 @@ var Wan30Video = "wan-3.0-video";
15505
15635
  var Wan30VideoPrime = "wan-3.0-video-prime";
15506
15636
  var Models = {
15507
15637
  AsyncFlashV1,
15638
+ AuroraImgAlpha,
15508
15639
  BytedanceOmnihumanV15,
15509
15640
  BytedanceOmnihumanV20,
15510
15641
  BytedanceVideoEnhance,
@@ -15667,6 +15798,8 @@ var Models = {
15667
15798
  MinimaxH3MaxLipSync,
15668
15799
  MinimaxH3MaxRelight,
15669
15800
  MinimaxH3MaxTurbo,
15801
+ MinimaxM3,
15802
+ MinimaxM31Flash,
15670
15803
  MinimaxMusicV2,
15671
15804
  MinimaxMusicV3,
15672
15805
  MireloSfx20TextToAudio,
@@ -15756,6 +15889,7 @@ var Models = {
15756
15889
  Seedream50Flash,
15757
15890
  Seedream50Lite,
15758
15891
  Seedream50Pro,
15892
+ StarSwirlAlpha,
15759
15893
  TopazUpscaleImage,
15760
15894
  TopazUpscaleVideo,
15761
15895
  TypesafeEvaluate,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "6.53.2",
3
+ "version": "6.55.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",