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
The TikTok CDN hostname from the original URL, kept as the FIRST path segment (e.g. p16-webcast.tiktokcdn.com). Must match *.tiktokcdn.com, *.tiktokcdn-us.com or *.tiktokcdn-eu.com. Required on the first request for an asset (the signed form); omit it once the asset is stored.
The asset path exactly as it appears in the original TikTok URL, e.g. img/tos-alisg-avt-0068/134a76d107cfeaa2b97d3f69ce498006~tplv-obj.jpeg. After the asset is stored you may drop the ~ variant suffix to serve the largest stored variant of the asset.
Query Parameters
Your Euler Stream API key. Alternative to the X-Api-Key header. Consumed at the edge: it is never forwarded to TikTok, cached, or counted as a signature parameter. Optional for reads when the CDN has public access enabled; storing new assets always requires upload permission.
ALL remaining query parameters from the original TikTok URL (its signature set), passed through verbatim. Required on the first request so the edge can fetch the asset from TikTok; ignored once the asset is stored.
Header Parameters
Your Euler Stream API key. Alternative to the apiKey query parameter.
Sign in and enable the Image CDN to send requests against your own endpoint.
Responses
No response body.
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
The TikTok CDN hostname from the original URL, kept as the FIRST path segment (e.g. p16-webcast.tiktokcdn.com). Must match *.tiktokcdn.com, *.tiktokcdn-us.com or *.tiktokcdn-eu.com. Required on the first request for an asset (the signed form); omit it once the asset is stored.
The asset path exactly as it appears in the original TikTok URL, e.g. img/tos-alisg-avt-0068/134a76d107cfeaa2b97d3f69ce498006~tplv-obj.jpeg. After the asset is stored you may drop the ~ variant suffix to serve the largest stored variant of the asset.
Query Parameters
Your Euler Stream API key. Alternative to the X-Api-Key header. Consumed at the edge: it is never forwarded to TikTok, cached, or counted as a signature parameter. Optional for reads when the CDN has public access enabled; storing new assets always requires upload permission.
ALL remaining query parameters from the original TikTok URL (its signature set), passed through verbatim. Required on the first request so the edge can fetch the asset from TikTok; ignored once the asset is stored.
Header Parameters
Your Euler Stream API key. Alternative to the apiKey query parameter.
Sign in and enable the Image CDN to send requests against your own endpoint.