This commit is contained in:
Brandon Thomas committed 2026-05-16 07:40:44 -04:00
1 parent 5ad8287460
commit 6e0754c5b2
2 files changed
+19 -15

No files matched your search

@@ -327,6 +327,10 @@ mod tests {
assert_eq!(result.model, MODEL_ID);
}
// Balance was $49.75 before running this.
// [480p] Request ID: 4a0efe0d-990f-480d-9792-5bb71dd26b85
// Balance was $49.51 after running this.
// 24 cents = 2.4 cents per second
#[tokio::test]
#[ignore] // requires real API key, incurs costs
async fn test_image_to_video_480p() {
@@ -342,6 +346,10 @@ mod tests {
assert_eq!(result.model, MODEL_ID);
}
// Balance was $49.51 before running this.
// [720p] Request ID: 40f63632-dd9d-4725-ab73-5bb764e773be
// Balance was $48.99 after running this.
// 52 cents = 5.2 cents per second
#[tokio::test]
#[ignore] // requires real API key, incurs costs
async fn test_image_to_video_720p() {
@@ -357,6 +365,9 @@ mod tests {
assert_eq!(result.model, MODEL_ID);
}
// Balance was $48.99 before running this.
// Balance is $47.83 after running this
// 116 cents = 11.6 cents per second
#[tokio::test]
#[ignore] // requires real API key, incurs costs
async fn test_image_to_video_1080p() {
@@ -252,6 +252,10 @@ mod tests {
assert_eq!(result.model, MODEL_ID);
}
// $47.83 before run
// [fast 480p] Request ID: 1b654a85-d99e-4380-b615-c7a8985ed15b
// $47.73 after run
// $0.10 = $0.01 per second
#[tokio::test]
#[ignore] // requires real API key, incurs costs
async fn test_image_to_video_480p() {
@@ -267,6 +271,10 @@ mod tests {
assert_eq!(result.model, MODEL_ID);
}
// $47.73 before run
// [fast 720p] Request ID: 2fbbe377-7c92-482e-b1eb-92fd296b0a68
// $47.52 after run
// $0.31 = $0.031 per second
#[tokio::test]
#[ignore] // requires real API key, incurs costs
async fn test_image_to_video_720p() {
@@ -281,21 +289,6 @@ mod tests {
assert!(!result.request_id.is_empty());
assert_eq!(result.model, MODEL_ID);
}
#[tokio::test]
#[ignore] // requires real API key, incurs costs
async fn test_image_to_video_1080p() {
let api_key = crate::test_utils::load_api_key();
let mut request = minimal_request();
request.prompt = "the dog in this photo starts running and splashing in the lake water".to_string();
request.duration = Some(10);
request.resolution = Some(Seedance20FastResolution::TenEightyP);
request.first_frame = Some(JUNO_AT_LAKE_IMAGE_URL.to_string());
let result = request.send_request(&api_key).await.unwrap();
println!("[fast 1080p] Request ID: {}", result.request_id);
assert!(!result.request_id.is_empty());
assert_eq!(result.model, MODEL_ID);
}
}
// NB: Pricing tests are in cost.rs