Check the balance first: 80 nine-second Fabric clips need $135.00

Read GET /v1/balance, multiply clips by seconds by the per-second rate in USD micros, and stop before submitting. 80 x 9 x $0.1875 is $135.00.

5 min readSume
All posts

Read GET /v1/balance, multiply your jobs by seconds by the per-second rate in USD micros, and stop if the balance is smaller. For 80 Fabric clips of 9 audio seconds at 720p the need is 80 x 9 x 187,500 = 135,000,000 micros, which is $135.00.

What the preflight reads

The Usage page says the balance is in USD and that GET /v1/balance is a read-only call. The response in the SDK types carries available_amount_usd_micros inside data.balance, plus a state of funded or empty. Working in integer micros avoids float drift.

The script

It refuses an empty key, computes the need, and exits with the shortfall. It makes no paid call.

import json
import os
import urllib.request

KEY = os.environ.get("SUME_API_KEY", "")
if not KEY:
    raise SystemExit("SUME_API_KEY is empty")

CLIPS = 80
AUDIO_SECONDS = 9
MICROS_PER_SECOND = 187_500  # Fabric 720p, $0.1875

req = urllib.request.Request(
    "https://api.sume.com/v1/balance",
    headers={"Authorization": f"Bearer {KEY}"},
)
with urllib.request.urlopen(req, timeout=30) as resp:
    body = json.load(resp)

available = body["data"]["balance"]["available_amount_usd_micros"]
needed = CLIPS * AUDIO_SECONDS * MICROS_PER_SECOND
print(f"needed ${needed / 1_000_000:.2f}, available ${available / 1_000_000:.2f}")
if available < needed:
    short = (needed - available) / 1_000_000
    raise SystemExit(f"top up at least ${short:.2f} before submitting")

Why the full amount is conservative

The Generation admission page explains that Sume reserves the estimate at submit for accepted jobs only. A Pro workspace accepts 24 jobs at a time, so it holds at most 24 x 9 x $0.1875 = $40.50 while the rest wait. Comparing the whole $135.00 is safe but stricter than the first wave needs.

If the balance is short, a submit returns 402 insufficient_credits before provider work starts, so the preflight is a convenience. It saves a half-submitted batch where the first 60 clips succeed and the last 20 stop. Fund at the dashboard, because the public API has no top-up endpoint.

Fabric 720p needs for 9 second clips, rates as of 2026-10-08
ClipsMicros neededUSD
2033,750,000$33.75
4067,500,000$67.50
80135,000,000$135.00
160270,000,000$270.00

Extending the script

Change CLIPS, AUDIO_SECONDS and MICROS_PER_SECOND for another route. For Fabric at 480p use 100,000 micros. For a mixed batch, sum several products before comparing: 80 clips of 9 seconds at 720p ($135.00) plus 80 caption jobs at $0.20 ($16.00) needs $151.00.

Keep the key in an environment variable and never print it. The script exits when the key is empty, which avoids sending a request with an empty bearer token.

Sources

Related posts

More in Pricing

All Pricing posts

Written by Sume