TikTok upload_url is valid for one hour: finish the Sume job first

TikTok says the Direct Post upload_url is valid for one hour after issuance. Wait for the Sume job to complete before you initialize so the upload fits.

5 min readSume
All posts

TikTok's Direct Post reference says the upload_url is valid for one hour after issuance, and the upload must finish in that range. Order the work so the clip already exists: wait for the Sume job to be completed, then call init, then upload straight away.

If you init first and render second, a slow or queued render can burn the window.

What is the safe order?

The sequence below keeps the one-hour window for the upload only.

Order of operations for a TikTok post (read 2026-10-05)
StepActionWhy
1Submit the render on Sume with an Idempotency-KeyThe job id exists at once; the video does not
2Wait for job.completed or poll status_urlA queued job is normal, not a failure
3Fetch the result from GET /v1/jobs/{id}/resultThe result is only available after completion
4Call init and receive upload_url and publish_idThe one-hour window starts here
5Upload the file before the hour endsTikTok requires it

How do I block init until the job is ready?

Poll the status endpoint and honor next_poll_after_seconds when it is present. The sample returns only when the job is terminal.

import os
import time
import requests


def wait_terminal(job_id: str) -> dict:
    headers = {"Authorization": f"Bearer {os.environ['SUME_API_KEY']}"}
    while True:
        r = requests.get(f"https://api.sume.com/v1/jobs/{job_id}/status", headers=headers, timeout=30)
        r.raise_for_status()
        body = r.json()
        if body.get("terminal"):
            return body
        time.sleep(body.get("next_poll_after_seconds") or 10)


if __name__ == "__main__":
    print(wait_terminal("job_123").get("sume_status"))

What if the upload still expires?

Initialize again and upload again with the same stored file; do not re-render. The post on TikTok upload errors covers the failure codes.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume