Skip to main content

Scenario

Your TikTok ad account has dozens of video creatives, but you only see surface metrics — impressions, CTR, CPM. This job pulls video ad URLs, uploads them to Mavera Assets, and runs Video Analysis to extract behavioral intelligence that TikTok doesn’t provide: hook scoring (first 3 seconds), emotional arc across the full duration, and cognitive load at each cut point. The result is a creative diagnostic that tells you why an ad works, not just that it works.

Architecture

Code

Example Output

Error Handling

TikTok returns code: 0 for success. Non-zero codes include 40001 (auth failure), 40100 (permission denied), and 40002 (invalid params). Always check the code field, not just HTTP status.
Some ad video URLs are CDN-signed and expire. If download fails, re-fetch the video info endpoint for a fresh URL.
TikTok ads over 60s or high-resolution may take 30s+ to upload. The poll loop allows 90s. Increase for longer creatives.

All TikTok jobs

Video Analysis