AIToday
Image GenerationVideo GenerationAI Coding AssistantsZenn AI/MLPublished: Dec 5, 2026, 10:01 JST

Kling 4.0, Seedance 2.5, Midjourney v8.2: Python async guide

Send on LINE
Kling 4.0, Seedance 2.5, Midjourney v8.2: Python async guide

3 Key Points

  1. What happened

    The tutorial explains that Kling 4.0 bills per second ($0.147059/sec at 720p), Seedance 2.5 bills per video token via floor(pixels / 1024 * (24 * s + 1)), and Midjourney v8.2 always bills 4 images per task.

  2. Why it matters

    Because each model family uses a different billing unit and strict JSON schema, developers who treat media generation like text LLM calls can misbudget or get rejected outright.

Ask AI

Ask the AI about this article. Questions and answers are published on this page

Context & Analysis

Media generation is structurally different from text-based LLM calls in three ways: generation takes minutes rather than seconds, a task can fail inside an HTTP 200 response, and output URLs expire after 24 hours. These traits push developers toward asynchronous job submission with exponential-backoff polling and immediate saving of signed URLs, rather than the synchronous request-response pattern common in text APIs.

The billing comparison reveals a counterintuitive detail: Seedance 2.5's 4K tier has a lower per-token price ($4.70 per 1M tokens) than its 1080p tier ($11.70 per 1M tokens). This is because 4K generates roughly 4× the tokens (980,100 vs 245,025 for 5 seconds), so the actual per-second cost is higher, not lower. This kind of trap is why the author recommends a pre-flight cost estimation endpoint before submitting jobs.

The tutorial also warns that each model family enforces strict JSON schemas: Seedance rejects top-level prompt fields and requires a content array, Midjourney rejects size and quality fields in favor of prompt flags, and unknown fields trigger HTTP 400. For teams building a shared pipeline, these schema differences mean the client code must normalize responses and handle per-model validation rather than assuming a uniform interface.

FAQ
How does Seedance 2.5 calculate video token costs?
The formula is floor(pixels / 1024 × (24 × s + 1)), where pixels is the base pixel count for the resolution tier and s is duration in seconds. For example, 4K at 5 seconds yields 980,100 tokens.
Why does 4K look cheaper than 1080p on the Seedance 2.5 price list?
The per-token price for 4K is $4.70 per 1M tokens versus $11.70 for 1080p, but 4K generates about 4× the tokens, so the actual 5-second cost is $4.606470 for 4K versus $2.866793 for 1080p.
What happens if I send Midjourney v8.2 a 'size' field?
Sending size, quality, or response_format fields causes an HTTP 400 error (unknown field "size"). Instead, aspect ratio and native 2K are set via prompt flags like --ar 16:9 and --hd.
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

By signing up you agree to the Terms of Service and Privacy Policy.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Related Articles

Next articleTSMC breaks ground in Arizona; Trump touts AI chip output