diff --git a/crates/api_clients/kinovi_web_client/src/requests/generate_video/generate_video.rs b/crates/api_clients/kinovi_web_client/src/requests/generate_video/generate_video.rs index a77a74ea07..00967d29f1 100644 --- a/crates/api_clients/kinovi_web_client/src/requests/generate_video/generate_video.rs +++ b/crates/api_clients/kinovi_web_client/src/requests/generate_video/generate_video.rs @@ -33,7 +33,8 @@ pub struct KinoviGenerateVideoRequest { pub aspect_ratio: KinoviAspectRatio, /// The resolution - /// Output resolution quality (480p, 720p, 1080p). None defaults to 720p. + /// Output resolution quality (480p, 720p, 1080p). None resolves to an + /// explicit 720p on the wire, matching how estimate_credits() prices None. /// (Kinovi terms this "outputResolution" in the API, which is confusingly named) pub output_resolution: Option, @@ -197,25 +198,26 @@ impl KinoviAspectRatio { } } -/// Output resolution quality. When omitted, defaults to 720p. +/// Output resolution quality. Always sent explicitly on the wire — we never +/// omit the field and rely on the Kinovi server-side default, because the +/// billed price assumes a specific resolution and the two must not diverge. #[derive(Debug, Clone, Copy)] pub enum KinoviOutputResolution { /// 480p FourEightyP, - /// 720p (default — omitting the field gives this) + /// 720p (what unset requests resolve to) SevenTwentyP, /// 1080p TenEightyP, } impl KinoviOutputResolution { - /// Returns the API string to send, or None for 720p (the default, which is - /// expressed by omitting the field entirely). - pub fn as_api_str(&self) -> Option<&'static str> { + /// The API string to send. + pub fn as_api_str(&self) -> &'static str { match self { - Self::FourEightyP => Some("480p"), - Self::SevenTwentyP => None, // Default — omit from request - Self::TenEightyP => Some("1080p"), + Self::FourEightyP => "480p", + Self::SevenTwentyP => "720p", + Self::TenEightyP => "1080p", } } } @@ -343,7 +345,9 @@ pub async fn generate_video(args: GenerateVideoArgs<'_>) -> Result AnyhowResult<()> { setup_test_logging(LevelFilter::Trace); let session = test_session()?; - // 720p = None (default, outputResolution field omitted) + // 720p = None (unset; now sent explicitly as "720p" on the wire) let prompt = "A corgi running through a field of stars"; let args = make_args_with_prompt(prompt, &session, KinoviModelType::Seedance2Pro, None); let result = generate_video(args).await?;