@shop-os/modelkit 0.17.1 → 0.18.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/dist/index.d.cts CHANGED
@@ -16,7 +16,38 @@ type ImageSize = "512" | "1K" | "2K" | "4K";
16
16
  type VideoResolution = "360p" | "480p" | "720p" | "768p" | "1080p" | "2k" | "4k";
17
17
  /** "xhigh" and "max" exist only on gpt-image-2.5; gpt-image-2 rejects them at the provider. */
18
18
  type ImageQuality = "auto" | "low" | "medium" | "high" | "xhigh" | "max";
19
- type OutputFormat = "png" | "jpeg" | "webp";
19
+ /**
20
+ * "gif" (animated) and "svg" (vector) are GPT Image 2.6 formats: a row offers them only by
21
+ * listing them in `constraints.imageFormats`, and the resolver refuses them anywhere else.
22
+ */
23
+ type OutputFormat = "png" | "jpeg" | "webp" | "gif" | "svg";
24
+ /** The image's background where the provider lets the caller choose (OpenAI `background`). */
25
+ type ImageBackground = "auto" | "opaque" | "transparent";
26
+ /** An animated (`outputFormat: "gif"`) request's frames. The frame size travels as `exactSize`. */
27
+ interface ImageAnimation {
28
+ /** Frames in the loop; the row's default when unset. */
29
+ frameCount?: number;
30
+ /** How long each frame shows, in milliseconds; the row's default when unset. */
31
+ frameDurationMs?: number;
32
+ }
33
+ /** One frame size an animated row offers, with the frame counts the provider takes at it. */
34
+ interface AnimationFrameSize {
35
+ /** `WxH`, sent as the request's `exactSize`. */
36
+ size: string;
37
+ minFrames: number;
38
+ maxFrames: number;
39
+ }
40
+ /** What an animated output (`imageFormats` lists "gif") takes. Kits before 0.18.0 ignore it. */
41
+ interface AnimationLimits {
42
+ /** The frame sizes offered, first is the default. */
43
+ frameSizes: AnimationFrameSize[];
44
+ frameDurationMs: {
45
+ min: number;
46
+ max: number;
47
+ };
48
+ defaultFrameCount: number;
49
+ defaultFrameDurationMs: number;
50
+ }
20
51
  /**
21
52
  * A media input. `label` is a caption the adapter emits as a text part right
22
53
  * before the media where the provider takes interleaved content (Gemini image,
@@ -157,6 +188,10 @@ interface ImageRequest {
157
188
  seed?: number;
158
189
  count?: number;
159
190
  outputFormat?: OutputFormat;
191
+ /** Rows whose `constraints.backgrounds` lists the value. */
192
+ background?: ImageBackground;
193
+ /** `outputFormat: "gif"` on rows with `constraints.animation`. */
194
+ animation?: ImageAnimation;
160
195
  /** Upscale factor for upscaler rows; adapters map it to the provider's field. */
161
196
  scaleFactor?: number;
162
197
  /** Gemini image safety thresholds. Off (provider default) unless supplied. */
@@ -758,6 +793,18 @@ interface ModelConstraints {
758
793
  languages?: LanguageOption[];
759
794
  /** Audio-output rows whose provider lets the caller pick a file format; `defaults.outputFormat` is one. */
760
795
  outputFormats?: string[];
796
+ /**
797
+ * Image rows: the output formats offered, first is the default; needs `supports: outputFormat`.
798
+ * Without it an image row takes png, jpeg and webp; "gif" and "svg" are offered only here.
799
+ * Kits before 0.18.0 ignore it.
800
+ */
801
+ imageFormats?: OutputFormat[];
802
+ /** Image rows: the backgrounds the caller may pick (`ImageRequest.background`). Kits before 0.18.0 ignore it. */
803
+ backgrounds?: ImageBackground[];
804
+ /** Image rows that list "gif" in `imageFormats`: frame sizes, counts and durations. */
805
+ animation?: AnimationLimits;
806
+ /** Image rows that list "svg": the text model that writes the SVG from the image (OpenAI `svg.model`). */
807
+ svgModel?: string;
761
808
  /** Smallest frame the source video may have (Kling 4.0 Edit: 700 px). Kits before 0.15.0 ignore it. */
762
809
  sourceVideoPixels?: VideoPixelLimits;
763
810
  /** Length limits for the source video the row edits or extends. */
@@ -859,7 +906,7 @@ interface CatalogCapabilities {
859
906
  }
860
907
  /** Row defaults the request types do not share. */
861
908
  interface MediaNodeDefaults {
862
- /** Image rows: png, jpeg or webp. Audio-output rows: one of `constraints.outputFormats`. */
909
+ /** Image rows: an `OutputFormat`. Audio-output rows: one of `constraints.outputFormats`. */
863
910
  outputFormat?: string;
864
911
  /** One of `constraints.voices[].id`. */
865
912
  voice?: string;
@@ -1371,6 +1418,32 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
1371
1418
  name: z.ZodString;
1372
1419
  }, z.core.$loose>>>;
1373
1420
  outputFormats: z.ZodOptional<z.ZodArray<z.ZodString>>;
1421
+ imageFormats: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1422
+ png: "png";
1423
+ jpeg: "jpeg";
1424
+ webp: "webp";
1425
+ gif: "gif";
1426
+ svg: "svg";
1427
+ }>>>;
1428
+ backgrounds: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1429
+ auto: "auto";
1430
+ opaque: "opaque";
1431
+ transparent: "transparent";
1432
+ }>>>;
1433
+ animation: z.ZodOptional<z.ZodObject<{
1434
+ frameSizes: z.ZodArray<z.ZodObject<{
1435
+ size: z.ZodString;
1436
+ minFrames: z.ZodNumber;
1437
+ maxFrames: z.ZodNumber;
1438
+ }, z.core.$loose>>;
1439
+ frameDurationMs: z.ZodObject<{
1440
+ min: z.ZodNumber;
1441
+ max: z.ZodNumber;
1442
+ }, z.core.$loose>;
1443
+ defaultFrameCount: z.ZodNumber;
1444
+ defaultFrameDurationMs: z.ZodNumber;
1445
+ }, z.core.$loose>>;
1446
+ svgModel: z.ZodOptional<z.ZodString>;
1374
1447
  sourceVideoPixels: z.ZodOptional<z.ZodObject<{
1375
1448
  minWidth: z.ZodOptional<z.ZodNumber>;
1376
1449
  minHeight: z.ZodOptional<z.ZodNumber>;
@@ -1516,6 +1589,8 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
1516
1589
  png: "png";
1517
1590
  jpeg: "jpeg";
1518
1591
  webp: "webp";
1592
+ gif: "gif";
1593
+ svg: "svg";
1519
1594
  }>, z.ZodString]>>;
