Firebase allows 1-hour HTTP functions; don't hold a Sume job open
Firebase HTTP functions can run up to an hour and Cloud Tasks covers longer work. Even so, submit Sume jobs async and take the result by webhook or status poll.

Do not keep a Firebase function open waiting for a Sume video, even though the limit looks generous. Submit the job, return its id, and receive the outcome later through a webhook or a status poll. The one-hour ceiling is a limit, not a design target, and a held request fails the moment any hop in front of it gives up.
The Firebase limit comes from its HTTP functions page; the Sume modes come from the jobs docs.
The limits on each side
| Item | Value | Source |
|---|---|---|
| HTTP function timeout | Up to 1 hour | Firebase |
| Longer work | Use Cloud Tasks | Firebase |
| Sume sync wait | At most 30 seconds (wait_timeout_seconds) | Sume docs |
| Sume webhook delivery | 10 second timeout, up to 10 attempts, 30 s apart | Sume docs |
| Sume job statuses | queued, processing, completed, failed, canceled | Sume docs |
Why holding a request is the wrong shape
A Sume job is durable and keeps running and billing even if your caller disappears. Sume's jobs docs say a client-side timeout does not cancel the job, so you only stopped the wait. Its own MCP wait is capped at 55 seconds for the same reason: an open request dies at some edge before a long render finishes. A function that waits turns a transport hiccup into a lost job id.
A shape that fits Firebase
- Function 1 (HTTP): validate input, submit to Sume with mode webhook and your function 2 URL, store the job id, return 202 immediately.
- Function 2 (HTTP): the webhook receiver. Verify the HMAC signature, store the event, return 2xx within Sume's 10 second budget, dedupe on job_id.
- Backstop: a scheduled function that polls GET /v1/jobs/{id}/status for jobs that are still not terminal, honouring next_poll_after_seconds.
- For work you must delay or retry on your own schedule, Firebase points to Cloud Tasks; use it to trigger the poll, not to hold a connection.
Idempotency
Retry the submit itself with the same Idempotency-Key so a second attempt returns the original job instead of billing a second one. Sume also says to use job_id as the idempotency key on the receiving side. See the Sume webhooks docs for the signature scheme and the redeliver endpoint.
Sources
Related posts
More in Developers
- 'first_frame_url must match image_url': two names, one value
image_url and first_frame_url are aliases on Video Router. Send both only if the strings are identical, same for end_image_url and last_frame_url, or get a 400.
- Fix a first frame with Ideogram 4.5, then send it to Omni image_url
Correct text or a prop in a still with Ideogram 4.5 on Sume, then use the edited image as the Gemini Omni 1.1 Flash first frame. Two jobs, one shot.
- Flare vs Sunburst A/B test: 100 prompts cost $3.30 at medium
A 100-prompt A/B test of GPT Image 2.5 Flare and Sunburst costs $3.30 at medium on Sume, $13.18 at high. Budget by tier, plus a cost-logging script.
- FLUX 3 Image 503: read the JSON status before you retry
BFL says a FLUX 3 Image 503 may be retryable once you check the JSON status; 422, 400 and 402 are not. Sume sync failures return a 502 with a retryable flag.
Written by Sume