@shop-os/modelkit 0.20.0 → 0.21.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.
@@ -853,7 +853,25 @@ interface ModelConstraints {
853
853
  audio?: AudioOutput;
854
854
  /** Prompt conventions. Read them through `promptConventions(row)`, which fills the default. */
855
855
  prompt?: PromptConventions;
856
+ /**
857
+ * Video rows whose provider bills what the request sends (input video, reference images)
858
+ * on top of what it renders. Read it through `inputBillingOf(row)`, which also covers
859
+ * Seedance (`ark`) rows and data-only rows. Kits before 0.21.0 ignore it.
860
+ */
861
+ inputBilling?: InputBilling;
856
862
  }
863
+ /**
864
+ * How a provider bills a request's inputs. The apps own the rates; this names the rule.
865
+ * - `seedance`: input plus output seconds at the row's video-input rate.
866
+ * - `omni`: input video as input tokens, billed as equivalent output seconds.
867
+ * - `h3-max-reference`: reference image, video and audio tokens past a shared allowance.
868
+ * - `h3-reference`: a fee for each reference image past the fifth.
869
+ * - `grok-input-image`: a fee for each input image, frames included.
870
+ * - `source-video-rate`: the output alone, at the row's video-input rate.
871
+ * - `kling-v4`: output plus max(input, output) seconds at the row's video-input rate.
872
+ * - `input-plus-output`: input plus output seconds at the row's base rate.
873
+ */
874
+ type InputBilling = "seedance" | "omni" | "h3-max-reference" | "h3-reference" | "grok-input-image" | "source-video-rate" | "kling-v4" | "input-plus-output";
857
875
  /** JSON-compatible value. Provider options and raw payloads carry these, never `unknown`. */
858
876
  type JsonPrimitive = string | number | boolean | null;
859
877
  type JsonValue = JsonPrimitive | JsonValue[] | {
@@ -1556,6 +1574,7 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
1556
1574
  }, z.core.$loose>>;
1557
1575
  }, z.core.$loose>>;
1558
1576
  audio: z.ZodOptional<z.ZodUnknown>;
1577
+ inputBilling: z.ZodOptional<z.ZodUnknown>;
1559
1578
  prompt: z.ZodOptional<z.ZodUnknown>;
1560
1579
  }, z.core.$loose>;
1561
1580
  defaults: z.ZodObject<{
@@ -2164,6 +2183,7 @@ interface ReferenceImageConformPlan {
2164
2183
  declare function referenceImageConformPlan(model: CatalogModel, probe: ReferenceImageProbe): ReferenceImageConformPlan | null;
2165
2184
 
2166
2185
  declare const AUDIO_OUTPUTS: ("always" | "optional" | "never")[];
2186
+ declare const INPUT_BILLINGS: ("seedance" | "omni" | "h3-max-reference" | "h3-reference" | "grok-input-image" | "source-video-rate" | "kling-v4" | "input-plus-output")[];
2167
2187
  declare const REFERENCE_SYNTAXES: ("numbered" | "caption" | "descriptive")[];
2168
2188
  declare function outputAudio(row: {
2169
2189
  constraints: unknown;
@@ -2183,4 +2203,15 @@ declare function promptConventions(row: {
2183
2203
  constraints: unknown;
2184
2204
  }): PromptConventions;
2185
2205
 
2186
- export { ADAPTER_IDS, AUDIO_OUTPUTS, type AdapterEndpoints, type AdapterId, type AnimationFrameSize, type AnimationLimits, type AspectLimits, 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 ImageAnimation, type ImageBackground, type ImageBytes, type ImageCallOptions, type ImageCallResult, type ImagePixelLimits, type ImageQuality, type ImageRequest, type ImageResult, type ImageSafetySetting, type ImageSize, type JsonObject, type JsonPrimitive, type JsonValue, type KeySource, 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, REFERENCE_VIDEO_CONFORM_PROFILE, type ReferenceImageConformPlan, type ReferenceImageConformReason, type ReferenceImageProbe, type ReferenceLimits, type ReferenceSyntax, type ReferenceVideoConformPlan, type ReferenceVideoConformReason, type ReferenceVideoProbe, 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 VideoFpsLimits, 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, referenceImageConformPlan, referenceVideoConformPlan, resetLiveCatalog, resolutionTier, resolveAudioOptions, resolveDubbingOptions, resolveImageOptions, resolveLipsyncOptions, resolveOptions, resolveSpeechOptions, resolveTranscriptionOptions, resolveVideoOptions, resolveVoiceChangeOptions, resolveVoiceCloneOptions, resolveVoiceDesignOptions, sortCatalogRows, takesTargetAspectRatio, videoLengthViolation, videoSizeViolation, videoToolConstraints };
2206
+ /**
2207
+ * The input-billing rule of a row, or null when the provider bills only what it renders. The
2208
+ * row's own `constraints.inputBilling` wins. A live row an older seed wrote, without the field,
2209
+ * takes the kit row of the same id; an `ark` (Seedance) row is `seedance`.
2210
+ */
2211
+ declare function inputBillingOf(row: {
2212
+ id: string;
2213
+ adapter: string;
2214
+ constraints?: unknown;
2215
+ }): InputBilling | null;
2216
+
2217
+ export { ADAPTER_IDS, AUDIO_OUTPUTS, type AdapterEndpoints, type AdapterId, type AnimationFrameSize, type AnimationLimits, type AspectLimits, 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, INPUT_BILLINGS, type ImageAnimation, type ImageBackground, type ImageBytes, type ImageCallOptions, type ImageCallResult, type ImagePixelLimits, type ImageQuality, type ImageRequest, type ImageResult, type ImageSafetySetting, type ImageSize, type InputBilling, type JsonObject, type JsonPrimitive, type JsonValue, type KeySource, 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, REFERENCE_VIDEO_CONFORM_PROFILE, type ReferenceImageConformPlan, type ReferenceImageConformReason, type ReferenceImageProbe, type ReferenceLimits, type ReferenceSyntax, type ReferenceVideoConformPlan, type ReferenceVideoConformReason, type ReferenceVideoProbe, 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 VideoFpsLimits, 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, inputBillingOf, isListed, isListedOn, isModelKitError, liveCatalog, liveState, lumaReframeTooTall, model3dConstraints, model3dInputRefusal, model3dPricingSku, model3dResolution, model3dSeedFits, model3dSkus, model3dTexture, nearestAspectRatio, normalizeExposure, outputAudio, planVideoTool, primeCatalog, promptConventions, referenceImageConformPlan, referenceVideoConformPlan, resetLiveCatalog, resolutionTier, resolveAudioOptions, resolveDubbingOptions, resolveImageOptions, resolveLipsyncOptions, resolveOptions, resolveSpeechOptions, resolveTranscriptionOptions, resolveVideoOptions, resolveVoiceChangeOptions, resolveVoiceCloneOptions, resolveVoiceDesignOptions, sortCatalogRows, takesTargetAspectRatio, videoLengthViolation, videoSizeViolation, videoToolConstraints };
package/dist/catalog.d.ts CHANGED
@@ -853,7 +853,25 @@ interface ModelConstraints {
853
853
  audio?: AudioOutput;
854
854
  /** Prompt conventions. Read them through `promptConventions(row)`, which fills the default. */
855
855
  prompt?: PromptConventions;
856
+ /**
857
+ * Video rows whose provider bills what the request sends (input video, reference images)
858
+ * on top of what it renders. Read it through `inputBillingOf(row)`, which also covers
859
+ * Seedance (`ark`) rows and data-only rows. Kits before 0.21.0 ignore it.
860
+ */
861
+ inputBilling?: InputBilling;
856
862
  }
863
+ /**
864
+ * How a provider bills a request's inputs. The apps own the rates; this names the rule.
865
+ * - `seedance`: input plus output seconds at the row's video-input rate.
866
+ * - `omni`: input video as input tokens, billed as equivalent output seconds.
867
+ * - `h3-max-reference`: reference image, video and audio tokens past a shared allowance.
868
+ * - `h3-reference`: a fee for each reference image past the fifth.
869
+ * - `grok-input-image`: a fee for each input image, frames included.
870
+ * - `source-video-rate`: the output alone, at the row's video-input rate.
871
+ * - `kling-v4`: output plus max(input, output) seconds at the row's video-input rate.
872
+ * - `input-plus-output`: input plus output seconds at the row's base rate.
873
+ */
874
+ type InputBilling = "seedance" | "omni" | "h3-max-reference" | "h3-reference" | "grok-input-image" | "source-video-rate" | "kling-v4" | "input-plus-output";
857
875
  /** JSON-compatible value. Provider options and raw payloads carry these, never `unknown`. */
858
876
  type JsonPrimitive = string | number | boolean | null;
859
877
  type JsonValue = JsonPrimitive | JsonValue[] | {
@@ -1556,6 +1574,7 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
1556
1574
  }, z.core.$loose>>;
1557
1575
  }, z.core.$loose>>;
1558
1576
  audio: z.ZodOptional<z.ZodUnknown>;
1577
+ inputBilling: z.ZodOptional<z.ZodUnknown>;
1559
1578
  prompt: z.ZodOptional<z.ZodUnknown>;
1560
1579
  }, z.core.$loose>;
1561
1580
  defaults: z.ZodObject<{
@@ -2164,6 +2183,7 @@ interface ReferenceImageConformPlan {
2164
2183
  declare function referenceImageConformPlan(model: CatalogModel, probe: ReferenceImageProbe): ReferenceImageConformPlan | null;
2165
2184
 
2166
2185
  declare const AUDIO_OUTPUTS: ("always" | "optional" | "never")[];
2186
+ declare const INPUT_BILLINGS: ("seedance" | "omni" | "h3-max-reference" | "h3-reference" | "grok-input-image" | "source-video-rate" | "kling-v4" | "input-plus-output")[];
2167
2187
  declare const REFERENCE_SYNTAXES: ("numbered" | "caption" | "descriptive")[];
2168
2188
  declare function outputAudio(row: {
2169
2189
  constraints: unknown;
@@ -2183,4 +2203,15 @@ declare function promptConventions(row: {
2183
2203
  constraints: unknown;
2184
2204
  }): PromptConventions;
2185
2205
 
2186
- export { ADAPTER_IDS, AUDIO_OUTPUTS, type AdapterEndpoints, type AdapterId, type AnimationFrameSize, type AnimationLimits, type AspectLimits, 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 ImageAnimation, type ImageBackground, type ImageBytes, type ImageCallOptions, type ImageCallResult, type ImagePixelLimits, type ImageQuality, type ImageRequest, type ImageResult, type ImageSafetySetting, type ImageSize, type JsonObject, type JsonPrimitive, type JsonValue, type KeySource, 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, REFERENCE_VIDEO_CONFORM_PROFILE, type ReferenceImageConformPlan, type ReferenceImageConformReason, type ReferenceImageProbe, type ReferenceLimits, type ReferenceSyntax, type ReferenceVideoConformPlan, type ReferenceVideoConformReason, type ReferenceVideoProbe, 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 VideoFpsLimits, 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, referenceImageConformPlan, referenceVideoConformPlan, resetLiveCatalog, resolutionTier, resolveAudioOptions, resolveDubbingOptions, resolveImageOptions, resolveLipsyncOptions, resolveOptions, resolveSpeechOptions, resolveTranscriptionOptions, resolveVideoOptions, resolveVoiceChangeOptions, resolveVoiceCloneOptions, resolveVoiceDesignOptions, sortCatalogRows, takesTargetAspectRatio, videoLengthViolation, videoSizeViolation, videoToolConstraints };
2206
+ /**
2207
+ * The input-billing rule of a row, or null when the provider bills only what it renders. The
2208
+ * row's own `constraints.inputBilling` wins. A live row an older seed wrote, without the field,
2209
+ * takes the kit row of the same id; an `ark` (Seedance) row is `seedance`.
2210
+ */
2211
+ declare function inputBillingOf(row: {
2212
+ id: string;
2213
+ adapter: string;
2214
+ constraints?: unknown;
2215
+ }): InputBilling | null;
2216
+
2217
+ export { ADAPTER_IDS, AUDIO_OUTPUTS, type AdapterEndpoints, type AdapterId, type AnimationFrameSize, type AnimationLimits, type AspectLimits, 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, INPUT_BILLINGS, type ImageAnimation, type ImageBackground, type ImageBytes, type ImageCallOptions, type ImageCallResult, type ImagePixelLimits, type ImageQuality, type ImageRequest, type ImageResult, type ImageSafetySetting, type ImageSize, type InputBilling, type JsonObject, type JsonPrimitive, type JsonValue, type KeySource, 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, REFERENCE_VIDEO_CONFORM_PROFILE, type ReferenceImageConformPlan, type ReferenceImageConformReason, type ReferenceImageProbe, type ReferenceLimits, type ReferenceSyntax, type ReferenceVideoConformPlan, type ReferenceVideoConformReason, type ReferenceVideoProbe, 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 VideoFpsLimits, 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, inputBillingOf, isListed, isListedOn, isModelKitError, liveCatalog, liveState, lumaReframeTooTall, model3dConstraints, model3dInputRefusal, model3dPricingSku, model3dResolution, model3dSeedFits, model3dSkus, model3dTexture, nearestAspectRatio, normalizeExposure, outputAudio, planVideoTool, primeCatalog, promptConventions, referenceImageConformPlan, referenceVideoConformPlan, resetLiveCatalog, resolutionTier, resolveAudioOptions, resolveDubbingOptions, resolveImageOptions, resolveLipsyncOptions, resolveOptions, resolveSpeechOptions, resolveTranscriptionOptions, resolveVideoOptions, resolveVoiceChangeOptions, resolveVoiceCloneOptions, resolveVoiceDesignOptions, sortCatalogRows, takesTargetAspectRatio, videoLengthViolation, videoSizeViolation, videoToolConstraints };
package/dist/catalog.js CHANGED
@@ -5363,6 +5363,7 @@ var VIDEO_FAMILY_MODELS = [
5363
5363
  lifecycle: "active",
5364
5364
  exposure: ["cowork", "space_builder"],
5365
5365
  constraints: {
5366
+ inputBilling: "kling-v4",
5366
5367
  aspectRatios: ["adaptive", "16:9", "9:16", "1:1", "21:9"],
5367
5368
  resolutions: ["720p", "1080p"],
5368
5369
  durations: { min: 3, max: 30 },
@@ -5402,6 +5403,7 @@ var VIDEO_FAMILY_MODELS = [
5402
5403
  lifecycle: "active",
5403
5404
  exposure: ["cowork", "space_builder"],
5404
5405
  constraints: {
5406
+ inputBilling: "kling-v4",
5405
5407
  resolutions: ["720p", "1080p"],
5406
5408
  durations: { min: 3, max: 30 },
5407
5409
  references: { ...NO_REFERENCES, images: 10 },
@@ -5437,6 +5439,7 @@ var VIDEO_FAMILY_MODELS = [
5437
5439
  lifecycle: "active",
5438
5440
  exposure: ["cowork", "space_builder"],
5439
5441
  constraints: {
5442
+ inputBilling: "kling-v4",
5440
5443
  aspectRatios: ["adaptive", "16:9", "9:16", "1:1", "21:9"],
5441
5444
  resolutions: ["720p"],
5442
5445
  durations: { min: 3, max: 20 },
@@ -5475,6 +5478,7 @@ var VIDEO_FAMILY_MODELS = [
5475
5478
  lifecycle: "active",
5476
5479
  exposure: ["cowork", "space_builder"],
5477
5480
  constraints: {
5481
+ inputBilling: "kling-v4",
5478
5482
  resolutions: ["720p"],
5479
5483
  durations: { min: 3, max: 20 },
5480
5484
  references: {
@@ -5556,6 +5560,7 @@ var VIDEO_FAMILY_MODELS = [
5556
5560
  lifecycle: "active",
5557
5561
  exposure: ["cowork", "space_builder"],
5558
5562
  constraints: {
5563
+ inputBilling: "h3-max-reference",
5559
5564
  resolutions: ["480p", "768p"],
5560
5565
  durations: { min: 5, max: 13 },
5561
5566
  references: { images: 9, videos: 3, audios: 0 },
@@ -5793,6 +5798,7 @@ var VIDEO_FAMILY_MODELS = [
5793
5798
  lifecycle: "active",
5794
5799
  exposure: ["cowork", "space_builder"],
5795
5800
  constraints: {
5801
+ inputBilling: "grok-input-image",
5796
5802
  aspectRatios: [...GROK_15_RATIOS],
5797
5803
  resolutions: ["480p", "720p", "1080p"],
5798
5804
  durations: { min: 1, max: 15 },
@@ -6070,6 +6076,7 @@ var VIDEO_MODELS = [
6070
6076
  replacedBy: "gemini-omni-1.1-flash",
6071
6077
  exposure: [],
6072
6078
  constraints: {
6079
+ inputBilling: "omni",
6073
6080
  // 1.0 rejects `resolution`; it renders 720p. No defaults: the adapter
6074
6081
  // sends ratio and duration only when the caller set them, so a
6075
6082
  // reference clip keeps its own framing.
@@ -6101,6 +6108,7 @@ var VIDEO_MODELS = [
6101
6108
  lifecycle: "active",
6102
6109
  exposure: ["cowork", "space_builder"],
6103
6110
  constraints: {
6111
+ inputBilling: "omni",
6104
6112
  aspectRatios: [...OMNI_RATIOS],
6105
6113
  resolutions: ["360p", "720p", "1080p", "4k"],
6106
6114
  durations: [3, 4, 5, 6, 7, 8, 9, 10],
@@ -6145,6 +6153,7 @@ var VIDEO_MODELS = [
6145
6153
  lifecycle: "active",
6146
6154
  exposure: ["cowork", "space_builder"],
6147
6155
  constraints: {
6156
+ inputBilling: "omni",
6148
6157
  aspectRatios: [...OMNI_RATIOS],
6149
6158
  resolutions: ["360p", "720p", "1080p", "4k"],
6150
6159
  durations: { min: 3, max: 15 },
@@ -6321,6 +6330,7 @@ var VIDEO_MODELS = [
6321
6330
  lifecycle: "active",
6322
6331
  exposure: ["cowork", "space_builder"],
6323
6332
  constraints: {
6333
+ inputBilling: "grok-input-image",
6324
6334
  aspectRatios: [...GROK_RATIOS],
6325
6335
  resolutions: ["480p", "720p"],
6326
6336
  durations: { min: 1, max: 15 },
@@ -6522,6 +6532,7 @@ var VIDEO_MODELS = [
6522
6532
  lifecycle: "active",
6523
6533
  exposure: ["cowork", "space_builder"],
6524
6534
  constraints: {
6535
+ inputBilling: "h3-reference",
6525
6536
  aspectRatios: [...H3_REFERENCE_RATIOS],
6526
6537
  resolutions: ["480p", "768p", "2k", "4k"],
6527
6538
  durations: { min: 5, max: 15 },
@@ -6566,6 +6577,7 @@ var VIDEO_MODELS = [
6566
6577
  lifecycle: "active",
6567
6578
  exposure: ["cowork", "space_builder"],
6568
6579
  constraints: {
6580
+ inputBilling: "h3-max-reference",
6569
6581
  aspectRatios: [...H3_REFERENCE_RATIOS],
6570
6582
  resolutions: ["480p", "768p", "1080p"],
6571
6583
  durations: { min: 5, max: 15 },
@@ -6613,6 +6625,7 @@ var VIDEO_MODELS = [
6613
6625
  lifecycle: "active",
6614
6626
  exposure: ["cowork", "space_builder"],
6615
6627
  constraints: {
6628
+ inputBilling: "input-plus-output",
6616
6629
  aspectRatios: [...WAN_RATIOS],
6617
6630
  resolutions: ["480p", "720p", "1080p"],
6618
6631
  durations: { min: 2, max: 30 },
@@ -6654,6 +6667,7 @@ var VIDEO_MODELS = [
6654
6667
  lifecycle: "active",
6655
6668
  exposure: ["cowork", "space_builder"],
6656
6669
  constraints: {
6670
+ inputBilling: "input-plus-output",
6657
6671
  aspectRatios: [...WAN_RATIOS],
6658
6672
  resolutions: ["480p", "720p", "1080p"],
6659
6673
  durations: { min: 2, max: 30 },
@@ -7317,7 +7331,18 @@ var PromptConventionsSchema = z.strictObject({
7317
7331
  referenceSyntax: ReferenceSyntaxSchema,
7318
7332
  maxChars: MaxCharsSchema.optional()
7319
7333
  });
7334
+ var InputBillingSchema = z.enum([
7335
+ "seedance",
7336
+ "omni",
7337
+ "h3-max-reference",
7338
+ "h3-reference",
7339
+ "grok-input-image",
7340
+ "source-video-rate",
7341
+ "kling-v4",
7342
+ "input-plus-output"
7343
+ ]);
7320
7344
  var AUDIO_OUTPUTS = AudioOutputSchema.options;
7345
+ var INPUT_BILLINGS = InputBillingSchema.options;
7321
7346
  var REFERENCE_SYNTAXES = ReferenceSyntaxSchema.options;
7322
7347
  var ConstraintsReadView = z.looseObject({
7323
7348
  audio: AudioOutputSchema.optional().catch(void 0),
@@ -8236,6 +8261,7 @@ var ModelConstraintsSchema = z3.looseObject({
8236
8261
  // Loose on purpose: the read path keeps a row whose value is invalid (the accessors in
8237
8262
  // conventions.ts read it as "not set"); CatalogModelSchema below rejects it on write.
8238
8263
  audio: z3.unknown().optional(),
8264
+ inputBilling: z3.unknown().optional(),
8239
8265
  prompt: z3.unknown().optional()
8240
8266
  });
8241
8267
  var MediaRefSchema = z3.union([
@@ -8428,6 +8454,14 @@ var CatalogModelSchema = CatalogModelSchemaBase.superRefine(
8428
8454
  message: 'audio must be "always", "optional" or "never"'
8429
8455
  });
8430
8456
  }
8457
+ const inputBilling = row2.constraints.inputBilling;
8458
+ if (inputBilling !== void 0 && !InputBillingSchema.safeParse(inputBilling).success) {
8459
+ ctx.addIssue({
8460
+ code: "custom",
8461
+ path: ["constraints", "inputBilling"],
8462
+ message: `inputBilling must be one of ${INPUT_BILLINGS.join(", ")}`
8463
+ });
8464
+ }
8431
8465
  const refs = row2.constraints.references;
8432
8466
  for (const kind of ["images", "videos", "audios"]) {
8433
8467
  const least = refs?.min?.[kind];
@@ -10921,6 +10955,25 @@ function referenceImageConformPlan(model, probe) {
10921
10955
  } : { ...frame };
10922
10956
  return { ...frame, image, reasons };
10923
10957
  }
10958
+
10959
+ // src/catalog/input-billing.ts
10960
+ import { z as z7 } from "zod";
10961
+ var DATA_ONLY_INPUT_BILLING = /* @__PURE__ */ new Map([
10962
+ ["flux-3", "source-video-rate"]
10963
+ ]);
10964
+ var KIT_INPUT_BILLING = new Map(
10965
+ MODELS.flatMap(
10966
+ (row2) => row2.constraints.inputBilling ? [[row2.id, row2.constraints.inputBilling]] : []
10967
+ )
10968
+ );
10969
+ var ConstraintsReadView2 = z7.looseObject({
10970
+ inputBilling: InputBillingSchema.optional().catch(void 0)
10971
+ });
10972
+ function inputBillingOf(row2) {
10973
+ const view = ConstraintsReadView2.safeParse(row2.constraints);
10974
+ const own = view.success ? view.data.inputBilling : void 0;
10975
+ return own ?? KIT_INPUT_BILLING.get(row2.id) ?? (row2.adapter === "ark" ? "seedance" : void 0) ?? DATA_ONLY_INPUT_BILLING.get(row2.id) ?? null;
10976
+ }
10924
10977
  export {
10925
10978
  ADAPTER_IDS,
10926
10979
  AUDIO_OUTPUTS,
@@ -10930,6 +10983,7 @@ export {
10930
10983
  CatalogSchema,
10931
10984
  ExposureSchema,
10932
10985
  IMAGE_MODELS,
10986
+ INPUT_BILLINGS,
10933
10987
  MEDIA_METHODS,
10934
10988
  MEDIA_NODE_MODELS,
10935
10989
  MODEL3D_IMAGE_SLOTS,
@@ -10947,6 +11001,7 @@ export {
10947
11001
  VideoResolutionSchema,
10948
11002
  billedAudio,
10949
11003
  compareCatalogOrder,
11004
+ inputBillingOf,
10950
11005
  isListed,
10951
11006
  isListedOn,
10952
11007
  isModelKitError,