diff --git a/README.md b/README.md index 908077e..68698b6 100644 --- a/README.md +++ b/README.md @@ -179,6 +179,7 @@ Feel free to adapt, simplify, or remix them to fit your own pipelines. - 2026-02-11: Standardized Kling 3 preflight/task chaining on `kling_data`. - 2026-02-11: Updated Kling 3 payload compatibility (aspect ratio + multi-shot sound handling). - 2026-02-11: Cleaned up README structure and added docs index coverage for all public nodes. +- 2026-02-11: Increased default async video polling timeout from 1000s to 2000s. ## About Kie.ai Kie.ai is a unified API and model marketplace for image, video, and audio generation. This project is community-maintained and not affiliated with Kie.ai. Learn more at [https://kie.ai](https://kie.ai?ref=e7565cf24a7fad4586341a87eaf21e42). @@ -187,7 +188,7 @@ Kie.ai is a unified API and model marketplace for image, video, and audio genera Kie.ai uses a credit-based model for requests. There is no subscription requirement, and pay-as-you-go usage is supported. ## Debugging and job visibility -You can review request history and results at [https://kie.ai/logs](https://kie.ai/logs). Some models can take longer to finish; the default timeout has been increased to reduce false failures. +You can review request history and results at [https://kie.ai/logs](https://kie.ai/logs). Some models can take longer to finish; the default async timeout is set to 2000s to reduce false failures. ## Sponsorship / Development diff --git a/kie_api/jobs.py b/kie_api/jobs.py index b147d9c..0971221 100644 --- a/kie_api/jobs.py +++ b/kie_api/jobs.py @@ -20,7 +20,7 @@ from .log import _log CREATE_TASK_URL = "https://api.kie.ai/api/v1/jobs/createTask" RECORD_INFO_URL = "https://api.kie.ai/api/v1/jobs/recordInfo" -DEFAULT_TIMEOUT_S = 1000 +DEFAULT_TIMEOUT_S = 2000 def _create_task(api_key: str, payload: dict[str, Any]) -> tuple[str, str]: diff --git a/kie_api/kling26_i2v.py b/kie_api/kling26_i2v.py index 546d21d..ac515b7 100644 --- a/kie_api/kling26_i2v.py +++ b/kie_api/kling26_i2v.py @@ -31,7 +31,7 @@ def run_kling26_i2v_video( duration: str = "5", sound: bool = False, poll_interval_s: float = 10.0, - timeout_s: int = 1000, + timeout_s: int = 2000, log: bool = True, ) -> dict: _validate_prompt(prompt, max_length=PROMPT_MAX_LENGTH) @@ -90,7 +90,7 @@ def run_kling26_i2v( duration: str = "5", sound: bool = False, poll_interval_s: float = 10.0, - timeout_s: int = 1000, + timeout_s: int = 2000, log: bool = True, ) -> dict: """Backward-compatible alias for existing imports.""" diff --git a/kie_api/kling26_t2v.py b/kie_api/kling26_t2v.py index ef9c50e..217549c 100644 --- a/kie_api/kling26_t2v.py +++ b/kie_api/kling26_t2v.py @@ -79,7 +79,7 @@ def run_kling26_t2v( aspect_ratio: str = "9:16", duration: str = "5", poll_interval_s: float = 10.0, - timeout_s: int = 1000, + timeout_s: int = 2000, log: bool = True, ) -> dict: """Backward-compatible alias for existing imports.""" diff --git a/kie_api/kling26motion_i2v.py b/kie_api/kling26motion_i2v.py index 5ea248a..a411eee 100644 --- a/kie_api/kling26motion_i2v.py +++ b/kie_api/kling26motion_i2v.py @@ -41,7 +41,7 @@ def run_kling26motion_i2v_video( character_orientation: str = "video", mode: str = "720p", poll_interval_s: float = 10.0, - timeout_s: int = 1000, + timeout_s: int = 2000, log: bool = True, ) -> Any: # Validate prompt length and required inputs. @@ -120,7 +120,7 @@ def run_kling26motion_i2v( character_orientation: str = "video", mode: str = "720p", poll_interval_s: float = 10.0, - timeout_s: int = 1000, + timeout_s: int = 2000, log: bool = True, ) -> Any: """Backward-compatible alias for existing imports.""" diff --git a/kie_api/seedance15pro_i2v.py b/kie_api/seedance15pro_i2v.py index fc56753..dac9aaa 100644 --- a/kie_api/seedance15pro_i2v.py +++ b/kie_api/seedance15pro_i2v.py @@ -239,7 +239,7 @@ Outputs: generate_audio: bool = False, log: bool = True, poll_interval_s: float = 10.0, - timeout_s: int = 1000, + timeout_s: int = 2000, ): video_output = run_seedance15pro_i2v_video( prompt=prompt, diff --git a/kie_api/seedancev1pro_fast_i2v.py b/kie_api/seedancev1pro_fast_i2v.py index 13806c6..cbb3f5a 100644 --- a/kie_api/seedancev1pro_fast_i2v.py +++ b/kie_api/seedancev1pro_fast_i2v.py @@ -152,7 +152,7 @@ Outputs: duration: str = "5", log: bool = True, poll_interval_s: float = 10.0, - timeout_s: int = 1000, + timeout_s: int = 2000, ): video_output = run_seedancev1pro_fast_i2v_video( prompt=prompt, diff --git a/nodes.py b/nodes.py index bedfdc5..89b3b6f 100644 --- a/nodes.py +++ b/nodes.py @@ -385,7 +385,7 @@ Outputs: cfg_scale: float = 0.5, log: bool = True, poll_interval_s: float = 10.0, - timeout_s: int = 1000, + timeout_s: int = 2000, retry_on_fail: bool = True, max_retries: int = 2, retry_backoff_s: float = 3.0, @@ -459,7 +459,7 @@ Outputs: sound: bool = False, log: bool = True, poll_interval_s: float = 10.0, - timeout_s: int = 1000, + timeout_s: int = 2000, retry_on_fail: bool = True, max_retries: int = 2, retry_backoff_s: float = 3.0, @@ -532,7 +532,7 @@ Outputs: duration: str = "5", log: bool = True, poll_interval_s: float = 10.0, - timeout_s: int = 1000, + timeout_s: int = 2000, retry_on_fail: bool = True, max_retries: int = 2, retry_backoff_s: float = 3.0, @@ -611,7 +611,7 @@ Outputs: mode: str = "720p", log: bool = True, poll_interval_s: float = 10.0, - timeout_s: int = 1000, + timeout_s: int = 2000, retry_on_fail: bool = True, max_retries: int = 2, retry_backoff_s: float = 3.0, @@ -844,7 +844,7 @@ Outputs: kling_data: dict | None = None, log: bool = True, poll_interval_s: float = 10.0, - timeout_s: int = 1000, + timeout_s: int = 2000, ): chained_payload = kling_data if chained_payload is not None: