video: Kling text2video dialect - #36
Merged
Merged
Conversation
provider `kling` speaks /v1/videos/text2video: model_name instead of
model, string durations, a {code, data} envelope whose non-zero code is
a business error on HTTP 200 (rejected as 502, like MiniMax's base_resp),
the job keyed by data.task_id — never the trace request_id — and polled
at /v1/videos/text2video/{id}; succeed bills the clip's seconds from
task_result. The old invented shape stays as the generic fallback (the
default config demonstrates it as vidu-video). Auth verified live on
api-singapore.klingai.com; generation blocked on account balance.
… alias The live-matrix bedrock account line came back (a section merge had eaten it); the unconfigured `klingai` alias goes; the harness duration helper falls back to the delivered-video count like the gateway does; the image-to-video 400 guard gets its assertion.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
klingspeaks Kling's real wire:POST /v1/videos/text2video(model_name, stringduration,aspect_ratio,resolution: 1080pridingmode: pro), pollGET /v1/videos/text2video/{id}; the{code, data}envelope's non-zerocodeon an HTTP 200 is rejected as 502 (same treatment as MiniMax'sbase_resp); the job is keyed bydata.task_id— Kling's top-levelrequest_idis a trace id, the same trap DashScope had.succeedbills the clip's reported seconds fromtask_result.videos[0].duration.vidu-videoso both paths keep e2e coverage.imageparam on a kling model answers 400 loudly.Verification
cargo fmt --check/clippy -D warnings/cargo test --workspace: 541 passed / 0 failed. New: Kling submit-shape assertions (model_name, string duration, nomodelkey, text2video URL), Kling tuple in the dialect e2e (task-id keying, units billed once, 409 before done).task_status: failed, 0 deduction) billed nothing; the exhausted package surfaces as a clean 429 (Account balance not enough). During the concurrent waves the same gateway served 107k rps/healthand 114k rps/v1/modelsat p99 ≤ 1 ms — the async video brokering adds nothing to the hot path.