@picsart/ai-sdk 7.26.0 → 7.28.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/README.md CHANGED
@@ -46,7 +46,7 @@ catalog.search('kling') // search by name/id/provider
46
46
 
47
47
  // Model metadata & params — the `Model` accessor
48
48
  Model('flux-2-pro').name // 'Flux 2 Pro'
49
- Model('flux-2-pro').meta() // mode, provider, badges, …
49
+ Model('flux-2-pro').meta() // mode, provider, badges, addedAt, updatedAt, …
50
50
  Model('flux-2-pro').params() // accepted parameters
51
51
  Model('flux-2-pro').params().toSchema() // param schema
52
52
 
@@ -69,6 +69,7 @@ export type ModelInputById = {
69
69
  "gemini-3.8-flash-lite-tts": { language?: string; accent?: string; prompt?: string; voiceId?: string; style?: string; parts?: Array<{ text: string; speaker?: string; style?: string }>; multiSpeakerVoiceConfigs?: Array<{ speaker: string; voiceName: string }>; };
70
70
  "gemini-3.8-flash-tts": { language?: string; accent?: string; prompt?: string; voiceId?: string; style?: string; parts?: Array<{ text: string; speaker?: string; style?: string }>; multiSpeakerVoiceConfigs?: Array<{ speaker: string; voiceName: string }>; };
71
71
  "gemini-4-argon": { prompt: string; imageUrls?: string[]; videoUrl?: string; thinking?: "off" | "low" | "high"; };
72
+ "gemini-4-carbon": { prompt: string; imageUrls?: string[]; videoUrl?: string; thinking?: "off" | "low" | "medium" | "high"; };
72
73
  "gemini-nano-banana-2.1": { prompt: string; aspectRatio?: "1:1" | "16:9" | "9:16" | "3:4" | "4:3" | "2:3" | "21:9" | "auto"; resolution?: "1K" | "2K" | "4K"; count?: 1 | 2 | 4 | 6 | 8 | 10; seed?: number; thinkingLevel?: "minimal" | "medium" | "high"; imageUrls?: string[]; };
73
74
  "gemini-omni-1.1-flash-preview": { prompt: string; aspectRatio?: "16:9" | "9:16"; resolution?: "360p" | "720p" | "1080p" | "4k"; duration?: 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10; startFrame?: string; endFrame?: string; imageUrls?: string[]; videoUrl?: string; videoUrls?: string[]; };
74
75
  "gemini-omni-1.2-flash": { prompt: string; aspectRatio?: "16:9" | "9:16"; resolution?: "360p" | "720p" | "1080p" | "4k"; duration?: 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15; startFrame?: string; endFrame?: string; imageUrls?: string[]; videoUrl?: string; videoUrls?: string[]; task?: "edit" | "extend"; };
@@ -283,7 +284,7 @@ export type TypedModelId = keyof ModelInputById;
283
284
  export type ModelInput<M extends TypedModelId> = ModelInputById[M];
284
285
 
285
286
  /** IDs of text-generation (LLM) models — narrows generateText(). */
286
- export type TextModelId = "claude-fable-5" | "claude-fable-5-1" | "claude-fable-5-2" | "claude-haiku-4-5" | "claude-haiku-5-5" | "claude-opus-4-8" | "claude-opus-5" | "claude-opus-5-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" | "gpt-6.1-sol" | "gpt-6.1-terra" | "grok-4.7" | "kimi-k3" | "kimi-k3.1-pro" | "kimi-k3.1-pro-highspeed" | "minimax-h3-context-ir" | "minimax-m3" | "minimax-m3.1-flash";
287
+ export type TextModelId = "claude-fable-5" | "claude-fable-5-1" | "claude-fable-5-2" | "claude-haiku-4-5" | "claude-haiku-5-5" | "claude-opus-4-8" | "claude-opus-5" | "claude-opus-5-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" | "gemini-4-carbon" | "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" | "gpt-6.1-sol" | "gpt-6.1-terra" | "grok-4.7" | "kimi-k3" | "kimi-k3.1-pro" | "kimi-k3.1-pro-highspeed" | "minimax-h3-context-ir" | "minimax-m3" | "minimax-m3.1-flash";
287
288
  export type TextModelInputById = Pick<ModelInputById, TextModelId>;
288
289
 
289
290
  /** IDs of structured-output (json-mode) models — narrows run()'s result type. */
package/index.d.ts CHANGED
@@ -430,6 +430,8 @@ interface ModelMeta {
430
430
  readonly provider: ProviderInfo;
431
431
  /** ISO YYYY-MM-DD date the model was added to the catalog, or null if unknown. */
432
432
  readonly addedAt: string | null;
433
+ /** ISO YYYY-MM-DD date the model definition was last changed, or null if unknown. */
434
+ readonly updatedAt: string | null;
433
435
  /** Release / availability tier. Absent on the definition ⇒ `'production'`. */
434
436
  readonly release: ReleaseTag;
435
437
  }
@@ -729,6 +731,8 @@ interface ModelDefinition {
729
731
  badge?: BadgeType[];
730
732
  /** ISO YYYY-MM-DD date the model was added. The 'new' badge is derived from this — see core/badges.ts. */
731
733
  addedAt?: string;
734
+ /** ISO YYYY-MM-DD date the model definition was last changed. Absent when unknown. */
735
+ updatedAt?: string;
732
736
  /**
733
737
  * Marks a model as retired — superseded by a newer model or otherwise no
734
738
  * longer offered. Will not come back. Catalog row stays so workflow IDs
@@ -1554,6 +1558,8 @@ interface CatalogModel {
1554
1558
  features?: ModelFeature[];
1555
1559
  release?: ReleaseTag;
1556
1560
  addedAt?: string;
1561
+ /** The server sends `null` for a model that has never been changed since it was added. */
1562
+ updatedAt?: string | null;
1557
1563
  estimatedTime?: number | Record<string, number>;
1558
1564
  deprecated?: boolean;
1559
1565
  /** `include=schema` */
package/index.js CHANGED
@@ -669,6 +669,7 @@ function toModelDefinition(wire) {
669
669
  if (wire.badges !== void 0) def.badge = wire.badges;
670
670
  if (wire.release !== void 0) def.release = wire.release;
671
671
  if (wire.addedAt !== void 0) def.addedAt = wire.addedAt;
672
+ if (wire.updatedAt != null) def.updatedAt = wire.updatedAt;
672
673
  if (wire.estimatedTime !== void 0) def.estimatedTime = wire.estimatedTime;
673
674
  if (wire.deprecated !== void 0) def.deprecated = wire.deprecated;
674
675
  if (wire.constraints !== void 0) def.constraints = wire.constraints;
@@ -1453,6 +1454,7 @@ var ModelMetaImpl = class {
1453
1454
  badges;
1454
1455
  provider;
1455
1456
  addedAt;
1457
+ updatedAt;
1456
1458
  release;
1457
1459
  constructor(def) {
1458
1460
  this.mode = def.mode;
@@ -1468,6 +1470,7 @@ var ModelMetaImpl = class {
1468
1470
  label: def.providerLabel
1469
1471
  };
1470
1472
  this.addedAt = def.addedAt ?? null;
1473
+ this.updatedAt = def.updatedAt ?? null;
1471
1474
  }
1472
1475
  };
1473
1476
  var ModelDescriptorImpl = class {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "7.26.0",
3
+ "version": "7.28.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",