TikTok · from Codex

Post to TikTok from Codex.

The clip is a file in the project. Codex uploads it, TikTok publishes it, and the reply says how far each step got.

Every TikTok post needs a video or photos, and from Codex they are files on disk: a screen recording, an edited export, a set of images a script produced. Codex asks our upload tool for a short-lived link, sends the bytes with a shell command it shows you first, and passes the resulting address into the post. We move the media on to TikTok from there and publish it to your profile rather than parking it in your drafts.

Photos go out as one carousel of up to 35 images, and TikTok takes JPEG for photo posts; a PNG export from a design tool is refused, so ask Codex to convert copies with a tool already on the machine before it uploads them. Captions run to 2,200 characters. Before the publish, Codex shows the call and waits unless your approval mode says otherwise, and on TikTok that wait is worth keeping, because a published video cannot be removed through the API.

Asking Codex for a TikTok post

The TikTok ceilings in this exchange come from the same table the publisher enforces — the conversation is drawn, the numbers are not.

Codex19:20

› Set me up — what do you need?

Just the accounts. Connect them in the browser once and I can publish from here after that.

› Done, connected

I will tell you before publishing if a network cannot take what you wrote.

› Good. Drafting the launch note now

Send it over and I will check it before anything goes out.

› upload renders/teaser-vertical.mp4 to tiktok now, the caption is in renders/caption.txt

local video · caption from a file

1S

The clip is vertical and the caption fits. Uploading it first:

TikTok caption2,200fits
Image or videorequired — attached
Reply chainsjoined into one post
Attachments allowed35per post

Published to your TikTok profile. TikTok sends no link back yet, so check it in the app.

› _

What TikTok allows

Read from the same table the publisher enforces, so this cannot drift from what actually happens when you press send.

Caption limit
2,200 characters
Post with no image or video
Refused by TikTok
Reply chains
No — the parts are joined into one post
Images or video per post
35
Image formats
Anything we accept for upload

Codex, on the other networks

TikTok, from the other agents

Publishing to TikTok from Codex

A render folder, uploaded

Codex requests an upload link per file, sends each one from disk with a command you approve, and hands the addresses to the post, so nothing needs hosting first.

Your profile, not your drafts

TikTok’s API files uploads as drafts unless told otherwise, so the post mode is always set explicitly and a clip sent from Codex appears on your profile.

PNG made into JPEG first

TikTok photo posts take JPEG only. Codex can convert a PNG or WebP export locally before the upload, which avoids a refusal when the post is published.

A timeout is not a failure

If a call carrying a video outlasts Codex’s tool timeout, the post may still have gone out, so Codex should list recent posts before it tries again.

How it works

1

Connect once

~2 min

Link the accounts you use in a browser. OAuth, no passwords typed into a chat, no API keys to paste anywhere.

ChatGPT

Claude

Cursor

2

Ask, in your own words

one sentence

Tell Codex to publish to TikTok, now or on a day you name. No dashboard, no tab switch.

3

Read the receipt

per network

One line per network — what landed, what failed and why, and what genuinely could not be determined.

When Codex stops waiting before TikTok answers

Codex gives every MCP tool call a fixed time to answer, set by tool_timeout_sec in config.toml. Should a publish ever outlast it — the call that carries a video is the likeliest to — Codex reports a timeout, but the post may already be on its way to TikTok. Retrying blind is how a clip ends up published twice. Our tools tell the agent to check list_posts before retrying, and a publish sent again with the same idempotency key cannot go out a second time. If your videos are large, raising the timeout for this one server in config.toml is the simpler fix.

A rule of TikTok from Codex, not ours and not the network’s. From documentation, checked 2026-11-23.

When this is the wrong tool

If you film on your phone and want the clip up within the minute, TikTok’s own app is the quicker route; from Codex the video has to be on the machine first. And views, likes and comments do not come back into Codex — once the post is up, the numbers live in TikTok.

Questions people actually ask

Can Codex convert a PNG to JPEG for a TikTok photo post?

Yes, if a tool that can do it is installed, since converting a file is a local command that needs no network. Codex makes the JPEG copies, uploads those, and publishes them as one photo carousel; the original PNG files are left as they were.

Codex said the TikTok call timed out. Did the post go out?

It may have. Ask Codex to list your recent posts before trying again; if the post is there, there is nothing to retry. A retry sent with the same idempotency key cannot publish the clip a second time, which is why the key should stay the same.

Can Codex delete a TikTok it posted by mistake?

No. TikTok offers no way to delete a published video through its API, so it has to be removed in the TikTok app. That is the reason to keep the publishing tool behind an approval prompt in Codex.

Something else? Ask us — a person answers.

Read next

Start where you already work.

Connect an account and post your first update in about two minutes. Every plan starts with a free trial.

Posts go out through each network’s official API — not scraping.