API Reference
CDN Server API
Serve and store TikTok assets through your own CDN endpoint. The CDN Server runs on a per-account host, separate from the main API.
Serve an asset
Serve a TikTok asset from your CDN endpoint. Resolution order: edge cache, permanent storage, then (for signed requests only) a live fetch from TikTok.
The first request for any asset must be a signed request: prefix your CDN endpoint onto the full original TikTok URL, keeping the TikTok hostname as the first path segment and every original query parameter (the signature set) intact. The edge fetches the asset from TikTok once, stores it permanently, and serves it from cache thereafter.
After that first request, use the short form forever: drop the TikTok hostname and all query parameters. Stored assets never expire.
Path Parameters
Query Parameters
Header Parameters
Sign in and enable the Image CDN to send requests against your own endpoint.
Responses
No response body.
Store an asset
Identical resolution to GET, but returns a JSON storage summary instead of the media, making it ideal for priming assets ahead of time (e.g. persisting every avatar in a chat feed without downloading the bytes).
The first request for any asset must be a signed request: prefix your CDN endpoint onto the full original TikTok URL, keeping the TikTok hostname as the first path segment and every original query parameter (the signature set) intact. The edge fetches the asset from TikTok once, stores it permanently, and serves it from cache thereafter.
After that first request, use the short form forever: drop the TikTok hostname and all query parameters. Stored assets never expire.
Storing is write-once: if the asset already exists the request succeeds without overwriting, and the summary says so. The path field in the response is the shortest stable form you can serve the asset from afterwards.
Path Parameters
Query Parameters
Header Parameters
Sign in and enable the Image CDN to send requests against your own endpoint.
Responses
Response Attributes