1520
1595
  scaleFactor: z.ZodOptional<z.ZodNumber>;
1521
1596
  safetySettings: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1922,6 +1997,14 @@ declare function resolveImageOptions(model: CatalogModel, request: ImageRequest,
1922
1997
  declare function resolveVideoOptions(model: CatalogModel, request: VideoRequest, onUnsupported?: OnUnsupported): ResolveResult<VideoRequest>;
1923
1998
  declare function resolveAudioOptions(model: CatalogModel, request: AudioRequest, onUnsupported?: OnUnsupported): ResolveResult<AudioRequest>;
1924
1999
 
2000
+ /** The formats an image row offers: its `imageFormats` list, else png, jpeg and webp. */
2001
+ declare function imageOutputFormats(model: CatalogModel): readonly OutputFormat[];
2002
+ /**
2003
+ * The size tier a GIF bills at, from its frame size: frames up to 288x512 bill at 1K, larger
2004
+ * ones at 2K. A tier the row does not offer falls back to its largest.
2005
+ */
2006
+ declare function animationTier(model: CatalogModel, frameSize: string): ImageSize;
2007
+
1925
2008
  /**
1926
2009
  * A row whose aspect ratio is the frame it renders its source into (Ray 3.2 Reframe): it
1927
2010
  * requires a source video and lists ratios without "adaptive", so the ratio is a target. Every
@@ -2383,4 +2466,4 @@ declare function describeThrown(cause: unknown): ThrownErrorInfo;
2383
2466
  /** Add the AI SDK `GeneratedFile` accessors to adapter image bytes. base64 is computed on first read. */
2384
2467
  declare function toGeneratedImage(image: ImageBytes): GeneratedImage;
2385
2468
 
2386
- export { ADAPTER_IDS, ADAPTER_KEYS, ARRAY_INPUT_SPEC_KEYS, AUDIO_INPUT_SPEC_KEYS, type Adapter, type AdapterContext, type AdapterEndpoints, type AdapterId, type AdapterRegistry, type AiTextProviderOptions, type ArrayInputSpecKey, type AspectRatio, type AudioNodeMethods, type AudioOutput, type AudioRequest, type AudioResult, BYOK_PROVIDERS, type ByokField, type ByokFieldId, type ByokProvider, type ByokProviderId, type ByokSecret, type ByokTestResult, type CallContext, Catalog, type CatalogAuth, type CatalogCache, type CatalogCapabilities, type CatalogDisplay, type CatalogEnvelope, type CatalogModel, CatalogModelSchema, CatalogModelSchemaBase, type CatalogOrigin, CatalogSchema, type CatalogSource, type CatalogTextModel, DEFAULT_ADAPTERS, type DataOnlyRow, type DataOnlyVerdict, type DefaultObjectOutput, type DubbingOutcome, type DubbingRequest, type DubbingResult, type Exposure, ExposureSchema, type FalWebhookBody, type GeneratedImage, IMAGE_INPUT_SPEC_KEYS, INPUT_SPEC_SUPPORTS_KEYS, type ImageBytes, type ImageCallOptions, type ImageCallResult, type ImageQuality, type ImageRequest, type ImageResult, type ImageSafetySetting, type ImageSize, type InputSpec, type InputSpecDimensions, type InputSpecIssue, type InputSpecKey, InputSpecSchema, type JsonObject, JsonObjectSchema, type JsonPrimitive, type JsonValue, JsonValueSchema, type KeySource, type KeyTier, type LanguageModelHandle, type LanguageOption, type Lifecycle, type LipsyncRequest, type LipsyncResult, type LiveCatalogState, MODEL3D_IMAGE_SLOTS, MODEL3D_MODELS, MODELS, type MaskBox, type MaskPoint, type MediaJobCallContext, type MediaNodeDefaults, type MediaOutput, type MediaPart, type MediaRef, type Model3dCall, type Model3dConstraints, type Model3dEndpoints, type Model3dFamily, type Model3dInputRefusal, type Model3dPricedInputs, type Model3dPricedOptions, type Model3dRequest, type Model3dResult, type Model3dStatus, type Model3dSubmission, type Model3dTexture, type Model3dViews, type Model3dWired, type ModelConstraints, type ModelKit, type ModelKitConfig, ModelKitError, type ModelKitErrorCode, type ModelKitErrorInit, type ModelType, type ModelkitGenerateObjectOptions, type ModelkitGenerateTextOptions, type ModelkitStreamObjectOptions, type ModelkitStreamTextOptions, type ObjectOutput, type ObjectResult, type OnUnsupported, type OutputFormat, type PricingKind, type PrimeCatalogResult, type PromptConventions, type ProviderErrorBody, type ProviderKeyName, type ProviderKeys, type ProviderOptionValue, type ProviderOptions, type QuarantineResult, type ReferenceLimits, type ReferenceSyntax, type RequiredInput, type RequiredKeyName, type ResolveResult, type Routing, SURFACES, type SpeechRequest, type SubtitleOptions, type SubtitleTextStyle, type SupportedOption, type Surface, SurfaceSchema, type TextMethods, type TextModelInstance, type TranscriptWord, type TranscriptionRequest, type TranscriptionResult, type UpscaleOptions, type UsageEvent, type UsageModality, type UsageUnit, VIDEO_INPUT_SPEC_KEYS, VIDEO_TOOL_MODELS, type VideoCallJob, type VideoCallOptions, type VideoJob, type VideoModel, type VideoPixelLimits, type VideoRequest, type VideoResolution, VideoResolutionSchema, type VideoResult, type VideoSecondsLimits, type VideoToolCallContext, type VideoToolConstraints, type VideoToolKind, type VideoToolOutputFormat, type VideoToolOutputSpec, type VideoToolPlan, type VideoToolRequest, type VideoToolResult, type VideoToolSource, type VideoToolStatus, type VideoToolSubmission, type VoiceCandidate, type VoiceChangeRequest, type VoiceCloneRequest, type VoiceCloneResult, type VoiceCloneState, type VoiceDeleteRequest, type VoiceDesignRequest, type VoiceDesignResult, type VoiceGender, type VoiceOption, type VoiceSample, type Warning, adapterServesType, aiSdkTextAdapter, arkAdapter, aspectRatioToSize, byokProviderForModel, classifyHttpError, compareCatalogOrder, createDefaultModelKit, createModelKit, dataOnlyCapable, describe, describeThrown, elevenLabsAdapter, generateImage as experimental_generateImage, falAdapter, falWebhookBodySchema, fileCatalogCache, fishAdapter, generateAudio, generateImage, generateObject, generateText, generateVideo, googleGenaiAdapter, googleImageAdapter, hasAwsCredentials, higgsfieldAdapter, isArrayInputSpecKey, isInputSpecKey, isListed, isListedOn, isModelKitError, keyOverrideFor, keysFromEnv, languageModel, liveCatalog, liveState, lumaAdapter, lumaReframeTooTall, mergeTextProviderOptions, missingTierKeys, model3dCall, model3dConstraints, model3dInputRefusal, model3dPricingSku, model3dResolution, model3dSeedFits, model3dSkus, model3dTexture, modelsPoweredBy, nearestAspectRatio, normalizeExposure, openaiImageAdapter, passthroughTextModel, planVideoTool, pollUntil, prepareMediaPart, primeCatalog, prodiaAdapter, readErrorBody, replicateAdapter, resetLiveCatalog, resolutionTier, resolveAudioOptions, resolveDubbingOptions, resolveImageOptions, resolveKeys, resolveLipsyncOptions, resolveSpeechOptions, resolveTranscriptionOptions, resolveVideoOptions, resolveVoiceChangeOptions, resolveVoiceCloneOptions, resolveVoiceDesignOptions, shouldRetry, sleep, sortCatalogRows, streamObject, streamText, takesTargetAspectRatio, testProviderKey, textUsageEvent, toGeneratedImage, validateInputSpec, videoLengthViolation, videoSizeViolation, videoToolConstraints, withRetry, xaiVideoAdapter };
2469
+ export { ADAPTER_IDS, ADAPTER_KEYS, ARRAY_INPUT_SPEC_KEYS, AUDIO_INPUT_SPEC_KEYS, type Adapter, type AdapterContext, type AdapterEndpoints, type AdapterId, type AdapterRegistry, type AiTextProviderOptions, type AnimationFrameSize, type AnimationLimits, type ArrayInputSpecKey, type AspectRatio, type AudioNodeMethods, type AudioOutput, type AudioRequest, type AudioResult, BYOK_PROVIDERS, type ByokField, type ByokFieldId, type ByokProvider, type ByokProviderId, type ByokSecret, type ByokTestResult, type CallContext, Catalog, type CatalogAuth, type CatalogCache, type CatalogCapabilities, type CatalogDisplay, type CatalogEnvelope, type CatalogModel, CatalogModelSchema, CatalogModelSchemaBase, type CatalogOrigin, CatalogSchema, type CatalogSource, type CatalogTextModel, DEFAULT_ADAPTERS, type DataOnlyRow, type DataOnlyVerdict, type DefaultObjectOutput, type DubbingOutcome, type DubbingRequest, type DubbingResult, type Exposure, ExposureSchema, type FalWebhookBody, type GeneratedImage, IMAGE_INPUT_SPEC_KEYS, INPUT_SPEC_SUPPORTS_KEYS, type ImageAnimation, type ImageBackground, type ImageBytes, type ImageCallOptions, type ImageCallResult, type ImageQuality, type ImageRequest, type ImageResult, type ImageSafetySetting, type ImageSize, type InputSpec, type InputSpecDimensions, type InputSpecIssue, type InputSpecKey, InputSpecSchema, type JsonObject, JsonObjectSchema, type JsonPrimitive, type JsonValue, JsonValueSchema, type KeySource, type KeyTier, type LanguageModelHandle, type LanguageOption, type Lifecycle, type LipsyncRequest, type LipsyncResult, type LiveCatalogState, MODEL3D_IMAGE_SLOTS, MODEL3D_MODELS, MODELS, type MaskBox, type MaskPoint, type MediaJobCallContext, type MediaNodeDefaults, type MediaOutput, type MediaPart, type MediaRef, type Model3dCall, type Model3dConstraints, type Model3dEndpoints, type Model3dFamily, type Model3dInputRefusal, type Model3dPricedInputs, type Model3dPricedOptions, type Model3dRequest, type Model3dResult, type Model3dStatus, type Model3dSubmission, type Model3dTexture, type Model3dViews, type Model3dWired, type ModelConstraints, type ModelKit, type ModelKitConfig, ModelKitError, type ModelKitErrorCode, type ModelKitErrorInit, type ModelType, type ModelkitGenerateObjectOptions, type ModelkitGenerateTextOptions, type ModelkitStreamObjectOptions, type ModelkitStreamTextOptions, type ObjectOutput, type ObjectResult, type OnUnsupported, type OutputFormat, type PricingKind, type PrimeCatalogResult, type PromptConventions, type ProviderErrorBody, type ProviderKeyName, type ProviderKeys, type ProviderOptionValue, type ProviderOptions, type QuarantineResult, type ReferenceLimits, type ReferenceSyntax, type RequiredInput, type RequiredKeyName, type ResolveResult, type Routing, SURFACES, type SpeechRequest, type SubtitleOptions, type SubtitleTextStyle, type SupportedOption, type Surface, SurfaceSchema, type TextMethods, type TextModelInstance, type TranscriptWord, type TranscriptionRequest, type TranscriptionResult, type UpscaleOptions, type UsageEvent, type UsageModality, type UsageUnit, VIDEO_INPUT_SPEC_KEYS, VIDEO_TOOL_MODELS, type VideoCallJob, type VideoCallOptions, type VideoJob, type VideoModel, type VideoPixelLimits, type VideoRequest, type VideoResolution, VideoResolutionSchema, type VideoResult, type VideoSecondsLimits, type VideoToolCallContext, type VideoToolConstraints, type VideoToolKind, type VideoToolOutputFormat, type VideoToolOutputSpec, type VideoToolPlan, type VideoToolRequest, type VideoToolResult, type VideoToolSource, type VideoToolStatus, type VideoToolSubmission, type VoiceCandidate, type VoiceChangeRequest, type VoiceCloneRequest, type VoiceCloneResult, type VoiceCloneState, type VoiceDeleteRequest, type VoiceDesignRequest, type VoiceDesignResult, type VoiceGender, type VoiceOption, type VoiceSample, type Warning, adapterServesType, aiSdkTextAdapter, animationTier, arkAdapter, aspectRatioToSize, byokProviderForModel, classifyHttpError, compareCatalogOrder, createDefaultModelKit, createModelKit, dataOnlyCapable, describe, describeThrown, elevenLabsAdapter, generateImage as experimental_generateImage, falAdapter, falWebhookBodySchema, fileCatalogCache, fishAdapter, generateAudio, generateImage, generateObject, generateText, generateVideo, googleGenaiAdapter, googleImageAdapter, hasAwsCredentials, higgsfieldAdapter, imageOutputFormats, isArrayInputSpecKey, isInputSpecKey, isListed, isListedOn, isModelKitError, keyOverrideFor, keysFromEnv, languageModel, liveCatalog, liveState, lumaAdapter, lumaReframeTooTall, mergeTextProviderOptions, missingTierKeys, model3dCall, model3dConstraints, model3dInputRefusal, model3dPricingSku, model3dResolution, model3dSeedFits, model3dSkus, model3dTexture, modelsPoweredBy, nearestAspectRatio, normalizeExposure, openaiImageAdapter, passthroughTextModel, planVideoTool, pollUntil, prepareMediaPart, primeCatalog, prodiaAdapter, readErrorBody, replicateAdapter, resetLiveCatalog, resolutionTier, resolveAudioOptions, resolveDubbingOptions, resolveImageOptions, resolveKeys, resolveLipsyncOptions, resolveSpeechOptions, resolveTranscriptionOptions, resolveVideoOptions, resolveVoiceChangeOptions, resolveVoiceCloneOptions, resolveVoiceDesignOptions, shouldRetry, sleep, sortCatalogRows, streamObject, streamText, takesTargetAspectRatio, testProviderKey, textUsageEvent, toGeneratedImage, validateInputSpec, videoLengthViolation, videoSizeViolation, videoToolConstraints, withRetry, xaiVideoAdapter };
package/dist/index.d.ts CHANGED
@@ -16,7 +16,38 @@ type ImageSize = "512" | "1K" | "2K" | "4K";
16
16
  type VideoResolution = "360p" | "480p" | "720p" | "768p" | "1080p" | "2k" | "4k";
17
17
  /** "xhigh" and "max" exist only on gpt-image-2.5; gpt-image-2 rejects them at the provider. */
18
18
  type ImageQuality = "auto" | "low" | "medium" | "high" | "xhigh" | "max";
19
- type OutputFormat = "png" | "jpeg" | "webp";
19
+ /**
20
+ * "gif" (animated) and "svg" (vector) are GPT Image 2.6 formats: a row offers them only by
21
+ * listing them in `constraints.imageFormats`, and the resolver refuses them anywhere else.
22
+ */
23
+ type OutputFormat = "png" | "jpeg" | "webp" | "gif" | "svg";
24
+ /** The image's background where the provider lets the caller choose (OpenAI `background`). */
25
+ type ImageBackground = "auto" | "opaque" | "transparent";
26
+ /** An animated (`outputFormat: "gif"`) request's frames. The frame size travels as `exactSize`. */
27
+ interface ImageAnimation {
28
+ /** Frames in the loop; the row's default when unset. */
29
+ frameCount?: number;
30
+ /** How long each frame shows, in milliseconds; the row's default when unset. */
31
+ frameDurationMs?: number;
32
+ }
33
+ /** One frame size an animated row offers, with the frame counts the provider takes at it. */
34
+ interface AnimationFrameSize {
35
+ /** `WxH`, sent as the request's `exactSize`. */
36
+ size: string;
37
+ minFrames: number;
38
+ maxFrames: number;
39
+ }
40
+ /** What an animated output (`imageFormats` lists "gif") takes. Kits before 0.18.0 ignore it. */
41
+ interface AnimationLimits {
42
+ /** The frame sizes offered, first is the default. */
43
+ frameSizes: AnimationFrameSize[];
44
+ frameDurationMs: {
45
+ min: number;
46
+ max: number;
47
+ };
48
+ defaultFrameCount: number;
49
+ defaultFrameDurationMs: number;
50
+ }
20
51
  /**
21
52
  * A media input. `label` is a caption the adapter emits as a text part right
22
53
  * before the media where the provider takes interleaved content (Gemini image,
@@ -157,6 +188,10 @@ interface ImageRequest {
157
188
  seed?: number;
158
189
  count?: number;
159
190
  outputFormat?: OutputFormat;
191
+ /** Rows whose `constraints.backgrounds` lists the value. */
192
+ background?: ImageBackground;
193
+ /** `outputFormat: "gif"` on rows with `constraints.animation`. */
194
+ animation?: ImageAnimation;
160
195
  /** Upscale factor for upscaler rows; adapters map it to the provider's field. */
161
196
  scaleFactor?: number;
162
197
  /** Gemini image safety thresholds. Off (provider default) unless supplied. */
@@ -758,6 +793,18 @@ interface ModelConstraints {
758
793
  languages?: LanguageOption[];
759
794
  /** Audio-output rows whose provider lets the caller pick a file format; `defaults.outputFormat` is one. */
760
795
  outputFormats?: string[];
796
+ /**
797
+ * Image rows: the output formats offered, first is the default; needs `supports: outputFormat`.
798
+ * Without it an image row takes png, jpeg and webp; "gif" and "svg" are offered only here.
799
+ * Kits before 0.18.0 ignore it.
800
+ */
801
+ imageFormats?: OutputFormat[];
802
+ /** Image rows: the backgrounds the caller may pick (`ImageRequest.background`). Kits before 0.18.0 ignore it. */
803
+ backgrounds?: ImageBackground[];
804
+ /** Image rows that list "gif" in `imageFormats`: frame sizes, counts and durations. */
805
+ animation?: AnimationLimits;
806
+ /** Image rows that list "svg": the text model that writes the SVG from the image (OpenAI `svg.model`). */
807
+ svgModel?: string;
761
808
  /** Smallest frame the source video may have (Kling 4.0 Edit: 700 px). Kits before 0.15.0 ignore it. */
762
809
  sourceVideoPixels?: VideoPixelLimits;
763
810
  /** Length limits for the source video the row edits or extends. */
@@ -859,7 +906,7 @@ interface CatalogCapabilities {
859
906
  }
860
907
  /** Row defaults the request types do not share. */
861
908
  interface MediaNodeDefaults {
862
- /** Image rows: png, jpeg or webp. Audio-output rows: one of `constraints.outputFormats`. */
909
+ /** Image rows: an `OutputFormat`. Audio-output rows: one of `constraints.outputFormats`. */
863
910
  outputFormat?: string;
864
911
  /** One of `constraints.voices[].id`. */
865
912
  voice?: string;
@@ -1371,6 +1418,32 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
1371
1418
  name: z.ZodString;
1372
1419
  }, z.core.$loose>>>;
1373
1420
  outputFormats: z.ZodOptional<z.ZodArray<z.ZodString>>;
1421
+ imageFormats: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1422
+ png: "png";
1423
+ jpeg: "jpeg";
1424
+ webp: "webp";
1425
+ gif: "gif";
1426
+ svg: "svg";
1427
+ }>>>;
1428
+ backgrounds: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1429
+ auto: "auto";
1430
+ opaque: "opaque";
1431
+ transparent: "transparent";
1432
+ }>>>;
1433
+ animation: z.ZodOptional<z.ZodObject<{
1434
+ frameSizes: z.ZodArray<z.ZodObject<{
1435
+ size: z.ZodString;
1436
+ minFrames: z.ZodNumber;
1437
+ maxFrames: z.ZodNumber;
1438
+ }, z.core.$loose>>;
1439
+ frameDurationMs: z.ZodObject<{
1440
+ min: z.ZodNumber;
1441
+ max: z.ZodNumber;
1442
+ }, z.core.$loose>;
1443
+ defaultFrameCount: z.ZodNumber;
1444
+ defaultFrameDurationMs: z.ZodNumber;
1445
+ }, z.core.$loose>>;
1446
+ svgModel: z.ZodOptional<z.ZodString>;
1374
1447
  sourceVideoPixels: z.ZodOptional<z.ZodObject<{
1375
1448
  minWidth: z.ZodOptional<z.ZodNumber>;
1376
1449
  minHeight: z.ZodOptional<z.ZodNumber>;
@@ -1516,6 +1589,8 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
1516
1589
  png: "png";
1517
1590
  jpeg: "jpeg";
1518
1591
  webp: "webp";
1592
+ gif: "gif";
1593
+ svg: "svg";
1519
1594
  }>, z.ZodString]>>;
