@picsart/ai-sdk 5.31.0 → 5.32.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
@@ -383,6 +383,24 @@ type ModelInputById = {
383
383
  count?: 1 | 2 | 4 | 6 | 8 | 10;
384
384
  imageUrls?: string[];
385
385
  };
386
+ "gpt-image-2.5-flare": {
387
+ prompt: string;
388
+ aspectRatio?: "1:1" | "3:2" | "2:3" | "16:9" | "9:16" | "4:3" | "3:4" | "auto";
389
+ quality?: "max" | "xhigh" | "high" | "medium" | "low";
390
+ background?: "opaque" | "transparent";
391
+ outputFormat?: "png" | "jpeg" | "webp";
392
+ count?: 1 | 2 | 4 | 6 | 8 | 10;
393
+ imageUrls?: string[];
394
+ };
395
+ "gpt-image-2.5-sunburst": {
396
+ prompt: string;
397
+ aspectRatio?: "1:1" | "3:2" | "2:3" | "16:9" | "9:16" | "4:3" | "3:4" | "auto";
398
+ quality?: "max" | "xhigh" | "high" | "medium" | "low";
399
+ background?: "opaque" | "transparent";
400
+ outputFormat?: "png" | "jpeg" | "webp";
401
+ count?: 1 | 2 | 4 | 6 | 8 | 10;
402
+ imageUrls?: string[];
403
+ };
386
404
  "grok-edit-video": {
387
405
  prompt: string;
388
406
  videoUrl: string;
@@ -2686,6 +2704,8 @@ declare const Models: {
2686
2704
  readonly GptImage1: "gpt-image-1";
2687
2705
  readonly GptImage15: "gpt-image-1.5";
2688
2706
  readonly GptImage2: "gpt-image-2";
2707
+ readonly GptImage25Flare: "gpt-image-2.5-flare";
2708
+ readonly GptImage25Sunburst: "gpt-image-2.5-sunburst";
2689
2709
  readonly GrokEditVideo: "grok-edit-video";
2690
2710
  readonly GrokExtendVideo: "grok-extend-video";
2691
2711
  readonly GrokImagineImage: "grok-imagine-image";
package/index.js CHANGED
@@ -6163,6 +6163,9 @@ var buildGptImage2EditPayload = (ctx) => ({
6163
6163
  ...ctx.outputFormat ? { output_format: ctx.outputFormat } : {}
6164
6164
  });
6165
6165
  var GPT_IMAGE_PROMPT_MAX = 32e3;
6166
+ var GPT_IMAGE_25_QUALITIES = ["max", "xhigh", "high", "medium", "low"];
6167
+ var GPT_IMAGE_25_ASPECT_RATIOS = ["1:1", "3:2", "2:3", "16:9", "9:16", "4:3", "3:4", "auto"];
6168
+ var GPT_IMAGE_25_MAX_INPUT_IMAGES = 16;
6166
6169
  var gptImage2Constraints = [
6167
6170
  {
6168
6171
  when: { imageUrls: { exists: true } },
@@ -6181,6 +6184,50 @@ var gptImageBgConstraints = [
6181
6184
  ];
6182
6185
  var { MODELS: MODELS23 } = defineModels("openai", [
6183
6186
  // ── Image ─────────────────────────────────────────
6187
+ {
6188
+ id: "gpt-image-2.5-sunburst",
6189
+ name: "GPT Image 2.5 Sunburst",
6190
+ addedAt: "2026-09-09",
6191
+ workflow: "openai-images-generate",
6192
+ editWorkflow: "openai-image-editing",
6193
+ estimatedTime: 60,
6194
+ mode: "image",
6195
+ inputType: "t2i",
6196
+ description: "Most capable GPT Image tier \u2014 premium edits and campaign-grade output, with longer generation times.",
6197
+ features: [feat("Multi-Image Input", "input"), feat("High Quality", "quality")],
6198
+ paramConfig: {
6199
+ ...params.prompt({ maxLength: GPT_IMAGE_PROMPT_MAX }),
6200
+ ...params.aspectRatio(GPT_IMAGE_25_ASPECT_RATIOS, "1:1"),
6201
+ ...p.quality(GPT_IMAGE_25_QUALITIES, "high"),
6202
+ ...p.enum("background", ["opaque", "transparent"], "opaque", { label: "Background" }),
6203
+ ...p.enum("outputFormat", ["png", "jpeg", "webp"], "png", { label: "Format" }),
6204
+ ...params.count(),
6205
+ ...params.imageInput(GPT_IMAGE_25_MAX_INPUT_IMAGES, "Source Images")
6206
+ },
6207
+ constraints: gptImageBgConstraints
6208
+ },
6209
+ {
6210
+ id: "gpt-image-2.5-flare",
6211
+ name: "GPT Image 2.5 Flare",
6212
+ addedAt: "2026-09-09",
6213
+ workflow: "openai-images-generate",
6214
+ editWorkflow: "openai-image-editing",
6215
+ estimatedTime: 25,
6216
+ mode: "image",
6217
+ inputType: "t2i",
6218
+ description: "Fast GPT Image tier \u2014 everyday generation at roughly half the latency of GPT Image 2.",
6219
+ features: [feat("Multi-Image Input", "input"), feat("Fast", "characteristic")],
6220
+ paramConfig: {
6221
+ ...params.prompt({ maxLength: GPT_IMAGE_PROMPT_MAX }),
6222
+ ...params.aspectRatio(GPT_IMAGE_25_ASPECT_RATIOS, "1:1"),
6223
+ ...p.quality(GPT_IMAGE_25_QUALITIES, "high"),
6224
+ ...p.enum("background", ["opaque", "transparent"], "opaque", { label: "Background" }),
6225
+ ...p.enum("outputFormat", ["png", "jpeg", "webp"], "png", { label: "Format" }),
6226
+ ...params.count(),
6227
+ ...params.imageInput(GPT_IMAGE_25_MAX_INPUT_IMAGES, "Source Images")
6228
+ },
6229
+ constraints: gptImageBgConstraints
6230
+ },
6184
6231
  {
6185
6232
  id: "gpt-image-2",
6186
6233
  name: "GPT Image 2",
@@ -6261,6 +6308,36 @@ var { MODELS: MODELS23 } = defineModels("openai", [
6261
6308
  }
6262
6309
  ]);
6263
6310
 
6311
+ // src/vendors/catalog/openai.payloads.ts
6312
+ var resolveSize = (aspectRatio, fallback) => aspectRatio === "auto" ? "auto" : GPT_IMAGE_2_AR_TO_SIZE[aspectRatio ?? ""] ?? fallback;
6313
+ var generateFor = (model) => (input) => ({
6314
+ prompt: input.prompt,
6315
+ model,
6316
+ n: input.count ?? 1,
6317
+ size: resolveSize(input.aspectRatio, "1024x1024"),
6318
+ quality: input.quality ?? "high",
6319
+ ...input.background ? { background: input.background } : {},
6320
+ ...input.outputFormat ? { output_format: input.outputFormat } : {}
6321
+ });
6322
+ var editFor = (model) => (input) => ({
6323
+ prompt: input.prompt,
6324
+ model,
6325
+ images: input.imageUrls ?? [],
6326
+ n: input.count ?? 1,
6327
+ size: resolveSize(input.aspectRatio, "auto"),
6328
+ quality: input.quality ?? "high",
6329
+ ...input.background ? { background: input.background } : {},
6330
+ ...input.outputFormat ? { output_format: input.outputFormat } : {}
6331
+ });
6332
+ registerPayloads(MODELS23, {
6333
+ "gpt-image-2.5-flare": generateFor("gpt-image-2.5-flare"),
6334
+ "gpt-image-2.5-sunburst": generateFor("gpt-image-2.5-sunburst")
6335
+ });
6336
+ registerEditPayloads(MODELS23, {
6337
+ "gpt-image-2.5-flare": editFor("gpt-image-2.5-flare"),
6338
+ "gpt-image-2.5-sunburst": editFor("gpt-image-2.5-sunburst")
6339
+ });
6340
+
6264
6341
  // src/vendors/catalog/elevenlabs.ts
6265
6342
  var buildElevenLabsTTSPayload = (modelId) => (ctx) => ({
6266
6343
  text: ctx.prompt,
@@ -11391,6 +11468,8 @@ var Gpt6Astra = "gpt-6-astra";
11391
11468
  var GptImage1 = "gpt-image-1";
11392
11469
  var GptImage15 = "gpt-image-1.5";
11393
11470
  var GptImage2 = "gpt-image-2";
11471
+ var GptImage25Flare = "gpt-image-2.5-flare";
11472
+ var GptImage25Sunburst = "gpt-image-2.5-sunburst";
11394
11473
  var GrokEditVideo = "grok-edit-video";
11395
11474
  var GrokExtendVideo = "grok-extend-video";
11396
11475
  var GrokImagineImage = "grok-imagine-image";
@@ -11614,6 +11693,8 @@ var Models = {
11614
11693
  GptImage1,
11615
11694
  GptImage15,
11616
11695
  GptImage2,
11696
+ GptImage25Flare,
11697
+ GptImage25Sunburst,
11617
11698
  GrokEditVideo,
11618
11699
  GrokExtendVideo,
11619
11700
  GrokImagineImage,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "5.31.0",
3
+ "version": "5.32.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",