How to run TikTok ads from Claude Code

Claude Code can run a TikTok hook test end to end once Hypesonic is connected: it renders the videos as files in your project, checks each one against TikTok's specs, and launches one ad group per hook after you approve the budget.

By Grace Kong·Updated ·7 min read

Launch a TikTok hook test from your agent

TL;DR

  • Setup is one terminal command and a CLAUDE.md file that holds TikTok's limits. You sign in to your TikTok ads account through Hypesonic once, with no developer account of your own.

  • Export at 1080 x 1920. TikTok rejects in-feed video under 540 x 960, and Hypesonic's vertical video playbook renders 480 x 854 unless you ask for more.

  • An ad group needs more than $20 a day and a campaign more than $50; for web conversions in North America, TikTok suggests $30 a day per ad group.

  • Five hooks at $30 a day each cost $4,500 over 30 days, about 1.1 million views at the $4.08 median CPM (cost per 1,000 views, Aug 2025 to Jul 2026).

Set up Claude Code for TikTok

Add Hypesonic once, sign in to TikTok through it, then write TikTok's limits into CLAUDE.md so no file misses them.

In the folder where your TikTok work lives, run:

claude mcp add --transport http hypesonic https://www.hypesonic.com/mcp

Restart Claude Code and sign in when the browser opens. Do it in an interactive session: a claude -p run has no /mcp panel, so it cannot finish the sign-in (Claude Code docs). Add --scope user to use Hypesonic in every project. The first time Claude launches on TikTok, you sign in to your TikTok ads account through Hypesonic; there is no developer account or API app to set up. Setup guide: hypesonic.com/agents/claude-code.

Then put the standing rules in CLAUDE.md at the top of the folder. Claude reads it at the start of every session there, so you stop repeating yourself:

# TikTok ads
- Advertiser: Glow Lab US. Objective: website purchases.
- Export every video 9:16 at 1080x1920. Never 480p: TikTok's floor
  is 540x960. Files under 500 MB, 9 to 34 seconds.
- Captions: 100 characters max, no links, no @, no #.
- Keep text out of the bottom caption area and the right button column.
- Save to ads/tiktok/{yyyy-mm-dd}/{hook}/ with captions.csv.
- One ad group per hook test, at least $30 a day.
- Quote every paid run and wait for my yes.
- Show me the campaign, ad groups and budgets before anything launches.

The 480p line matters. Hypesonic's vertical video playbook (meta-video-ads) renders 480 x 854 by default, which is below TikTok's 540 x 960 minimum, so the rule makes Claude ask for 1080p on every TikTok cut.

The command

Describe the test in one prompt; Claude Code studies, quotes, renders and launches in that order.

Here are 4 TikTok posts doing well in skincare this week: [links].
Break down the hook and format of each and save the notes to
examples/2026-12-01.md. Write 8 hooks for the vitamin C serum that borrow
those formats and keep the best 5. Render them as 20-second creator-style
videos at 1080x1920, with a caption for each. Then plan one ad group per
hook at $30 a day and show me the quote and the campaign before anything launches.

For a test you repeat, put those steps in .claude/skills/tiktok-test/SKILL.md with argument-hint: [product-url] [niche] and run /tiktok-test https://glowlab.co/serum skincare (skills docs).

What Claude Code does, step by step

Examples in, hooks written, videos rendered and checked locally, then one launch.

  1. Studies the examples. Hypesonic brings each public TikTok post you link (video, caption and stats) into your library, and the Ad Analysis API watches it and writes down the hook, the beats and every word said. Claude saves the notes to a dated markdown file so you can compare weeks.
  2. Writes hooks. Claude writes the openings, lists each with the format it borrows, and you keep the ones worth testing.
  3. Follows the recipe. playbook_search has no TikTok-only playbook today, so Claude follows the vertical video playbook (meta-video-ads) and applies the TikTok rules from CLAUDE.md on top.
  4. Quotes, then renders. Every run goes out with estimate: true first. After your yes, the takes for every hook start side by side and run_wait collects them. Failed runs cost nothing.
  5. Edits on your machine. ffmpeg trims dead air before the first word, burns in word-by-word captions above the caption zone and checks each file: 9:16, at least 540 x 960, under 500 MB, between 5 seconds and 10 minutes.
  6. Launches. Claude shows the campaign, one ad group per hook, the daily budgets and the targeting. After your yes it launches them on TikTok through Hypesonic with their captions and saves the campaign, ad group and ad IDs.

What you get back

A dated folder per test, with the files TikTok received and a record of what launched.

