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

GEThttps://[:cdnId].assets.cdn.eulerstream.com/{tiktok_cdn_host}/{asset_path}

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

tiktok_cdn_hoststring
asset_path*string

Query Parameters

apiKeystring
...signature paramsstring

Header Parameters

X-Api-Keystring
Try it
GET

Sign in and enable the Image CDN to send requests against your own endpoint.

Responses

200The asset bytes, served with the upstream Content-Type (e.g. image/jpeg).
Response200

No response body.


Store an asset

PUThttps://[:cdnId].assets.cdn.eulerstream.com/{tiktok_cdn_host}/{asset_path}

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

tiktok_cdn_hoststring
asset_path*string

Query Parameters

apiKeystring
...signature paramsstring

Header Parameters

X-Api-Keystring
Try it
PUT

Sign in and enable the Image CDN to send requests against your own endpoint.

Responses

200Storage summary. Path must be the shortest stable path for the stored asset.

Response Attributes

statusnumber
messagestring
pathstring
Response200