1520
1595
  scaleFactor: z.ZodOptional<z.ZodNumber>;
1521
1596
  safetySettings: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1922,6 +1997,14 @@ declare function resolveImageOptions(model: CatalogModel, request: ImageRequest,
1922
1997
  declare function resolveVideoOptions(model: CatalogModel, request: VideoRequest, onUnsupported?: OnUnsupported): ResolveResult<VideoRequest>;
1923
1998
  declare function resolveAudioOptions(model: CatalogModel, request: AudioRequest, onUnsupported?: OnUnsupported): ResolveResult<AudioRequest>;
1924
1999
 
2000
+ /** The formats an image row offers: its `imageFormats` list, else png, jpeg and webp. */
2001
+ declare function imageOutputFormats(model: CatalogModel): readonly OutputFormat[];
2002
+ /**
2003
+ * The size tier a GIF bills at, from its frame size: frames up to 288x512 bill at 1K, larger
2004
+ * ones at 2K. A tier the row does not offer falls back to its largest.
2005
+ */
2006
+ declare function animationTier(model: CatalogModel, frameSize: string): ImageSize;
2007
+
1925
2008
  /**
1926
2009
  * A row whose aspect ratio is the frame it renders its source into (Ray 3.2 Reframe): it
1927
2010
  * requires a source video and lists ratios without "adaptive", so the ratio is a target. Every
@@ -2383,4 +2466,4 @@ declare function describeThrown(cause: unknown): ThrownErrorInfo;
2383
2466
  /** Add the AI SDK `GeneratedFile` accessors to adapter image bytes. base64 is computed on first read. */
2384
2467
  declare function toGeneratedImage(image: ImageBytes): GeneratedImage;
2385
2468
 
2386
- export { ADAPTER_IDS, ADAPTER_KEYS, ARRAY_INPUT_SPEC_KEYS, AUDIO_INPUT_SPEC_KEYS, type Adapter, type AdapterContext, type AdapterEndpoints, type AdapterId, type AdapterRegistry, type AiTextProviderOptions, type ArrayInputSpecKey, type AspectRatio, type AudioNodeMethods, type AudioOutput, type AudioRequest, type AudioResult, BYOK_PROVIDERS, type ByokField, type ByokFieldId, type ByokProvider, type ByokProviderId, type ByokSecret, type ByokTestResult, type CallContext, Catalog, type CatalogAuth, type CatalogCache, type CatalogCapabilities, type CatalogDisplay, type CatalogEnvelope, type CatalogModel, CatalogModelSchema, CatalogModelSchemaBase, type CatalogOrigin, CatalogSchema, type CatalogSource, type CatalogTextModel, DEFAULT_ADAPTERS, type DataOnlyRow, type DataOnlyVerdict, type DefaultObjectOutput, type DubbingOutcome, type DubbingRequest, type DubbingResult, type Exposure, ExposureSchema, type FalWebhookBody, type GeneratedImage, IMAGE_INPUT_SPEC_KEYS, INPUT_SPEC_SUPPORTS_KEYS, type ImageBytes, type ImageCallOptions, type ImageCallResult, type ImageQuality, type ImageRequest, type ImageResult, type ImageSafetySetting, type ImageSize, type InputSpec, type InputSpecDimensions, type InputSpecIssue, type InputSpecKey, InputSpecSchema, type JsonObject, JsonObjectSchema, type JsonPrimitive, type JsonValue, JsonValueSchema, type KeySource, type KeyTier, type LanguageModelHandle, type LanguageOption, type Lifecycle, type LipsyncRequest, type LipsyncResult, type LiveCatalogState, MODEL3D_IMAGE_SLOTS, MODEL3D_MODELS, MODELS, type MaskBox, type MaskPoint, type MediaJobCallContext, type MediaNodeDefaults, type MediaOutput, type MediaPart, type MediaRef, type Model3dCall, type Model3dConstraints, type Model3dEndpoints, type Model3dFamily, type Model3dInputRefusal, type Model3dPricedInputs, type Model3dPricedOptions, type Model3dRequest, type Model3dResult, type Model3dStatus, type Model3dSubmission, type Model3dTexture, type Model3dViews, type Model3dWired, type ModelConstraints, type ModelKit, type ModelKitConfig, ModelKitError, type ModelKitErrorCode, type ModelKitErrorInit, type ModelType, type ModelkitGenerateObjectOptions, type ModelkitGenerateTextOptions, type ModelkitStreamObjectOptions, type ModelkitStreamTextOptions, type ObjectOutput, type ObjectResult, type OnUnsupported, type OutputFormat, type PricingKind, type PrimeCatalogResult, type PromptConventions, type ProviderErrorBody, type ProviderKeyName, type ProviderKeys, type ProviderOptionValue, type ProviderOptions, type QuarantineResult, type ReferenceLimits, type ReferenceSyntax, type RequiredInput, type RequiredKeyName, type ResolveResult, type Routing, SURFACES, type SpeechRequest, type SubtitleOptions, type SubtitleTextStyle, type SupportedOption, type Surface, SurfaceSchema, type TextMethods, type TextModelInstance, type TranscriptWord, type TranscriptionRequest, type TranscriptionResult, type UpscaleOptions, type UsageEvent, type UsageModality, type UsageUnit, VIDEO_INPUT_SPEC_KEYS, VIDEO_TOOL_MODELS, type VideoCallJob, type VideoCallOptions, type VideoJob, type VideoModel, type VideoPixelLimits, type VideoRequest, type VideoResolution, VideoResolutionSchema, type VideoResult, type VideoSecondsLimits, type VideoToolCallContext, type VideoToolConstraints, type VideoToolKind, type VideoToolOutputFormat, type VideoToolOutputSpec, type VideoToolPlan, type VideoToolRequest, type VideoToolResult, type VideoToolSource, type VideoToolStatus, type VideoToolSubmission, type VoiceCandidate, type VoiceChangeRequest, type VoiceCloneRequest, type VoiceCloneResult, type VoiceCloneState, type VoiceDeleteRequest, type VoiceDesignRequest, type VoiceDesignResult, type VoiceGender, type VoiceOption, type VoiceSample, type Warning, adapterServesType, aiSdkTextAdapter, arkAdapter, aspectRatioToSize, byokProviderForModel, classifyHttpError, compareCatalogOrder, createDefaultModelKit, createModelKit, dataOnlyCapable, describe, describeThrown, elevenLabsAdapter, generateImage as experimental_generateImage, falAdapter, falWebhookBodySchema, fileCatalogCache, fishAdapter, generateAudio, generateImage, generateObject, generateText, generateVideo, googleGenaiAdapter, googleImageAdapter, hasAwsCredentials, higgsfieldAdapter, isArrayInputSpecKey, isInputSpecKey, isListed, isListedOn, isModelKitError, keyOverrideFor, keysFromEnv, languageModel, liveCatalog, liveState, lumaAdapter, lumaReframeTooTall, mergeTextProviderOptions, missingTierKeys, model3dCall, model3dConstraints, model3dInputRefusal, model3dPricingSku, model3dResolution, model3dSeedFits, model3dSkus, model3dTexture, modelsPoweredBy, nearestAspectRatio, normalizeExposure, openaiImageAdapter, passthroughTextModel, planVideoTool, pollUntil, prepareMediaPart, primeCatalog, prodiaAdapter, readErrorBody, replicateAdapter, resetLiveCatalog, resolutionTier, resolveAudioOptions, resolveDubbingOptions, resolveImageOptions, resolveKeys, resolveLipsyncOptions, resolveSpeechOptions, resolveTranscriptionOptions, resolveVideoOptions, resolveVoiceChangeOptions, resolveVoiceCloneOptions, resolveVoiceDesignOptions, shouldRetry, sleep, sortCatalogRows, streamObject, streamText, takesTargetAspectRatio, testProviderKey, textUsageEvent, toGeneratedImage, validateInputSpec, videoLengthViolation, videoSizeViolation, videoToolConstraints, withRetry, xaiVideoAdapter };
2469
+ export { ADAPTER_IDS, ADAPTER_KEYS, ARRAY_INPUT_SPEC_KEYS, AUDIO_INPUT_SPEC_KEYS, type Adapter, type AdapterContext, type AdapterEndpoints, type AdapterId, type AdapterRegistry, type AiTextProviderOptions, type AnimationFrameSize, type AnimationLimits, type ArrayInputSpecKey, type AspectRatio, type AudioNodeMethods, type AudioOutput, type AudioRequest, type AudioResult, BYOK_PROVIDERS, type ByokField, type ByokFieldId, type ByokProvider, type ByokProviderId, type ByokSecret, type ByokTestResult, type CallContext, Catalog, type CatalogAuth, type CatalogCache, type CatalogCapabilities, type CatalogDisplay, type CatalogEnvelope, type CatalogModel, CatalogModelSchema, CatalogModelSchemaBase, type CatalogOrigin, CatalogSchema, type CatalogSource, type CatalogTextModel, DEFAULT_ADAPTERS, type DataOnlyRow, type DataOnlyVerdict, type DefaultObjectOutput, type DubbingOutcome, type DubbingRequest, type DubbingResult, type Exposure, ExposureSchema, type FalWebhookBody, type GeneratedImage, IMAGE_INPUT_SPEC_KEYS, INPUT_SPEC_SUPPORTS_KEYS, type ImageAnimation, type ImageBackground, type ImageBytes, type ImageCallOptions, type ImageCallResult, type ImageQuality, type ImageRequest, type ImageResult, type ImageSafetySetting, type ImageSize, type InputSpec, type InputSpecDimensions, type InputSpecIssue, type InputSpecKey, InputSpecSchema, type JsonObject, JsonObjectSchema, type JsonPrimitive, type JsonValue, JsonValueSchema, type KeySource, type KeyTier, type LanguageModelHandle, type LanguageOption, type Lifecycle, type LipsyncRequest, type LipsyncResult, type LiveCatalogState, MODEL3D_IMAGE_SLOTS, MODEL3D_MODELS, MODELS, type MaskBox, type MaskPoint, type MediaJobCallContext, type MediaNodeDefaults, type MediaOutput, type MediaPart, type MediaRef, type Model3dCall, type Model3dConstraints, type Model3dEndpoints, type Model3dFamily, type Model3dInputRefusal, type Model3dPricedInputs, type Model3dPricedOptions, type Model3dRequest, type Model3dResult, type Model3dStatus, type Model3dSubmission, type Model3dTexture, type Model3dViews, type Model3dWired, type ModelConstraints, type ModelKit, type ModelKitConfig, ModelKitError, type ModelKitErrorCode, type ModelKitErrorInit, type ModelType, type ModelkitGenerateObjectOptions, type ModelkitGenerateTextOptions, type ModelkitStreamObjectOptions, type ModelkitStreamTextOptions, type ObjectOutput, type ObjectResult, type OnUnsupported, type OutputFormat, type PricingKind, type PrimeCatalogResult, type PromptConventions, type ProviderErrorBody, type ProviderKeyName, type ProviderKeys, type ProviderOptionValue, type ProviderOptions, type QuarantineResult, type ReferenceLimits, type ReferenceSyntax, type RequiredInput, type RequiredKeyName, type ResolveResult, type Routing, SURFACES, type SpeechRequest, type SubtitleOptions, type SubtitleTextStyle, type SupportedOption, type Surface, SurfaceSchema, type TextMethods, type TextModelInstance, type TranscriptWord, type TranscriptionRequest, type TranscriptionResult, type UpscaleOptions, type UsageEvent, type UsageModality, type UsageUnit, VIDEO_INPUT_SPEC_KEYS, VIDEO_TOOL_MODELS, type VideoCallJob, type VideoCallOptions, type VideoJob, type VideoModel, type VideoPixelLimits, type VideoRequest, type VideoResolution, VideoResolutionSchema, type VideoResult, type VideoSecondsLimits, type VideoToolCallContext, type VideoToolConstraints, type VideoToolKind, type VideoToolOutputFormat, type VideoToolOutputSpec, type VideoToolPlan, type VideoToolRequest, type VideoToolResult, type VideoToolSource, type VideoToolStatus, type VideoToolSubmission, type VoiceCandidate, type VoiceChangeRequest, type VoiceCloneRequest, type VoiceCloneResult, type VoiceCloneState, type VoiceDeleteRequest, type VoiceDesignRequest, type VoiceDesignResult, type VoiceGender, type VoiceOption, type VoiceSample, type Warning, adapterServesType, aiSdkTextAdapter, animationTier, arkAdapter, aspectRatioToSize, byokProviderForModel, classifyHttpError, compareCatalogOrder, createDefaultModelKit, createModelKit, dataOnlyCapable, describe, describeThrown, elevenLabsAdapter, generateImage as experimental_generateImage, falAdapter, falWebhookBodySchema, fileCatalogCache, fishAdapter, generateAudio, generateImage, generateObject, generateText, generateVideo, googleGenaiAdapter, googleImageAdapter, hasAwsCredentials, higgsfieldAdapter, imageOutputFormats, isArrayInputSpecKey, isInputSpecKey, isListed, isListedOn, isModelKitError, keyOverrideFor, keysFromEnv, languageModel, liveCatalog, liveState, lumaAdapter, lumaReframeTooTall, mergeTextProviderOptions, missingTierKeys, model3dCall, model3dConstraints, model3dInputRefusal, model3dPricingSku, model3dResolution, model3dSeedFits, model3dSkus, model3dTexture, modelsPoweredBy, nearestAspectRatio, normalizeExposure, openaiImageAdapter, passthroughTextModel, planVideoTool, pollUntil, prepareMediaPart, primeCatalog, prodiaAdapter, readErrorBody, replicateAdapter, resetLiveCatalog, resolutionTier, resolveAudioOptions, resolveDubbingOptions, resolveImageOptions, resolveKeys, resolveLipsyncOptions, resolveSpeechOptions, resolveTranscriptionOptions, resolveVideoOptions, resolveVoiceChangeOptions, resolveVoiceCloneOptions, resolveVoiceDesignOptions, shouldRetry, sleep, sortCatalogRows, streamObject, streamText, takesTargetAspectRatio, testProviderKey, textUsageEvent, toGeneratedImage, validateInputSpec, videoLengthViolation, videoSizeViolation, videoToolConstraints, withRetry, xaiVideoAdapter };