Post to TikTok from Codex
Codex can post videos to TikTok through Postiz. Install the Postiz skill or add the Postiz MCP server to Codex, connect your TikTok account in Postiz, then hand Codex a video file. It uploads the clip, writes the caption, sets privacy, duet, stitch, and comment options, adds branded content disclosures, and schedules publication.
Please make sure there is always a human in the loop.
Last updated: September 2026
How do I post to TikTok from Codex?
Set up Codex once with the Postiz skill or the Postiz MCP server, connect TikTok in Postiz, then ask. The whole setup takes a few minutes.
Setup, then just ask
# One-time setup, option A: Postiz skill + CLI
npx skills add gitroomhq/postiz-agent
export POSTIZ_API_KEY=your_api_key # or: postiz auth:login
# One-time setup, option B: Postiz MCP server (OAuth, no key)
codex mcp add postiz --url https://mcp.postiz.com/mcp-oauth-dynamic
codex mcp login postiz
# Then just ask Codex:
> Post clip.mp4 to TikTok as public
with a caption, tomorrow at 6pm
Codex: Done! Your TikTok post is scheduled.TikTok-Specific Features
Privacy Controls
Set video visibility to public, friends only, followers only, or private. Control exactly who sees each post.
Duets & Stitches
Enable or disable duets and stitches per video. Let your audience remix your content or keep it locked down.
Auto Music
Automatically add background music to your videos with the autoAddMusic setting. Perfect for quick clips.
Branded Content
Toggle branded content and organic branded content disclosures to stay compliant with TikTok's policies.
AI Disclosure
Mark videos as AI-generated to comply with TikTok's transparency requirements for AI-created content.
Scheduled Posting
Schedule videos with precise timestamps. Use DIRECT_POST for immediate publishing or UPLOAD for draft mode.
How does Codex post to TikTok?
You describe what you want in plain language and Codex handles the Postiz calls for you. Here is how a typical conversation goes.
Find Your TikTok Integration
Ask Codex whether your TikTok account is connected. It also checks which options the platform supports.
Example conversation
> Is my TikTok account connected to Postiz?
Codex: Yes — your TikTok account is connected
and ready. Want me to post something?Upload Your Video
Upload your video file to get a public URL. TikTok requires media to be accessible via HTTPS. Supports MP4, MOV, AVI, MKV, WEBM, and more.
Example conversation
> Draft a TikTok post about our new
feature launch
Codex: Here's a draft for TikTok:
"We just shipped something big..."
Want me to add media and schedule it?Create Your Post
Schedule a TikTok post with your video, caption, hashtags, and platform-specific settings like privacy level, duet/stitch permissions, and content disclosures.
Example conversation
> Yes — add screenshot.png and schedule
it for tomorrow at 9am
Codex: Done! Scheduled on TikTok for
tomorrow at 9:00 AM.TikTok Settings Reference
Mention any of these in plain language and Codex sets them for you. These are the TikTok options it can apply to any post.
| Field | Type | Description |
|---|---|---|
privacy_level | string | Who can view: PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR, SELF_ONLY |
title | string | Video title (max 90 characters) |
duet | boolean | Allow duets on this video |
stitch | boolean | Allow stitches on this video |
comment | boolean | Allow comments on this video |
autoAddMusic | string | Auto-add music: yes or no |
brand_content_toggle | boolean | Branded content disclosure |
brand_organic_toggle | boolean | Organic branded content |
video_made_with_ai | boolean | AI-generated content disclosure |
content_posting_method | string | DIRECT_POST or UPLOAD (draft) |
Common Configurations
Ask Codex for any of these common TikTok scenarios and it applies the matching settings.
Public Video with Full Interactions
Just ask
> Post it with: Public Video with Full Interactions
Codex: Got it. Applying:
privacy_level: PUBLIC_TO_EVERYONE
title: My Awesome Video
duet: yes
stitch: yes
comment: yes
autoAddMusic: no
brand_content_toggle: no
brand_organic_toggle: no
video_made_with_ai: no
content_posting_method: DIRECT_POSTBranded Content Post
Just ask
> Post it with: Branded Content Post
Codex: Got it. Applying:
privacy_level: PUBLIC_TO_EVERYONE
title: Partnership with Brand
duet: no
stitch: no
comment: yes
autoAddMusic: no
brand_content_toggle: yes
brand_organic_toggle: yes
video_made_with_ai: no
content_posting_method: DIRECT_POSTAI-Generated Content
Just ask
> Post it with: AI-Generated Content
Codex: Got it. Applying:
privacy_level: PUBLIC_TO_EVERYONE
title: AI Generated Art
duet: yes
stitch: yes
comment: yes
autoAddMusic: yes
brand_content_toggle: no
brand_organic_toggle: no
video_made_with_ai: yes
content_posting_method: DIRECT_POSTPrivate Draft (Upload Only)
Just ask
> Post it with: Private Draft (Upload Only)
Codex: Got it. Applying:
privacy_level: SELF_ONLY
duet: no
stitch: no
comment: no
autoAddMusic: no
brand_content_toggle: no
brand_organic_toggle: no
content_posting_method: UPLOADWhat is Codex?
Codex is OpenAI's coding agent. It runs as the Codex CLI in your terminal (npm install -g @openai/codex), as an IDE extension, and in the cloud, and it can run shell commands and call MCP servers, which is how it drives Postiz. Codex is not ChatGPT: ChatGPT is the chat assistant on chatgpt.com and connects to Postiz differently (see the ChatGPT guide). For the full setup, start at the Codex + Postiz hub.
Terminal & IDE Native
Codex runs in your terminal or IDE. You type what you want in plain English and it handles Postiz for you — no extra configuration needed.
Autonomous Execution
Codex runs commands inside a sandbox with approval rules you control, and works through multi-step tasks like discovering channels, uploading media, and scheduling TikTok posts.
Parallel Tasks
Run multiple Codex tasks simultaneously. Schedule posts to different platforms in parallel while Codex handles other coding work.
How Postiz Works with Codex
Codex discovers Postiz two ways: the postiz skill, which it loads from .agents/skills or ~/.agents/skills and which you can invoke with $postiz, or the Postiz MCP server added with codex mcp add. Either way it learns the available tools and chains them for TikTok workflows.
- ✓Install the Postiz skill with npx skills add, or add the Postiz MCP server with codex mcp add
- ✓Codex loads skills from .agents/skills and reads SKILL.md to learn the Postiz CLI
- ✓Authenticate with POSTIZ_API_KEY or postiz auth:login; the MCP route uses OAuth instead
- ✓Codex runs commands in its sandbox and asks for approval based on your permission settings
- ✓Works alongside your coding tasks in parallel
Install Postiz
# Install the Postiz skill
npx skills add gitroomhq/postiz-agent
# Set your API key
export POSTIZ_API_KEY=your_api_key
# Or add the Postiz MCP server instead (OAuth, no API key)
codex mcp add postiz --url https://mcp.postiz.com/mcp-oauth-dynamic
codex mcp login postiz
# Then ask, interactively or headless
codex "list my social media integrations"
codex exec "post today's changelog to TikTok"TikTok Posting with Codex
Tell Codex what to post from your terminal or IDE — it discovers your integrations via Postiz and handles the entire publishing workflow.
Just Ask Codex
Terminal and IDE integration
Tell Codex what to post from your terminal or IDE — it discovers your integrations via Postiz and handles the entire publishing workflow.
Codex CLI
$ codex "Post to TikTok about our
new feature launch, schedule for
tomorrow at 9am"
Codex: I'll handle that.
Found your TikTok integration.
Composing and scheduling the post.
Done! Your post is scheduled.
Post ID: abc-123Parallel Tasks
Multiple tasks at once
Codex can handle multiple tasks in parallel. Schedule posts to different platforms while it works on other coding tasks simultaneously.
Codex Parallel Tasks
# Run multiple posting tasks in parallel
$ codex "Schedule a post about our
launch to X for tomorrow 9am" &
$ codex "Write a LinkedIn article
about our new feature and schedule
for tomorrow noon" &
$ codex "Fix the bug in auth.ts"
# All three tasks run simultaneouslyWhy Codex + Postiz for TikTok
Codex's autonomous execution makes Postiz a natural fit. The agent reads the SKILL.md to understand every available command, then autonomously chains them together for TikTok workflows.
- ✓Runs in your terminal or IDE — just type what you want
- ✓Autonomous execution in sandboxed environments
- ✓Parallel task support — post while coding
- ✓Branded content disclosures applied automatically when you mention a sponsor
- ✓Cross-post to TikTok + other platforms in a single session
- ✓Powered by OpenAI's most capable models
SKILL.md (loaded by Codex from .agents/skills)
---
name: postiz
description: Social media automation
CLI for scheduling posts across
30+ platforms including TikTok
homepage: https://docs.postiz.com/public-api/introduction
---
# Loaded by Codex from .agents/skills
# Invoke explicitly with $postiz
# Available Commands
- postiz integrations:list
- postiz integrations:settings <id>
- postiz posts:create
- postiz upload <file>
- postiz analytics:platform <id>
# TikTok Settings
privacy_level, duet, stitch,
comment, autoAddMusic,
brand_content_toggle,
content_posting_methodAlso Works with Claude Code
Postiz works with any AI agent that can run commands or call MCP tools — you ask, the agent does the work. That includes Anthropic's Claude Code: see the Claude Code TikTok guide, or the Postiz Agent page for any other agent.
Claude Code
by Anthropic
Claude reads the Postiz skill so it knows what it can do, then autonomously discovers your TikTok integration, uploads your video, applies privacy and interaction settings, and schedules the post.
Claude Code
> Post my demo video to TikTok as public
with duets enabled, schedule for tomorrow
Claude: Done! Scheduled on TikTok for
tomorrow at 9:00 AM.Can Codex post to TikTok and other platforms at once?
Schedule the same video to TikTok and other platforms in a single request. Each platform gets its own settings.
Example
> Post "Excited to announce our new feature!" to
TikTok and LinkedIn tomorrow at 9am, then schedule
a daily tip on TikTok every weekday at 10am
Codex: Done! Scheduled:
- TikTok + LinkedIn: tomorrow 9:00 AM
- Daily tips on TikTok: Mon-Fri 10:00 AMPrivacy Levels
Public
PUBLIC_TO_EVERYONEFriends
MUTUAL_FOLLOW_FRIENDSFollowers
FOLLOWER_OF_CREATOROnly You
SELF_ONLYWhat can I ask Codex to post on TikTok?
Codex takes plain-English prompts in an interactive session, as a one-off codex exec command, or through the $postiz skill. These are the kinds of prompts people type for TikTok.
Prompts for TikTok
> Post ./clips/feature.mp4 to TikTok as public with a caption about
the new editor, allow duets and comments, tomorrow 6pm
$ codex exec "Upload clip.mp4 to TikTok as a draft (UPLOAD) so I can
finish it in the app, followers only"
> $postiz Post this TikTok as branded content with the paid
partnership disclosure and no stitchesWhat TikTok rules should Codex follow?
These are the TikTok limits and required settings Postiz enforces. Codex reads them from postiz integrations:settings, and you can mention any of them in your prompt.
- ✓A video file is required and must go through postiz upload.
- ✓privacy_level is required: PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR, or SELF_ONLY.
- ✓duet, stitch, and comment are required booleans; autoAddMusic takes yes or no.
- ✓content_posting_method: DIRECT_POST publishes at the scheduled time, UPLOAD sends a draft to your TikTok inbox.
- ✓brand_content_toggle and brand_organic_toggle are required disclosures; video_made_with_ai is optional. Title is limited to 90 characters.
Codex and TikTok FAQ
How do I post to TikTok from Codex?
Install the Postiz skill with npx skills add gitroomhq/postiz-agent, or add the Postiz MCP server with codex mcp add postiz --url https://mcp.postiz.com/mcp-oauth-dynamic. Connect TikTok in Postiz once, then ask Codex in plain English what to post and when. Codex resolves the TikTok settings, uploads any media, and schedules the post.
Can Codex save a TikTok as a draft instead of publishing it?
Yes. The content_posting_method setting takes DIRECT_POST to publish at the scheduled time or UPLOAD to send the video to your TikTok inbox as a draft you finish in the app. Say "as a draft" and Codex uses UPLOAD. Drafts still need the privacy level and interaction settings filled in.
How does Codex handle TikTok branded content disclosures?
TikTok requires two flags on every post: brand_content_toggle for paid partnerships and brand_organic_toggle for your own brand's promotional content. Codex sets them from your wording, for example "this is a paid partnership". There is also video_made_with_ai for AI-generated footage. Postiz passes all three to TikTok.
Can Codex post to TikTok on a schedule without me watching?
Yes. Postiz stores scheduled TikTok posts and publishes them at the chosen time, so Codex does not need to stay open. For unattended runs, call codex exec with your prompt from a script or cron job. Keep a human reviewing the output, since Codex will publish exactly what it is told to publish.
Do I need a Postiz API key to post to TikTok from Codex?
Not with the MCP route. Run codex mcp login postiz and Codex signs in to your Postiz account over OAuth, so it only reaches channels you already connected, including TikTok. The CLI skill route needs either postiz auth:login or a POSTIZ_API_KEY environment variable. Your TikTok login itself never leaves Postiz.
Is posting to TikTok from Codex the same as posting from ChatGPT?
No. Codex is OpenAI's coding agent for your terminal and IDE, and it reaches Postiz through the Postiz skill or MCP server. ChatGPT is the chat assistant on chatgpt.com, which connects to Postiz as an app or custom MCP connector. Both can publish to TikTok; see the ChatGPT guide for that setup.
Related Codex and TikTok guides
Start at the Codex hub for setup, or jump to another platform Codex can post to through Postiz.
Codex + Postiz overview
→Setup, skill vs MCP comparison, codex exec automation, and FAQ for OpenAI Codex.
Post to Instagram from Codex
→Instagram settings, prompts, and rules for Codex.
Post to YouTube from Codex
→YouTube settings, prompts, and rules for Codex.
Post to X from Codex
→X settings, prompts, and rules for Codex.
Post to Pinterest from Codex
→Pinterest settings, prompts, and rules for Codex.
TikTok channel on Postiz
→How Postiz connects to TikTok, features, and setup outside of any agent.
Postiz MCP server
→The OAuth MCP endpoint Codex, ChatGPT, Claude, and Cursor can all connect to.
Postiz Agent CLI
→The postiz CLI and skill that any AI agent can drive from a shell.
Post to social media from ChatGPT
→The chat-app route, for when you are not in a terminal.
Postiz pricing
→7-day free trial, with MCP, CLI and API access on every plan.
Start posting to TikTok
Install Postiz Agent and automate your TikTok content strategy with AI-powered scheduling and publishing.