@shop-os/modelkit 0.13.0 → 0.15.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/CHANGELOG.md +20 -0
- package/dist/catalog.cjs +82 -3
- package/dist/catalog.cjs.map +1 -1
- package/dist/catalog.d.cts +33 -2
- package/dist/catalog.d.ts +33 -2
- package/dist/catalog.js +82 -3
- package/dist/catalog.js.map +1 -1
- package/dist/index.cjs +87 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +33 -2
- package/dist/index.d.ts +33 -2
- package/dist/index.js +86 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/catalog.d.cts
CHANGED
|
@@ -129,7 +129,7 @@ interface Model3dConstraints {
|
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
131
|
/** What a `video-tool` row does to its source clip. */
|
|
132
|
-
type VideoToolKind = "upscale" | "interpolate" | "hdr" | "bg-remove" | "subtitles";
|
|
132
|
+
type VideoToolKind = "upscale" | "interpolate" | "hdr" | "bg-remove" | "subtitles" | "depth";
|
|
133
133
|
/** Container/codec a video-tool row can write. */
|
|
134
134
|
/** `exr`: a ZIP of 16-bit EXR frames in `VideoToolResult.frames`, with an MP4 preview as `video`. */
|
|
135
135
|
type VideoToolOutputFormat = "h265" | "prores" | "exr";
|
|
@@ -598,6 +598,11 @@ type SupportedOption = "seed" | "quality" | "negativePrompt" | "cfgScale" | "gen
|
|
|
598
598
|
| "insertWindow"
|
|
599
599
|
/** Mask rows: `ImageRequest.points` and `ImageRequest.boxes`. */
|
|
600
600
|
| "points" | "boxes";
|
|
601
|
+
/** Smallest frame a provider takes for an input video, in pixels (fal: "Min width: 700px"). */
|
|
602
|
+
interface VideoPixelLimits {
|
|
603
|
+
minWidth?: number;
|
|
604
|
+
minHeight?: number;
|
|
605
|
+
}
|
|
601
606
|
interface VideoSecondsLimits {
|
|
602
607
|
/** Minimum length of each reference video, in seconds. */
|
|
603
608
|
min?: number;
|
|
@@ -619,6 +624,8 @@ interface ReferenceLimits {
|
|
|
619
624
|
audioOnly?: boolean;
|
|
620
625
|
/** Per-video length caps (min/max each) and combined total for reference videos. */
|
|
621
626
|
videoSeconds?: VideoSecondsLimits;
|
|
627
|
+
/** Smallest frame each reference video may have (Kling 4.0: 700 px). Kits before 0.15.0 ignore it. */
|
|
628
|
+
videoPixels?: VideoPixelLimits;
|
|
622
629
|
/** Per-clip length caps (min/max each) and combined total for reference audio, in seconds. */
|
|
623
630
|
audioSeconds?: {
|
|
624
631
|
min?: number;
|
|
@@ -748,6 +755,8 @@ interface ModelConstraints {
|
|
|
748
755
|
languages?: LanguageOption[];
|
|
749
756
|
/** Audio-output rows whose provider lets the caller pick a file format; `defaults.outputFormat` is one. */
|
|
750
757
|
outputFormats?: string[];
|
|
758
|
+
/** Smallest frame the source video may have (Kling 4.0 Edit: 700 px). Kits before 0.15.0 ignore it. */
|
|
759
|
+
sourceVideoPixels?: VideoPixelLimits;
|
|
751
760
|
/** Length limits for the source video the row edits or extends. */
|
|
752
761
|
sourceVideoSeconds?: Omit<VideoSecondsLimits, "total"> & {
|
|
753
762
|
/** The provider sends the source as a reference video, so it counts toward `references.videoSeconds.total` (Seedance). */
|
|
@@ -1224,6 +1233,10 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
|
|
|
1224
1233
|
total: z.ZodOptional<z.ZodNumber>;
|
|
1225
1234
|
editMin: z.ZodOptional<z.ZodNumber>;
|
|
1226
1235
|
}, z.core.$loose>>;
|
|
1236
|
+
videoPixels: z.ZodOptional<z.ZodObject<{
|
|
1237
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
1238
|
+
minHeight: z.ZodOptional<z.ZodNumber>;
|
|
1239
|
+
}, z.core.$loose>>;
|
|
1227
1240
|
audioSeconds: z.ZodOptional<z.ZodObject<{
|
|
1228
1241
|
min: z.ZodOptional<z.ZodNumber>;
|
|
1229
1242
|
max: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1301,6 +1314,10 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
|
|
|
1301
1314
|
name: z.ZodString;
|
|
1302
1315
|
}, z.core.$loose>>>;
|
|
1303
1316
|
outputFormats: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1317
|
+
sourceVideoPixels: z.ZodOptional<z.ZodObject<{
|
|
1318
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
1319
|
+
minHeight: z.ZodOptional<z.ZodNumber>;
|
|
1320
|
+
}, z.core.$loose>>;
|
|
1304
1321
|
sourceVideoSeconds: z.ZodOptional<z.ZodObject<{
|
|
1305
1322
|
max: z.ZodOptional<z.ZodNumber>;
|
|
1306
1323
|
min: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1322,6 +1339,7 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
|
|
|
1322
1339
|
interpolate: "interpolate";
|
|
1323
1340
|
hdr: "hdr";
|
|
1324
1341
|
subtitles: "subtitles";
|
|
1342
|
+
depth: "depth";
|
|
1325
1343
|
}>;
|
|
1326
1344
|
upscaleFactor: z.ZodOptional<z.ZodObject<{
|
|
1327
1345
|
min: z.ZodNumber;
|
|
@@ -1772,6 +1790,19 @@ declare function videoLengthViolation(model: CatalogModel, input: {
|
|
|
1772
1790
|
sourceVideo?: number;
|
|
1773
1791
|
taskType?: VideoRequest["taskType"];
|
|
1774
1792
|
}): string | undefined;
|
|
1793
|
+
type MeasuredFrame = {
|
|
1794
|
+
width?: number;
|
|
1795
|
+
height?: number;
|
|
1796
|
+
} | undefined;
|
|
1797
|
+
/**
|
|
1798
|
+
* First frame-size violation for the videos a request sends, as a user-facing message, from
|
|
1799
|
+
* their measured pixel sizes (`references.videoPixels`, `sourceVideoPixels`). An unmeasured
|
|
1800
|
+
* video passes: the provider still has the last word.
|
|
1801
|
+
*/
|
|
1802
|
+
declare function videoSizeViolation(model: CatalogModel, input: {
|
|
1803
|
+
referenceVideos?: MeasuredFrame[];
|
|
1804
|
+
sourceVideo?: MeasuredFrame;
|
|
1805
|
+
}): string | undefined;
|
|
1775
1806
|
declare function resolveImageOptions(model: CatalogModel, request: ImageRequest, onUnsupported?: OnUnsupported): ResolveResult<ImageRequest>;
|
|
1776
1807
|
declare function resolveVideoOptions(model: CatalogModel, request: VideoRequest, onUnsupported?: OnUnsupported): ResolveResult<VideoRequest>;
|
|
1777
1808
|
declare function resolveAudioOptions(model: CatalogModel, request: AudioRequest, onUnsupported?: OnUnsupported): ResolveResult<AudioRequest>;
|
|
@@ -1937,4 +1968,4 @@ declare function promptConventions(row: {
|
|
|
1937
1968
|
constraints: unknown;
|
|
1938
1969
|
}): PromptConventions;
|
|
1939
1970
|
|
|
1940
|
-
export { ADAPTER_IDS, AUDIO_OUTPUTS, type AdapterEndpoints, type AdapterId, type AspectRatio, type AudioOutput, type AudioRequest, type AudioResult, type CallContext, Catalog, type CatalogAuth, type CatalogCache, type CatalogCapabilities, type CatalogDisplay, type CatalogEnvelope, type CatalogModel, CatalogModelSchema, CatalogModelSchemaBase, type CatalogOrigin, CatalogSchema, type CatalogSource, type DubbingRequest, type DubbingResult, type Exposure, ExposureSchema, type GeneratedImage, IMAGE_MODELS, type ImageBytes, type ImageCallOptions, type ImageCallResult, type ImageQuality, type ImageRequest, type ImageResult, type ImageSafetySetting, type ImageSize, type JsonObject, type JsonPrimitive, type JsonValue, type KeyTier, type LanguageOption, type Lifecycle, type LipsyncRequest, type LipsyncResult, type LiveCatalogState, MEDIA_METHODS, MEDIA_NODE_MODELS, MODEL3D_IMAGE_SLOTS, MODEL3D_MODELS, MODELS, type MaskBox, type MaskPoint, type MediaMethod, type MediaNodeDefaults, type MediaOutput, type MediaPart, type MediaRef, 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 ModelKitConfig, ModelKitError, type ModelKitErrorCode, type ModelKitErrorInit, type ModelType, OTHER_MODELS, type OnUnsupported, type OutputFormat, type PricingKind, type PrimeCatalogResult, type PromptConventions, type ProviderErrorBody, type ProviderKeyName, type ProviderKeys, type ProviderOptionValue, type ProviderOptions, type QuarantineResult, REFERENCE_SYNTAXES, type ReferenceLimits, type ReferenceSyntax, type RequiredInput, type RequiredKeyName, type ResolveCall, type ResolveResult, type ResolvedCall, type Routing, SURFACES, type SpeechRequest, type SubtitleOptions, type SubtitleTextStyle, type SupportedOption, type Surface, SurfaceSchema, TEXT_MODELS, type TranscriptWord, type TranscriptionRequest, type TranscriptionResult, type UpscaleOptions, type UsageEvent, type UsageModality, type UsageUnit, VIDEO_MODELS, VIDEO_TOOL_MODELS, type VideoCallJob, type VideoCallOptions, type VideoJob, type VideoModel, 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, billedAudio, compareCatalogOrder, hasAwsCredentials, isListed, isListedOn, isModelKitError, liveCatalog, liveState, lumaReframeTooTall, model3dConstraints, model3dInputRefusal, model3dPricingSku, model3dResolution, model3dSeedFits, model3dSkus, model3dTexture, nearestAspectRatio, normalizeExposure, outputAudio, planVideoTool, primeCatalog, promptConventions, resetLiveCatalog, resolutionTier, resolveAudioOptions, resolveDubbingOptions, resolveImageOptions, resolveLipsyncOptions, resolveOptions, resolveSpeechOptions, resolveTranscriptionOptions, resolveVideoOptions, resolveVoiceChangeOptions, resolveVoiceCloneOptions, resolveVoiceDesignOptions, sortCatalogRows, takesTargetAspectRatio, videoLengthViolation, videoToolConstraints };
|
|
1971
|
+
export { ADAPTER_IDS, AUDIO_OUTPUTS, type AdapterEndpoints, type AdapterId, type AspectRatio, type AudioOutput, type AudioRequest, type AudioResult, type CallContext, Catalog, type CatalogAuth, type CatalogCache, type CatalogCapabilities, type CatalogDisplay, type CatalogEnvelope, type CatalogModel, CatalogModelSchema, CatalogModelSchemaBase, type CatalogOrigin, CatalogSchema, type CatalogSource, type DubbingRequest, type DubbingResult, type Exposure, ExposureSchema, type GeneratedImage, IMAGE_MODELS, type ImageBytes, type ImageCallOptions, type ImageCallResult, type ImageQuality, type ImageRequest, type ImageResult, type ImageSafetySetting, type ImageSize, type JsonObject, type JsonPrimitive, type JsonValue, type KeyTier, type LanguageOption, type Lifecycle, type LipsyncRequest, type LipsyncResult, type LiveCatalogState, MEDIA_METHODS, MEDIA_NODE_MODELS, MODEL3D_IMAGE_SLOTS, MODEL3D_MODELS, MODELS, type MaskBox, type MaskPoint, type MediaMethod, type MediaNodeDefaults, type MediaOutput, type MediaPart, type MediaRef, 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 ModelKitConfig, ModelKitError, type ModelKitErrorCode, type ModelKitErrorInit, type ModelType, OTHER_MODELS, type OnUnsupported, type OutputFormat, type PricingKind, type PrimeCatalogResult, type PromptConventions, type ProviderErrorBody, type ProviderKeyName, type ProviderKeys, type ProviderOptionValue, type ProviderOptions, type QuarantineResult, REFERENCE_SYNTAXES, type ReferenceLimits, type ReferenceSyntax, type RequiredInput, type RequiredKeyName, type ResolveCall, type ResolveResult, type ResolvedCall, type Routing, SURFACES, type SpeechRequest, type SubtitleOptions, type SubtitleTextStyle, type SupportedOption, type Surface, SurfaceSchema, TEXT_MODELS, type TranscriptWord, type TranscriptionRequest, type TranscriptionResult, type UpscaleOptions, type UsageEvent, type UsageModality, type UsageUnit, VIDEO_MODELS, 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, billedAudio, compareCatalogOrder, hasAwsCredentials, isListed, isListedOn, isModelKitError, liveCatalog, liveState, lumaReframeTooTall, model3dConstraints, model3dInputRefusal, model3dPricingSku, model3dResolution, model3dSeedFits, model3dSkus, model3dTexture, nearestAspectRatio, normalizeExposure, outputAudio, planVideoTool, primeCatalog, promptConventions, resetLiveCatalog, resolutionTier, resolveAudioOptions, resolveDubbingOptions, resolveImageOptions, resolveLipsyncOptions, resolveOptions, resolveSpeechOptions, resolveTranscriptionOptions, resolveVideoOptions, resolveVoiceChangeOptions, resolveVoiceCloneOptions, resolveVoiceDesignOptions, sortCatalogRows, takesTargetAspectRatio, videoLengthViolation, videoSizeViolation, videoToolConstraints };
|
package/dist/catalog.d.ts
CHANGED
|
@@ -129,7 +129,7 @@ interface Model3dConstraints {
|
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
131
|
/** What a `video-tool` row does to its source clip. */
|
|
132
|
-
type VideoToolKind = "upscale" | "interpolate" | "hdr" | "bg-remove" | "subtitles";
|
|
132
|
+
type VideoToolKind = "upscale" | "interpolate" | "hdr" | "bg-remove" | "subtitles" | "depth";
|
|
133
133
|
/** Container/codec a video-tool row can write. */
|
|
134
134
|
/** `exr`: a ZIP of 16-bit EXR frames in `VideoToolResult.frames`, with an MP4 preview as `video`. */
|
|
135
135
|
type VideoToolOutputFormat = "h265" | "prores" | "exr";
|
|
@@ -598,6 +598,11 @@ type SupportedOption = "seed" | "quality" | "negativePrompt" | "cfgScale" | "gen
|
|
|
598
598
|
| "insertWindow"
|
|
599
599
|
/** Mask rows: `ImageRequest.points` and `ImageRequest.boxes`. */
|
|
600
600
|
| "points" | "boxes";
|
|
601
|
+
/** Smallest frame a provider takes for an input video, in pixels (fal: "Min width: 700px"). */
|
|
602
|
+
interface VideoPixelLimits {
|
|
603
|
+
minWidth?: number;
|
|
604
|
+
minHeight?: number;
|
|
605
|
+
}
|
|
601
606
|
interface VideoSecondsLimits {
|
|
602
607
|
/** Minimum length of each reference video, in seconds. */
|
|
603
608
|
min?: number;
|
|
@@ -619,6 +624,8 @@ interface ReferenceLimits {
|
|
|
619
624
|
audioOnly?: boolean;
|
|
620
625
|
/** Per-video length caps (min/max each) and combined total for reference videos. */
|
|
621
626
|
videoSeconds?: VideoSecondsLimits;
|
|
627
|
+
/** Smallest frame each reference video may have (Kling 4.0: 700 px). Kits before 0.15.0 ignore it. */
|
|
628
|
+
videoPixels?: VideoPixelLimits;
|
|
622
629
|
/** Per-clip length caps (min/max each) and combined total for reference audio, in seconds. */
|
|
623
630
|
audioSeconds?: {
|
|
624
631
|
min?: number;
|
|
@@ -748,6 +755,8 @@ interface ModelConstraints {
|
|
|
748
755
|
languages?: LanguageOption[];
|
|
749
756
|
/** Audio-output rows whose provider lets the caller pick a file format; `defaults.outputFormat` is one. */
|
|
750
757
|
outputFormats?: string[];
|
|
758
|
+
/** Smallest frame the source video may have (Kling 4.0 Edit: 700 px). Kits before 0.15.0 ignore it. */
|
|
759
|
+
sourceVideoPixels?: VideoPixelLimits;
|
|
751
760
|
/** Length limits for the source video the row edits or extends. */
|
|
752
761
|
sourceVideoSeconds?: Omit<VideoSecondsLimits, "total"> & {
|
|
753
762
|
/** The provider sends the source as a reference video, so it counts toward `references.videoSeconds.total` (Seedance). */
|
|
@@ -1224,6 +1233,10 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
|
|
|
1224
1233
|
total: z.ZodOptional<z.ZodNumber>;
|
|
1225
1234
|
editMin: z.ZodOptional<z.ZodNumber>;
|
|
1226
1235
|
}, z.core.$loose>>;
|
|
1236
|
+
videoPixels: z.ZodOptional<z.ZodObject<{
|
|
1237
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
1238
|
+
minHeight: z.ZodOptional<z.ZodNumber>;
|
|
1239
|
+
}, z.core.$loose>>;
|
|
1227
1240
|
audioSeconds: z.ZodOptional<z.ZodObject<{
|
|
1228
1241
|
min: z.ZodOptional<z.ZodNumber>;
|
|
1229
1242
|
max: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1301,6 +1314,10 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
|
|
|
1301
1314
|
name: z.ZodString;
|
|
1302
1315
|
}, z.core.$loose>>>;
|
|
1303
1316
|
outputFormats: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1317
|
+
sourceVideoPixels: z.ZodOptional<z.ZodObject<{
|
|
1318
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
1319
|
+
minHeight: z.ZodOptional<z.ZodNumber>;
|
|
1320
|
+
}, z.core.$loose>>;
|
|
1304
1321
|
sourceVideoSeconds: z.ZodOptional<z.ZodObject<{
|
|
1305
1322
|
max: z.ZodOptional<z.ZodNumber>;
|
|
1306
1323
|
min: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1322,6 +1339,7 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
|
|
|
1322
1339
|
interpolate: "interpolate";
|
|
1323
1340
|
hdr: "hdr";
|
|
1324
1341
|
subtitles: "subtitles";
|
|
1342
|
+
depth: "depth";
|
|
1325
1343
|
}>;
|
|
1326
1344
|
upscaleFactor: z.ZodOptional<z.ZodObject<{
|
|
1327
1345
|
min: z.ZodNumber;
|
|
@@ -1772,6 +1790,19 @@ declare function videoLengthViolation(model: CatalogModel, input: {
|
|
|
1772
1790
|
sourceVideo?: number;
|
|
1773
1791
|
taskType?: VideoRequest["taskType"];
|
|
1774
1792
|
}): string | undefined;
|
|
1793
|
+
type MeasuredFrame = {
|
|
1794
|
+
width?: number;
|
|
1795
|
+
height?: number;
|
|
1796
|
+
} | undefined;
|
|
1797
|
+
/**
|
|
1798
|
+
* First frame-size violation for the videos a request sends, as a user-facing message, from
|
|
1799
|
+
* their measured pixel sizes (`references.videoPixels`, `sourceVideoPixels`). An unmeasured
|
|
1800
|
+
* video passes: the provider still has the last word.
|
|
1801
|
+
*/
|
|
1802
|
+
declare function videoSizeViolation(model: CatalogModel, input: {
|
|
1803
|
+
referenceVideos?: MeasuredFrame[];
|
|
1804
|
+
sourceVideo?: MeasuredFrame;
|
|
1805
|
+
}): string | undefined;
|
|
1775
1806
|
declare function resolveImageOptions(model: CatalogModel, request: ImageRequest, onUnsupported?: OnUnsupported): ResolveResult<ImageRequest>;
|
|
1776
1807
|
declare function resolveVideoOptions(model: CatalogModel, request: VideoRequest, onUnsupported?: OnUnsupported): ResolveResult<VideoRequest>;
|
|
1777
1808
|
declare function resolveAudioOptions(model: CatalogModel, request: AudioRequest, onUnsupported?: OnUnsupported): ResolveResult<AudioRequest>;
|
|
@@ -1937,4 +1968,4 @@ declare function promptConventions(row: {
|
|
|
1937
1968
|
constraints: unknown;
|
|
1938
1969
|
}): PromptConventions;
|
|
1939
1970
|
|
|
1940
|
-
export { ADAPTER_IDS, AUDIO_OUTPUTS, type AdapterEndpoints, type AdapterId, type AspectRatio, type AudioOutput, type AudioRequest, type AudioResult, type CallContext, Catalog, type CatalogAuth, type CatalogCache, type CatalogCapabilities, type CatalogDisplay, type CatalogEnvelope, type CatalogModel, CatalogModelSchema, CatalogModelSchemaBase, type CatalogOrigin, CatalogSchema, type CatalogSource, type DubbingRequest, type DubbingResult, type Exposure, ExposureSchema, type GeneratedImage, IMAGE_MODELS, type ImageBytes, type ImageCallOptions, type ImageCallResult, type ImageQuality, type ImageRequest, type ImageResult, type ImageSafetySetting, type ImageSize, type JsonObject, type JsonPrimitive, type JsonValue, type KeyTier, type LanguageOption, type Lifecycle, type LipsyncRequest, type LipsyncResult, type LiveCatalogState, MEDIA_METHODS, MEDIA_NODE_MODELS, MODEL3D_IMAGE_SLOTS, MODEL3D_MODELS, MODELS, type MaskBox, type MaskPoint, type MediaMethod, type MediaNodeDefaults, type MediaOutput, type MediaPart, type MediaRef, 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 ModelKitConfig, ModelKitError, type ModelKitErrorCode, type ModelKitErrorInit, type ModelType, OTHER_MODELS, type OnUnsupported, type OutputFormat, type PricingKind, type PrimeCatalogResult, type PromptConventions, type ProviderErrorBody, type ProviderKeyName, type ProviderKeys, type ProviderOptionValue, type ProviderOptions, type QuarantineResult, REFERENCE_SYNTAXES, type ReferenceLimits, type ReferenceSyntax, type RequiredInput, type RequiredKeyName, type ResolveCall, type ResolveResult, type ResolvedCall, type Routing, SURFACES, type SpeechRequest, type SubtitleOptions, type SubtitleTextStyle, type SupportedOption, type Surface, SurfaceSchema, TEXT_MODELS, type TranscriptWord, type TranscriptionRequest, type TranscriptionResult, type UpscaleOptions, type UsageEvent, type UsageModality, type UsageUnit, VIDEO_MODELS, VIDEO_TOOL_MODELS, type VideoCallJob, type VideoCallOptions, type VideoJob, type VideoModel, 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, billedAudio, compareCatalogOrder, hasAwsCredentials, isListed, isListedOn, isModelKitError, liveCatalog, liveState, lumaReframeTooTall, model3dConstraints, model3dInputRefusal, model3dPricingSku, model3dResolution, model3dSeedFits, model3dSkus, model3dTexture, nearestAspectRatio, normalizeExposure, outputAudio, planVideoTool, primeCatalog, promptConventions, resetLiveCatalog, resolutionTier, resolveAudioOptions, resolveDubbingOptions, resolveImageOptions, resolveLipsyncOptions, resolveOptions, resolveSpeechOptions, resolveTranscriptionOptions, resolveVideoOptions, resolveVoiceChangeOptions, resolveVoiceCloneOptions, resolveVoiceDesignOptions, sortCatalogRows, takesTargetAspectRatio, videoLengthViolation, videoToolConstraints };
|
|
1971
|
+
export { ADAPTER_IDS, AUDIO_OUTPUTS, type AdapterEndpoints, type AdapterId, type AspectRatio, type AudioOutput, type AudioRequest, type AudioResult, type CallContext, Catalog, type CatalogAuth, type CatalogCache, type CatalogCapabilities, type CatalogDisplay, type CatalogEnvelope, type CatalogModel, CatalogModelSchema, CatalogModelSchemaBase, type CatalogOrigin, CatalogSchema, type CatalogSource, type DubbingRequest, type DubbingResult, type Exposure, ExposureSchema, type GeneratedImage, IMAGE_MODELS, type ImageBytes, type ImageCallOptions, type ImageCallResult, type ImageQuality, type ImageRequest, type ImageResult, type ImageSafetySetting, type ImageSize, type JsonObject, type JsonPrimitive, type JsonValue, type KeyTier, type LanguageOption, type Lifecycle, type LipsyncRequest, type LipsyncResult, type LiveCatalogState, MEDIA_METHODS, MEDIA_NODE_MODELS, MODEL3D_IMAGE_SLOTS, MODEL3D_MODELS, MODELS, type MaskBox, type MaskPoint, type MediaMethod, type MediaNodeDefaults, type MediaOutput, type MediaPart, type MediaRef, 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 ModelKitConfig, ModelKitError, type ModelKitErrorCode, type ModelKitErrorInit, type ModelType, OTHER_MODELS, type OnUnsupported, type OutputFormat, type PricingKind, type PrimeCatalogResult, type PromptConventions, type ProviderErrorBody, type ProviderKeyName, type ProviderKeys, type ProviderOptionValue, type ProviderOptions, type QuarantineResult, REFERENCE_SYNTAXES, type ReferenceLimits, type ReferenceSyntax, type RequiredInput, type RequiredKeyName, type ResolveCall, type ResolveResult, type ResolvedCall, type Routing, SURFACES, type SpeechRequest, type SubtitleOptions, type SubtitleTextStyle, type SupportedOption, type Surface, SurfaceSchema, TEXT_MODELS, type TranscriptWord, type TranscriptionRequest, type TranscriptionResult, type UpscaleOptions, type UsageEvent, type UsageModality, type UsageUnit, VIDEO_MODELS, 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, billedAudio, compareCatalogOrder, hasAwsCredentials, isListed, isListedOn, isModelKitError, liveCatalog, liveState, lumaReframeTooTall, model3dConstraints, model3dInputRefusal, model3dPricingSku, model3dResolution, model3dSeedFits, model3dSkus, model3dTexture, nearestAspectRatio, normalizeExposure, outputAudio, planVideoTool, primeCatalog, promptConventions, resetLiveCatalog, resolutionTier, resolveAudioOptions, resolveDubbingOptions, resolveImageOptions, resolveLipsyncOptions, resolveOptions, resolveSpeechOptions, resolveTranscriptionOptions, resolveVideoOptions, resolveVoiceChangeOptions, resolveVoiceCloneOptions, resolveVoiceDesignOptions, sortCatalogRows, takesTargetAspectRatio, videoLengthViolation, videoSizeViolation, videoToolConstraints };
|
package/dist/catalog.js
CHANGED
|
@@ -5082,6 +5082,7 @@ function klingMotionControl(tier) {
|
|
|
5082
5082
|
videos: 1,
|
|
5083
5083
|
audios: 0,
|
|
5084
5084
|
videoSeconds: { min: 3, max: 30.05 },
|
|
5085
|
+
videoPixels: { minWidth: 340, minHeight: 340 },
|
|
5085
5086
|
min: { images: 1, videos: 1 }
|
|
5086
5087
|
},
|
|
5087
5088
|
requires: ["references"],
|
|
@@ -5148,6 +5149,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5148
5149
|
references: { ...NO_REFERENCES, images: 4 },
|
|
5149
5150
|
requires: ["sourceVideo"],
|
|
5150
5151
|
sourceVideoSeconds: { min: 3, max: 15.05 },
|
|
5152
|
+
sourceVideoPixels: { minWidth: 720, minHeight: 720 },
|
|
5151
5153
|
// generateAudio keeps (true) or drops (false) the source soundtrack.
|
|
5152
5154
|
supports: ["generateAudio"],
|
|
5153
5155
|
prompt: KLING_PROMPT,
|
|
@@ -5188,7 +5190,8 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5188
5190
|
...NO_REFERENCES,
|
|
5189
5191
|
images: 10,
|
|
5190
5192
|
videos: 5,
|
|
5191
|
-
videoSeconds: { min: 3, max: 30.05, total: 30 }
|
|
5193
|
+
videoSeconds: { min: 3, max: 30.05, total: 30 },
|
|
5194
|
+
videoPixels: { minWidth: 700, minHeight: 700 }
|
|
5192
5195
|
},
|
|
5193
5196
|
supports: ["lastFrame"],
|
|
5194
5197
|
prompt: KLING_V4_PROMPT,
|
|
@@ -5222,6 +5225,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5222
5225
|
references: { ...NO_REFERENCES, images: 10 },
|
|
5223
5226
|
requires: ["sourceVideo"],
|
|
5224
5227
|
sourceVideoSeconds: { min: 3, max: 30.05 },
|
|
5228
|
+
sourceVideoPixels: { minWidth: 700, minHeight: 700 },
|
|
5225
5229
|
supports: [],
|
|
5226
5230
|
prompt: KLING_V4_PROMPT,
|
|
5227
5231
|
audio: KLING_V4_AUDIO
|
|
@@ -6558,6 +6562,33 @@ var VIDEO_TOOL_MODELS = [
|
|
|
6558
6562
|
description: "Topaz Hyperion 2.5 SDR to HDR: a 10-bit HDR master in H.265 (HDR10) or ProRes 422 HQ, at the source's size and frame rate."
|
|
6559
6563
|
}
|
|
6560
6564
|
},
|
|
6565
|
+
{
|
|
6566
|
+
// https://fal.ai/models/fal-ai/depth-anything-video/api: greyscale depth (white = near)
|
|
6567
|
+
// at the source's frame rate, short edge capped at 1080 px (a 2160x3840 source came
|
|
6568
|
+
// back 1080x1920), at most 2400 frames; one fal price of $0.04 per second for every
|
|
6569
|
+
// model size. The adapter always sends VDA-Small, the only Apache-2.0 size. 100 s is
|
|
6570
|
+
// 2400 frames at 24 fps; the frame check refuses faster clips sooner.
|
|
6571
|
+
id: "depth-anything-video",
|
|
6572
|
+
aliases: [],
|
|
6573
|
+
label: "Video Depth Anything",
|
|
6574
|
+
type: "video-tool",
|
|
6575
|
+
adapter: "fal",
|
|
6576
|
+
providerModelId: "fal-ai/depth-anything-video",
|
|
6577
|
+
lifecycle: "active",
|
|
6578
|
+
exposure: ["cowork"],
|
|
6579
|
+
constraints: {
|
|
6580
|
+
supports: [],
|
|
6581
|
+
sourceVideoSeconds: { max: 100 },
|
|
6582
|
+
tool: { kind: "depth", maxOutputShortEdge: 1080, maxOutputFrames: 2400 }
|
|
6583
|
+
},
|
|
6584
|
+
defaults: {},
|
|
6585
|
+
usage: SECONDS_USAGE,
|
|
6586
|
+
pricingKind: "video_per_second",
|
|
6587
|
+
display: {
|
|
6588
|
+
provider: "depth-anything",
|
|
6589
|
+
description: "Video Depth Anything: a greyscale depth map of the clip (near is white), frame for frame, for motion and camera control."
|
|
6590
|
+
}
|
|
6591
|
+
},
|
|
6561
6592
|
{
|
|
6562
6593
|
id: "flux-video-upscale-precise",
|
|
6563
6594
|
aliases: [],
|
|
@@ -7745,6 +7776,10 @@ var VideoSecondsLimitsSchema = z3.looseObject({
|
|
|
7745
7776
|
total: z3.number().optional(),
|
|
7746
7777
|
editMin: z3.number().optional()
|
|
7747
7778
|
});
|
|
7779
|
+
var VideoPixelLimitsSchema = z3.looseObject({
|
|
7780
|
+
minWidth: z3.number().int().positive().optional(),
|
|
7781
|
+
minHeight: z3.number().int().positive().optional()
|
|
7782
|
+
});
|
|
7748
7783
|
var ReferenceLimitsSchema = z3.looseObject({
|
|
7749
7784
|
images: z3.number().optional(),
|
|
7750
7785
|
imagesWithVideo: z3.number().optional(),
|
|
@@ -7753,6 +7788,7 @@ var ReferenceLimitsSchema = z3.looseObject({
|
|
|
7753
7788
|
total: z3.number().optional(),
|
|
7754
7789
|
audioOnly: z3.boolean().optional(),
|
|
7755
7790
|
videoSeconds: VideoSecondsLimitsSchema.optional(),
|
|
7791
|
+
videoPixels: VideoPixelLimitsSchema.optional(),
|
|
7756
7792
|
audioSeconds: z3.looseObject({
|
|
7757
7793
|
min: z3.number().optional(),
|
|
7758
7794
|
max: z3.number().optional(),
|
|
@@ -7781,7 +7817,7 @@ var LanguageOptionSchema = z3.looseObject({
|
|
|
7781
7817
|
name: z3.string().min(1)
|
|
7782
7818
|
});
|
|
7783
7819
|
var VideoToolConstraintsSchema = z3.looseObject({
|
|
7784
|
-
kind: z3.enum(["upscale", "interpolate", "hdr", "bg-remove", "subtitles"]),
|
|
7820
|
+
kind: z3.enum(["upscale", "interpolate", "hdr", "bg-remove", "subtitles", "depth"]),
|
|
7785
7821
|
upscaleFactor: RangeSchema.optional(),
|
|
7786
7822
|
maxOutputLongEdge: z3.number().positive().optional(),
|
|
7787
7823
|
prompt: z3.boolean().optional(),
|
|
@@ -7842,6 +7878,7 @@ var ModelConstraintsSchema = z3.looseObject({
|
|
|
7842
7878
|
}).optional(),
|
|
7843
7879
|
languages: z3.array(LanguageOptionSchema).optional(),
|
|
7844
7880
|
outputFormats: z3.array(z3.string().min(1)).min(1).optional(),
|
|
7881
|
+
sourceVideoPixels: VideoPixelLimitsSchema.optional(),
|
|
7845
7882
|
sourceVideoSeconds: VideoSecondsLimitsSchema.omit({ total: true }).extend({ inReferenceTotal: z3.boolean().optional() }).optional(),
|
|
7846
7883
|
// segmentSeconds/maxTotalSeconds stay required: a kit before 0.3.0 drops a row whose
|
|
7847
7884
|
// extension lacks them, so every extension block keeps them.
|
|
@@ -8387,7 +8424,7 @@ function subtitleProblem(label, tool, options, resolution, durationSeconds) {
|
|
|
8387
8424
|
// src/catalog/video-tools-spec.ts
|
|
8388
8425
|
var RangeSchema2 = z6.object({ min: z6.number(), max: z6.number() });
|
|
8389
8426
|
var ToolSchema = z6.object({
|
|
8390
|
-
kind: z6.enum(["upscale", "interpolate", "hdr", "bg-remove", "subtitles"]),
|
|
8427
|
+
kind: z6.enum(["upscale", "interpolate", "hdr", "bg-remove", "subtitles", "depth"]),
|
|
8391
8428
|
upscaleFactor: RangeSchema2.optional(),
|
|
8392
8429
|
maxOutputLongEdge: z6.number().positive().optional(),
|
|
8393
8430
|
prompt: z6.boolean().optional(),
|
|
@@ -8525,6 +8562,25 @@ function planVideoTool(row2, req) {
|
|
|
8525
8562
|
}
|
|
8526
8563
|
};
|
|
8527
8564
|
}
|
|
8565
|
+
if (tool.kind === "depth") {
|
|
8566
|
+
const limit = tool.maxOutputFrames;
|
|
8567
|
+
if (limit !== void 0) {
|
|
8568
|
+
if (fps === void 0) return fail("The source video's frame rate is required");
|
|
8569
|
+
if (durationSeconds * fps > limit) {
|
|
8570
|
+
return fail(`${row2.label} renders up to ${limit} frames (${seconds(limit, fps)}).`);
|
|
8571
|
+
}
|
|
8572
|
+
}
|
|
8573
|
+
const out2 = shrinkToShortEdge(width, height, tool.maxOutputShortEdge);
|
|
8574
|
+
return {
|
|
8575
|
+
ok: true,
|
|
8576
|
+
output: {
|
|
8577
|
+
...base,
|
|
8578
|
+
...out2,
|
|
8579
|
+
resolution: resolutionTier(out2.width, out2.height),
|
|
8580
|
+
format: "h264"
|
|
8581
|
+
}
|
|
8582
|
+
};
|
|
8583
|
+
}
|
|
8528
8584
|
if (tool.kind === "subtitles") {
|
|
8529
8585
|
const resolution = resolutionTier(width, height);
|
|
8530
8586
|
const problem = subtitleProblem(
|
|
@@ -9347,6 +9403,28 @@ function videoLengthViolation(model, input) {
|
|
|
9347
9403
|
return `${model.label} takes a source video of at least ${String(sourceMin)} s; this one is ${seconds2(source, sourceMin)} s.`;
|
|
9348
9404
|
return void 0;
|
|
9349
9405
|
}
|
|
9406
|
+
function undersizedSide(frame, limits) {
|
|
9407
|
+
if (!frame || !limits) return void 0;
|
|
9408
|
+
const { width, height } = frame;
|
|
9409
|
+
if (limits.minWidth !== void 0 && width !== void 0 && width > 0 && width < limits.minWidth)
|
|
9410
|
+
return { side: "wide", min: limits.minWidth, actual: width };
|
|
9411
|
+
if (limits.minHeight !== void 0 && height !== void 0 && height > 0 && height < limits.minHeight)
|
|
9412
|
+
return { side: "tall", min: limits.minHeight, actual: height };
|
|
9413
|
+
return void 0;
|
|
9414
|
+
}
|
|
9415
|
+
function videoSizeViolation(model, input) {
|
|
9416
|
+
const refLimits = model.constraints.references?.videoPixels;
|
|
9417
|
+
const refs = input.referenceVideos ?? [];
|
|
9418
|
+
for (let i = 0; i < refs.length; i++) {
|
|
9419
|
+
const under2 = undersizedSide(refs[i], refLimits);
|
|
9420
|
+
if (under2)
|
|
9421
|
+
return `${model.label} takes reference videos at least ${String(under2.min)} px ${under2.side}; video ${i + 1} is ${String(under2.actual)} px.`;
|
|
9422
|
+
}
|
|
9423
|
+
const under = undersizedSide(input.sourceVideo, model.constraints.sourceVideoPixels);
|
|
9424
|
+
if (under)
|
|
9425
|
+
return `${model.label} takes a source video at least ${String(under.min)} px ${under.side}; this one is ${String(under.actual)} px.`;
|
|
9426
|
+
return void 0;
|
|
9427
|
+
}
|
|
9350
9428
|
function resolveImageOptions(model, request, onUnsupported = "error") {
|
|
9351
9429
|
const warnings = [];
|
|
9352
9430
|
const c = model.constraints;
|
|
@@ -10250,6 +10328,7 @@ export {
|
|
|
10250
10328
|
sortCatalogRows,
|
|
10251
10329
|
takesTargetAspectRatio,
|
|
10252
10330
|
videoLengthViolation,
|
|
10331
|
+
videoSizeViolation,
|
|
10253
10332
|
videoToolConstraints
|
|
10254
10333
|
};
|
|
10255
10334
|
//# sourceMappingURL=catalog.js.map
|