@picsart/ai-sdk 5.39.0 → 5.40.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.
Files changed (3) hide show
  1. package/index.d.ts +3 -1
  2. package/index.js +35 -3
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -566,9 +566,11 @@ type ModelInputById = {
566
566
  };
567
567
  "ideogram-v4": {
568
568
  prompt: string;
569
- resolution?: "2048x2048" | "1440x2880" | "2880x1440" | "1664x2496" | "2496x1664" | "1792x2240" | "2240x1792" | "1440x2560" | "2560x1440" | "1600x2560" | "2560x1600" | "1728x2304" | "2304x1728" | "1296x3168" | "3168x1296" | "1152x2944" | "2944x1152" | "1248x3328" | "3328x1248" | "1280x3072" | "3072x1280";
569
+ resolution?: "2048x2048" | "1440x2880" | "2880x1440" | "1664x2496" | "2496x1664" | "1792x2240" | "2240x1792" | "1440x2560" | "2560x1440" | "1600x2560" | "2560x1600" | "1728x2304" | "2304x1728" | "1296x3168" | "3168x1296" | "1152x2944" | "2944x1152" | "1248x3328" | "3328x1248" | "1280x3072" | "3072x1280" | "1024x3072" | "3072x1024" | "1024x1024" | "896x1120" | "1120x896" | "864x1152" | "1152x864" | "832x1248" | "1248x832" | "800x1280" | "1280x800" | "720x1280" | "1280x720" | "720x1440" | "1440x720" | "512x1536" | "1536x512";
570
570
  renderingSpeed?: "TURBO" | "DEFAULT" | "QUALITY";
571
571
  enableCopyrightDetection?: boolean;
572
+ imageUrls?: string[];
573
+ imageWeight?: number;
572
574
  };
573
575
  "kling-3.0-image": {
574
576
  prompt: string;
package/index.js CHANGED
@@ -7115,6 +7115,13 @@ var buildIdeogramV4GeneratePayload = (ctx) => ({
7115
7115
  ...ctx.renderingSpeed ? { rendering_speed: ctx.renderingSpeed } : {},
7116
7116
  ...ctx.enableCopyrightDetection ? { enable_copyright_detection: true } : {}
7117
7117
  });
7118
+ var buildIdeogramV4RemixPayload = (ctx) => ({
7119
+ text_prompt: ctx.prompt,
7120
+ image: ctx.startFrame ?? ctx.imageUrls?.[0],
7121
+ ...ctx.imageWeight != null ? { image_weight: ctx.imageWeight } : {},
7122
+ ...ctx.renderingSpeed ? { rendering_speed: ctx.renderingSpeed } : {},
7123
+ ...ctx.enableCopyrightDetection ? { enable_copyright_detection: true } : {}
7124
+ });
7118
7125
  var buildIdeogramPImagePayload = (ctx) => ({
7119
7126
  prompt: ctx.prompt,
7120
7127
  resolution: ctx.resolution ?? "1024x1024",
@@ -7126,15 +7133,18 @@ var { MODELS: MODELS26 } = defineModels("ideogram", [
7126
7133
  name: "Ideogram 4.0",
7127
7134
  addedAt: "2026-06-03",
7128
7135
  workflow: "ideogram/v4/generate",
7136
+ editWorkflow: "ideogram/v4/remix",
7129
7137
  buildPayload: buildIdeogramV4GeneratePayload,
7138
+ buildEditPayload: buildIdeogramV4RemixPayload,
7130
7139
  estimatedTime: 20,
7131
7140
  mode: "image",
7132
7141
  inputType: "t2i",
7133
7142
  description: "Ideogram's latest model \u2014 class-leading text rendering at up to ~3K resolution.",
7134
- features: [feat("Text Rendering", "style"), feat("Up to 3K", "resolution")],
7143
+ features: [feat("Text Rendering", "style"), feat("Up to 3K", "resolution"), feat("Image Remix", "input")],
7135
7144
  paramConfig: {
7136
7145
  ...params.prompt(),
7137
7146
  ...params.resolution([
7147
+ // 2K bucket (~3–4 MP)
7138
7148
  "2048x2048",
7139
7149
  "1440x2880",
7140
7150
  "2880x1440",
@@ -7155,14 +7165,36 @@ var { MODELS: MODELS26 } = defineModels("ideogram", [
7155
7165
  "1248x3328",
7156
7166
  "3328x1248",
7157
7167
  "1280x3072",
7158
- "3072x1280"
7168
+ "3072x1280",
7169
+ "1024x3072",
7170
+ "3072x1024",
7171
+ // 1K bucket (~1 MP)
7172
+ "1024x1024",
7173
+ "896x1120",
7174
+ "1120x896",
7175
+ "864x1152",
7176
+ "1152x864",
7177
+ "832x1248",
7178
+ "1248x832",
7179
+ "800x1280",
7180
+ "1280x800",
7181
+ "720x1280",
7182
+ "1280x720",
7183
+ "720x1440",
7184
+ "1440x720",
7185
+ "512x1536",
7186
+ "1536x512"
7159
7187
  ], "2048x2048"),
7160
7188
  ...params.renderingSpeed([
7161
7189
  { id: "TURBO", label: "Turbo" },
7162
7190
  { id: "DEFAULT", label: "Balanced" },
7163
7191
  { id: "QUALITY", label: "Quality" }
7164
7192
  ], "DEFAULT"),
7165
- ...p.boolean("enableCopyrightDetection", false, "Copyright Detection")
7193
+ ...p.boolean("enableCopyrightDetection", false, "Copyright Detection"),
7194
+ // Remix (editWorkflow) inputs — an image switches the request to
7195
+ // ideogram/v4/remix. Weight minimum is 1; the API rejects 0.
7196
+ ...params.imageInput(1, "Source Image"),
7197
+ ...params.imageWeight(1, 100, 50, 5)
7166
7198
  }
7167
7199
  },
7168
7200
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "5.39.0",
3
+ "version": "5.40.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",