Build the pricing_skus key from the resolution string: 4K is uppercase

Omni Flash 1.1 rates sit at per-video-second-360p, -720p, -1080p and -4K. Build the key from a template, mind the 4K case, total 10 s from $0.375 to $3.75.

3 min readSume
All posts

The per-second pricing key is per-video-second- plus the resolution string exactly as the API spells it, so Gemini Omni Flash 1.1 has per-video-second-360p, -720p, -1080p and -4K. Build the key with a template and keep 4K uppercase, or the lookup returns nothing and the price looks like zero.

The Omni ladder

Gemini Omni Flash 1.1 runs 3 to 10 s at 360p, 720p, 1080p and 4K, in 16:9 or 9:16, with audio always on. The same template works for Wan 3.0 (480p, 720p, 1080p) and MiniMax H3 (480p, 768p).

The totals below are for a 10 s clip, which is the model's maximum.

Gemini Omni Flash 1.1, 10 s, billable USD (read 2026-10-09)
ResolutionSKU keyRate per second10 s total
360pper-video-second-360p$0.0375$0.375
720pper-video-second-720p$0.125$1.25
1080pper-video-second-1080p$0.1875$1.875
4Kper-video-second-4K$0.375$3.75

The lookup

Fail loudly on a missing key. A silent undefined multiplied by seconds gives a non-number that slips past most budget checks.

type Model = { id: string; pricing_skus: Record<string, string> };

export function clipUsd(m: Model, res: string, seconds: number): number {
  const rate = m.pricing_skus[`per-video-second-${res}`];
  if (rate === undefined) {
    throw new Error(`${m.id}: no sku for ${res}`);
  }
  return Math.round(Number(rate) * seconds * 1e4) / 1e4;
}

// clipUsd(omni, "4K", 10) -> 3.75

Gotchas

The 4K spelling matters in the request too: resolution is an enum, and the lowercase form is not on it. Some models have a flat per-video-second key with no resolution suffix, so try that as a fallback and decide whether to throw.

Round the final money value, not the rate. The rates are four-decimal strings and a float multiplication can leave noise.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume