doodle top mobile

Post to YouTube from Codex

Codex can upload videos to YouTube through Postiz. Install the Postiz skill or add the Postiz MCP server to Codex, connect your YouTube channel in Postiz, then point Codex at a video file. It uploads the video, writes the title and description, sets visibility and tags, attaches a custom thumbnail, and schedules publication.

Setup GuideGitHub

Please make sure there is always a human in the loop.

Last updated: September 2026

doodle left mobiledoodle right mobile

How do I post to YouTube from Codex?

Set up Codex once with the Postiz skill or the Postiz MCP server, connect YouTube 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:
> Upload demo.mp4 to YouTube as public
  with a title and tags, tomorrow at noon

Codex: Done! Your YouTube post is scheduled.

YouTube-Specific Features

🎬

Video Uploads

Hand Codex a video file and it uploads it. Supports all major formats including MP4, MOV, AVI, MKV, and WEBM.

👁

Visibility Control

Set videos to public, unlisted, or private. Control who can discover and watch your content from the start.

🧒

Kids Content

Declare whether your content is made for kids to comply with YouTube's COPPA requirements. Set per video.

🖼

Custom Thumbnails

Upload and attach custom thumbnail images to your videos. First impressions matter — control your click-through rate.

🏷

Tags & Metadata

Add tags to improve discoverability. Each tag has a value and label for flexible categorization and SEO.

📅

Scheduled Publishing

Schedule video uploads with precise timestamps. Videos are uploaded and set to publish at your chosen time.

How does Codex post to YouTube?

You describe what you want in plain language and Codex handles the Postiz calls for you. Here is how a typical conversation goes.

1

Find Your YouTube Integration

Ask Codex whether your YouTube account is connected. It also checks which options the platform supports.

Example conversation

> Is my YouTube account connected to Postiz?

Codex: Yes — your YouTube account is connected
  and ready. Want me to post something?
2

Upload Your Video & Thumbnail

Upload your video file and optionally a custom thumbnail. YouTube requires media to be accessible via HTTPS. Supports MP4, MOV, AVI, MKV, WEBM, and more.

Example conversation

> Draft a YouTube post about our new
  feature launch

Codex: Here's a draft for YouTube:
  "We just shipped something big..."
  Want me to add media and schedule it?
3

Create Your Post

Schedule a YouTube upload with your video, description, title, visibility settings, tags, and optional thumbnail.

Example conversation

> Yes — add screenshot.png and schedule
  it for tomorrow at 9am

Codex: Done! Scheduled on YouTube for
  tomorrow at 9:00 AM.

YouTube Settings Reference

Mention any of these in plain language and Codex sets them for you. These are the YouTube options it can apply to any post.

FieldTypeDescription
__typestringMust be "youtube"
titlestringVideo title (2-100 characters)
typestringVisibility: "public", "unlisted", or "private"
selfDeclaredMadeForKidsstringKids content declaration: "yes" or "no"
thumbnailobjectCustom thumbnail: {id: string, path: string}
thumbnail.idstringUploaded thumbnail file ID
thumbnail.pathstringPublic URL of the thumbnail image
tagsarrayVideo tags: [{value: string, label: string}]
tags[].valuestringTag value used internally
tags[].labelstringTag display label

Common Configurations

Ask Codex for any of these common YouTube uploading scenarios and it applies the matching settings.

Public Video with Tags

Just ask

> Post it with: Public Video with Tags

Codex: Got it. Applying:
  title: How to Build a REST API in 10 Minutes
  type: public
  selfDeclaredMadeForKids: no
  tags: Tutorial, API, Coding

Unlisted Video with Custom Thumbnail

Just ask

> Post it with: Unlisted Video with Custom Thumbnail

Codex: Got it. Applying:
  title: Team Meeting Recording - March 2025
  type: unlisted
  selfDeclaredMadeForKids: no
  thumbnail: id=thumb-abc123, path=https://uploads.postiz.com/thumb.jpg

Kids Content Video

Just ask

> Post it with: Kids Content Video

Codex: Got it. Applying:
  title: Learn Colors with Fun Animations
  type: public
  selfDeclaredMadeForKids: yes
  tags: Kids, Educational, Colors

Private Draft Video

Just ask

> Post it with: Private Draft Video

Codex: Got it. Applying:
  title: Draft - Upcoming Product Launch
  type: private
  selfDeclaredMadeForKids: no

What 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 YouTube 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 YouTube 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 YouTube"

YouTube Uploading 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 Youtube about our
  new feature launch, schedule for
  tomorrow at 9am"

Codex: I'll handle that.
  Found your Youtube integration.
  Composing and scheduling the post.

  Done! Your post is scheduled.
  Post ID: abc-123
💻

Parallel 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 simultaneously

Why Codex + Postiz for YouTube

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 YouTube workflows.

  • ✓Runs in your terminal or IDE — just type what you want
  • ✓Autonomous execution in sandboxed environments
  • ✓Parallel task support — post while coding
  • ✓Thumbnails and tags applied automatically based on your instructions
  • ✓Cross-post to YouTube + 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 YouTube
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>

# YouTube Settings
title (2-100 chars), type
(public/unlisted/private),
selfDeclaredMadeForKids,
thumbnail, tags

Also 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 YouTube guide, or the Postiz Agent page for any other agent.

C

Claude Code

by Anthropic

Claude reads the Postiz skill so it knows what it can do, then autonomously discovers your YouTube integration, uploads your video and thumbnail, applies tags and visibility settings, and schedules the upload.

Claude Code

> Upload my tutorial video to YouTube
  as public with tags "coding" and
  "tutorial", schedule for tomorrow

Claude: Done! Scheduled on YouTube for
  tomorrow at 9:00 AM.

Can Codex post to YouTube and other platforms at once?

Schedule the same video to YouTube and other platforms in a single request. Each platform gets its own settings.

Example

> Post "Excited to announce our new feature!" to
  YouTube and LinkedIn tomorrow at 9am, then schedule
  a daily tip on YouTube every weekday at 10am

Codex: Done! Scheduled:
  - YouTube + LinkedIn: tomorrow 9:00 AM
  - Daily tips on YouTube: Mon-Fri 10:00 AM

What can I ask Codex to post on YouTube?

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 YouTube.

Prompts for YouTube

> Upload ./exports/demo.mp4 to YouTube as public with the title
  "Postiz 2.4 walkthrough", tags from ./tags.txt, tomorrow noon

$ codex exec "Upload tutorial.mp4 to YouTube as unlisted with thumbnail.png
  as the thumbnail and mark it not made for kids"

> $postiz Reschedule the YouTube video planned for Friday to
  Monday 9am and set it to private until then

What YouTube rules should Codex follow?

These are the YouTube limits and required settings Postiz enforces. Codex reads them from postiz integrations:settings, and you can mention any of them in your prompt.

  • ✓title is required and must be 2 to 100 characters.
  • ✓type (visibility) is required: public, unlisted, or private.
  • ✓The video file and any custom thumbnail must go through postiz upload; the thumbnail is then referenced by id and path.
  • ✓selfDeclaredMadeForKids takes yes or no; tags are value/label pairs.

Codex and YouTube FAQ

How do I post to YouTube 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 YouTube in Postiz once, then ask Codex in plain English what to post and when. Codex resolves the YouTube settings, uploads any media, and schedules the post.

Can Codex set a custom thumbnail on a YouTube upload?

Yes. Upload the image with postiz upload and Codex passes its id and path in the thumbnail setting alongside the video. Raw file paths and external URLs are rejected, so the upload step matters. If you skip the thumbnail, YouTube picks a frame automatically; you can ask Codex to replace it later.

Can Codex upload a YouTube video as unlisted or private first?

Yes. The type setting takes public, unlisted, or private, and Codex sets it from your wording. A common flow is uploading as unlisted so you can review it, then asking Codex to reschedule or switch it to public. The selfDeclaredMadeForKids flag is set the same way from your prompt.

Can Codex post to YouTube on a schedule without me watching?

Yes. Postiz stores scheduled YouTube 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 YouTube 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 YouTube. The CLI skill route needs either postiz auth:login or a POSTIZ_API_KEY environment variable. Your YouTube login itself never leaves Postiz.

Is posting to YouTube 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 YouTube; see the ChatGPT guide for that setup.

Start posting to YouTube

Install Postiz Agent and automate your YouTube content strategy with AI-powered scheduling and publishing.