AI video API cost calculator: price a clip from pricing_skus

Build a video cost calculator from Sume's pricing_skus: per-second, per-resolution and per-token rates, a short Python function, and worked examples.

5 min readSume
All posts

To calculate what a video will cost, read pricing_skus from GET /v1/videos/models, multiply the billed rate by the clip's seconds (or by its video tokens for Seedance), and round up to the cent. The response already holds each model's billed rate, so the calculator needs no price table of its own.

The field is listed in Video generation; the rate keys and the token formula below come from Sume's catalog and pricing code, read 2026-09-29.

What do the pricing_skus keys mean?

Each model returns only the keys that apply to it. Every value is a dollar rate written to four decimals, already at Sume's billed price (provider list × 1.25).

From Sume's catalog code and Video generation, read 2026-09-29.
KeyUnitWhich models
per-1000-video-tokensDollars per 1,000 video tokensThe Seedance models
per-video-second-<resolution>Dollars per output second at that resolution, for example per-video-second-720pModels priced by resolution, such as wan-3.0
per-video-secondDollars per output second, one rateModels with a single rate, such as kling-3 without sound
per-video-second-audioDollars per output second with sound onOnly where sound is priced separately, such as kling-3

How do I turn the rates into a clip price?

For a per-second key, multiply the rate by the clip's seconds. For Seedance, first count video tokens: width × height × seconds × 24 frames per second ÷ 1,024, then multiply by the per-1,000-token rate ÷ 1,000. This function does both and rounds up to the cent, as Sume's reserve does.

import json
import math
import os
import urllib.request


def get_models():
    req = urllib.request.Request(
        "https://api.sume.com/v1/videos/models",
        headers={"Authorization": f"Bearer {os.environ['SUME_API_KEY']}"},
    )
    with urllib.request.urlopen(req) as res:
        return {m["id"]: m for m in json.load(res)["data"]}


def clip_price(model, seconds, resolution=None, sound=True, w=1280, h=720):
    skus = model["pricing_skus"]
    if "per-1000-video-tokens" in skus:  # Seedance: priced by video tokens
        tokens = w * h * seconds * 24 / 1024
        usd = tokens / 1000 * float(skus["per-1000-video-tokens"])
    elif f"per-video-second-{resolution}" in skus:  # rate set by resolution
        usd = seconds * float(skus[f"per-video-second-{resolution}"])
    else:  # one rate, or a sound-on rate
        key = "per-video-second-audio" if sound else "per-video-second"
        usd = seconds * float(skus.get(key, skus["per-video-second"]))
    micros = round(usd * 1_000_000)
    return -(-micros // 10_000) / 100  # round up to the cent

What do the worked examples come to?

The rows below multiply the quantity by the billed rate and show the amount Sume reserves, computed from Sume's pricing code.

Reserved amounts computed from Sume's pricing code, before the agent fee, read 2026-09-29.
ClipQuantityBilled rateReserve
seedance-2, 10 s at 720p, 16:9216,000 video tokens0.0175 per 1,000 tokens$3.78
wan-3.0, 10 s at 720p10 seconds0.1250 per second$1.25
kling-3, 5 s with sound5 seconds0.2100 per second$1.05

Why can my number be a cent off?

The catalog prints each rate to four decimals, and the reserve is computed from the unrounded rate, so a token-priced clip can land a cent apart from the function above. Treat the calculator as a budget, and treat the reserve on the job, or the usage ledger, as the amount charged.

Two cases the function does not cover, in current code. A Seedance request with a reference video adds an assumed input duration to the token count and applies a separate price multiplier. And seedance-2.5 at 1080p uses a different token rate from the single rate pricing_skus prints, so the function undercounts that clip.

The agent fee is separate: Sume adds a 5.5% agent fee by default, which this function leaves out.

Which inputs does the calculator need to check?

The same models response lists supported_resolutions, supported_aspect_ratios and supported_durations, so validate the inputs there before pricing. Limits are not uniform across models, and Seedance frame size follows the resolution and aspect ratio you pick. For a table of finished prices, see How much does an AI video cost?.

Sources

Related posts

More in Pricing

All Pricing posts

Written by Sume