ads/tiktok/2026-12-01/
  examples.md        (hook, format and script of each linked post)
  hooks.csv          (hook, format it borrows)
  14-day-diary/serum_1080x1920.mp4
  mirror-before-after/serum_1080x1920.mp4
  captions.csv       (file, caption, characters)
  launch.json        (campaign, ad group and ad IDs)

A week later, ask Claude Code to pull spend and results for the campaign and rank the hooks by cost per purchase. The winning hook gets new bodies in the next test, and Claude can move budget toward it once you agree.

TikTok numbers to build around

Most rejections come from size, length and caption rules, and most stalled tests come from budgets under TikTok's floors.

ItemLimit or benchmark
In-feed video9:16 at 540 x 960 or larger, up to 500 MB, up to 10 minutes
Any video adBetween 5 seconds and 10 minutes
TopView5 to 60 seconds, bitrate 2,500 kbps or more
CaptionUp to 100 characters, emojis count as 2; no links, @ or # outside Spark Ads
Campaign budgetMust be over $50, daily or lifetime
Ad group budgetOver $20 a day; lifetime budgets need days x $20
Web conversions, North AmericaTikTok suggests at least $30 a day per ad group
ReviewMost ads within 24 hours
Median cost per 1,000 views$4.08 across 5,900+ brands, Aug 2025 to Jul 2026

Sources: In-Feed specs, TopView specs, Ad Review FAQs, About budget, TikTok budgeting, Quimby, citing Triple Whale.

Five hook tests at $30 a day each cost $4,500 over 30 days (our math). At the $4.08 median, that buys about 1.1 million views, roughly 220,000 per hook, enough to rank hooks by watch time and cost per purchase.

Report results every morning

A Desktop scheduled task runs on your own machine, so it can write each morning's results straight into the project folder.

Every weekday at 7am: pull yesterday's spend, views and purchases for the
TikTok hook test, append them to results/log.md, and flag any ad group
above $25 per purchase. Do not change budgets or launch anything.

Desktop scheduled tasks need your machine on but can read and write local files; cloud scheduled tasks keep running with the laptop shut but start from a fresh clone each time, and run at most hourly (Claude Code docs). Pick Desktop for a log that lives in the folder, cloud for a report posted elsewhere.

What Claude Code is best and worst at for TikTok

Fast, file-based hook testing is its strength; judging a video's feel is still your job.

StrongWeak
Volume. Many hooks on one body, rendered and named in one pass.Watching. It checks specs and transcripts, but you should watch every video before it launches.
Spec checks on every file, so nothing bounces for size, length or caption.Spotting trends on its own: give it links to posts you have seen working.
Ranking hooks from the results it pulls, in a file you can compare week to week.Trends move daily; notes from Monday are stale by Friday.
Scheduled result logs written into the repo.Unattended claude -p runs cannot finish the sign-in; do it once interactively.

Questions

Can Claude Code post TikTok ads?

Yes. With Hypesonic connected and your TikTok ads account signed in through it, Claude Code launches your videos with their captions, sets up the campaign and ad groups with budgets and targeting, and reports results, after you approve the plan and the quote.

What resolution should TikTok ads be?

Export 1080 x 1920 at 9:16. TikTok accepts 540 x 960 or larger, up to 500 MB, and TopView wants 2,500 kbps or more.

What is the minimum budget for TikTok ads?

A campaign budget must be over $50 and an ad group over $20 a day. For web conversions in North America, TikTok suggests at least $30 a day per ad group.

Can Claude Code find what is trending on TikTok?

Give it links to posts you have seen working. Hypesonic brings each public TikTok post into your library and breaks down its hook and script, so the hooks Claude writes borrow formats that already work.

How long does TikTok take to approve ads?

TikTok reviews most ads within 24 hours, though some take longer.

Sources

  1. 1Claude Code docs, Connect to tools via MCP · accessed Nov 30, 2026
  2. 2Claude Code docs, Extend Claude with skills · accessed Nov 30, 2026
  3. 3Claude Code docs, Run prompts on a schedule · accessed Nov 30, 2026
  4. 4TikTok Ads Manager help, In-Feed Ads specifications · checked Nov 30, 2026
  5. 5TikTok Ads Manager help, TopView ad specifications · checked Nov 30, 2026
  6. 6TikTok, Ad Review FAQs · accessed Nov 30, 2026
  7. 7TikTok Ads Manager help, About budget · updated Jul 2026
  8. 8TikTok for Business, setting a budget · accessed Nov 30, 2026
  9. 9Quimby Digital, TikTok ad costs 2026 (Triple Whale and Birch data) · Nov 2026

Launch a TikTok hook test from your agent

Keep reading