Smoke-test a video API key with curl: a $0.11 Omni clip
A 19-line curl and jq script: submit a 3-second 360p Gemini Omni Flash 1.1 job, poll it, save the MP4. At $0.0375 a second the test costs $0.1125.

When you get a new video API key, the useful first test is not a beautiful clip. It is the cheapest real job that exercises authentication, the balance check, the polling loop and the download. On Sume that job is Gemini Omni Flash 1.1 at its floor: 3 seconds at 360p. Omni is priced per second by resolution, and 360p is $0.0375 a second, so the whole run costs 3 x $0.0375 = $0.1125.
The script is a 19-line bash file that needs only curl and jq. It was run against a local stand-in server returning the documented 202, poll and 302 shapes.
The script
Export SUME_API_KEY and run bash smoke.sh. Omit POLL_SECONDS to keep the 30-second poll interval; the test server needs 0.
#!/usr/bin/env bash
set -euo pipefail
BASE="${SUME_API_BASE:-https://api.sume.com}"
AUTH="Authorization: Bearer ${SUME_API_KEY:?set SUME_API_KEY}"
POLL="$(curl -sS -X POST "$BASE/v1/videos" -H "$AUTH" -H 'Content-Type: application/json' \
-H 'Idempotency-Key: omni-test-0001' \
-d '{"model":"gemini-omni-flash-1.1","prompt":"A lighthouse in a storm","duration":3,"resolution":"360p","aspect_ratio":"16:9"}' \
| jq -er .polling_url)"
while true; do
sleep "${POLL_SECONDS:-30}"
JOB="$(curl -sS "$POLL" -H "$AUTH")"
STATUS="$(jq -r .status <<<"$JOB")"
case "$STATUS" in
failed|cancelled) echo "$STATUS: $(jq -c .error <<<"$JOB")" >&2; exit 1 ;;
completed)
curl -sSL "$(jq -r '.unsigned_urls[0]' <<<"$JOB")" -H "$AUTH" -o out.mp4
echo "cost $(jq .usage.cost <<<"$JOB")"; break ;;
esac
doneReading the result
Each exit path says something about your setup, so treat the output as a checklist rather than a pass or fail.
- A 401 from the first
curlmeans the key is missing or wrong.jq -erfails on the missingpolling_urlandset -estops the script. - A 402
insufficient_creditsmeans the key works but the workspace USD balance is below the reserve. Top up and run again. failedorcancelledprints theerrorobject and exits 1, so a CI step goes red.completeddownloadsout.mp4withcurl -L, which follows the redirect from the content URL, and printsusage.costas the billable amount.
Why Omni for the test
Omni accepts 3 to 10 seconds at 360p, 720p, 1080p or 4K, in 16:9 or 9:16, and it always has native synced audio, so you should not send generate_audio. The same model is what sume/auto resolves to by default. Because the price table is linear in seconds, you can scale the test up and read the effect on usage.cost.
| Resolution | Per second | 3 s clip |
|---|---|---|
| 360p | $0.0375 | $0.1125 |
| 720p | $0.125 | $0.375 |
| 1080p | $0.1875 | $0.5625 |
| 4K | $0.375 | $1.125 |
Is there a free key?
Jobs bill against the workspace USD balance, so a key can authenticate and still be refused at submit when the balance is empty. Google's Gemini API pricing page, which I read on 2026-10-05, says plainly that there is no free tier for Veo 3.1 (https://ai.google.dev/gemini-api/docs/pricing). An 11-cent test is how you find out about your own setup without a surprise.
Sources
Related posts
More in Developers
- curl and jq video step for CI with exit codes 0, 2 and 3
A bash script that submits to Sume POST /v1/videos, polls with jq, and exits 2 on a rejected submit and 3 on a failed render so a CI job can tell them apart.
- curl a 30-second Sume clip: --speed-limit beats a blunt --max-time
A fixed --max-time kills a slow but healthy 30 s video download. Use --speed-limit with --speed-time to abort only stalled transfers, plus --retry.
- Cut a 3-minute Short from a longer render with video trim
YouTube Shorts and Instagram's recommended Reel length both stop at three minutes. Cut 180 seconds from a longer clip with video trim, using start and duration.
- Debug a Sume webhook signature mismatch offline: a diagnosis script
Saved a failing Sume webhook? This Python script tells you if it was a stale timestamp, an empty secret, a mutated body or the wrong secret. Self-test included.
Written by Sume