How to upload to YouTube from OpenAI Codex

To upload to YouTube from Codex, run codex mcp add postwire --url https://postwire.io/api/mcp and codex mcp login postwire, connect your YouTube channel once on Google's own page, and ask "upload ./videos/demo.mp4 to YouTube, unlisted, with a title from README.md". Codex writes the title (up to 100 characters), the description and the tags with generate_posts, shows them to you, and uploads the video with post_to_social or schedules it with schedule_post, up to 365 days ahead, through YouTube's official API. A square or vertical video of up to 3 minutes shows as a Short. You create no Google Cloud project, OAuth client or quota request, and the free plan covers it: 1 business, 10 posts a month, 5 AI drafts a day, 2 networks per post, no card.

A scheduled upload goes out from PostWire's servers with Codex closed. Codex never sees your Google password, and a large file is sent with YouTube's resumable upload, so a slow connection does not start over.

Updated . Written from PostWire's own code; vendor prices read on Nov 5, 2026. Live networks: TikTok, Instagram, YouTube, LinkedIn (personal profiles), Facebook Pages, Bluesky, Mastodon, Telegram, Discord, and X on paid plans.

Set it up and upload, step by step

Prompt to copy once your channel is connected: Write a YouTube title and description for ./videos/v3.1-demo.mp4 from CHANGELOG.md, show them to me with the title length, and schedule it public for Thursday at 10am.

  1. Add PostWire to Codex

    In your terminal run codex mcp add postwire --url https://postwire.io/api/mcp, then codex mcp login postwire. The browser opens PostWire's sign-in, which asks for your email and a 6-digit code and creates a free PostWire account if you have none: no password and no card. codex mcp list, or /mcp inside Codex, shows postwire with its tools. The entry lands in ~/.codex/config.toml, which the Codex CLI, the IDE extension and the ChatGPT desktop app share, so one setup uploads to YouTube from any of them.

  2. On a server or in CI, sign in another way

    codex mcp login postwire --no-browser gives you a sign-in link to open on any device. In CI, give Codex your key instead: copy it in the dashboard under API & MCP, set POSTWIRE_API_KEY, and put the variable's name in ~/.codex/config.toml, never the key itself:

    [mcp_servers.postwire]
    url = "https://postwire.io/api/mcp"
    bearer_token_env_var = "POSTWIRE_API_KEY"
  3. Connect your YouTube channel

    Ask "connect my YouTube". Codex calls create_connect_link and prints a one-hour link; open it, sign in on Google's own page and pick the channel. You do this once per channel.

  4. Give it the video

    YouTube fetches the video from a link, so a file on your disk goes through an upload page: Codex asks for one (create_upload_link, valid 24 hours, up to 100 MB on the free plan and 1 GB on paid plans), you pick the file there, and get_uploaded_file hands Codex its link for video_url. No video yet? make_video_from_text turns a few lines into an 8-12 second vertical MP4 (1080×1920), which YouTube shows as a Short.

  5. Ask for the title, description and tags

    "Write the title and description." generate_posts returns a draft and publishes nothing: a title with the words people search in its first 40 characters (YouTube takes up to 100), a description of up to 5,000 characters whose first lines repeat the promise, 3-5 hashtags, and 5-8 tags. Then say who can see it: public, unlisted (only people with the link) or private. With no choice, PostWire uploads it private.

  6. Upload now, or schedule it

    Say "upload it" and Codex calls post_to_social; the result carries the video's link. Say "schedule it for Thursday at 10" and it calls schedule_post, up to 365 days ahead, or with run_at: "next_slot" for your next free posting hour. This is the call:

    {
      "name": "schedule_post",
      "arguments": {
        "platforms": ["youtube"],
        "per_platform": { "youtube": {
          "title": "Invoice CSV export in 60 seconds: what's new in v3.1",
          "text": "v3.1 exports every invoice to CSV in one click.\n\nIn this demo: …\n\n#productupdate #saas #devtools",
          "tags": ["invoice csv export", "release notes", "product demo"]
        } },
        "video_url": "https://postwire.io/m/…/v3.1-demo.mp4",
        "privacy": "public",
        "run_at": "2026-11-12T10:00:00-05:00"
      }
    }
  7. Check the queue

    "What's scheduled on YouTube?" calls list_scheduled_posts and "cancel Thursday's upload" calls cancel_scheduled_post; the same queue is on the dashboard's Queue page.

From a release script, codex exec "upload ./videos/release.mp4 to YouTube, unlisted, title and description from CHANGELOG.md" runs the same request without the interactive screen. Prefer to set it up by hand? Open the dashboard, connect YouTube under Accounts and copy your key under API & MCP.

Ways to upload to YouTube from Codex, side by side

How each service plugs into Codex and what it costs to start, read on its own Codex, MCP and pricing pages on Nov 5, 2026.

ServiceHow it plugs into CodexSign-inYouTube on the free startCheapest paid planWrites title, description and tags
PostWirecodex mcp add postwire --url https://postwire.io/api/mcpOAuth (email and a 6-digit code), or an API key in bearer_token_env_varYes — free plan: 1 business, 10 posts a month, 5 AI drafts a day, 2 networks per post, no card$19/mo — 3 businesses, every network in each postYes — generate_posts writes the title, description and 5-8 tags
Postizcodex mcp add postiz --url mcp.postiz.com/mcp-oauth-dynamic, or the Postiz skillOAuth, or POSTIZ_API_KEY for the skill7-day free trial$29/mo — 5 channelsNot listed
Blotatocodex mcp add Blotato --url https://mcp.blotato.com/mcpOAuthNo — "API and MCP access require a paid Blotato plan"$29/moNot listed
Upload-PostIts MCP server at mcp.upload-post.com; no Codex setup listedAn API key in an Authorization headerFree plan of 10 uploads a month, 2 profiles, no card$24/mo ($16 billed yearly)Not listed

Checked on Nov 5, 2026 (2026-11-05) on each vendor's own pricing or docs page, linked in the first column and below. Monthly billing in USD unless noted. "Not listed" means we could not find it on their page, not that it is missing.

Where PostWire is ahead

  • The title and tags are written for search: generate_posts puts the searched words in the first 40 characters of the title and writes the description and 5-8 tags, plus the TikTok and Reels captions from the same idea.
  • A free plan with no time limit: 10 posts a month, no card, MCP included. Postiz starts with a 7-day trial, and Blotato's MCP access needs a paid plan.
  • The cheapest paid plan here: $19 a month for 3 businesses, $15.20 billed yearly. Upload-Post $24 ($16 yearly), Postiz and Blotato $29.
  • A Short from a few lines: make_video_from_text makes an 8-12 second vertical MP4 to upload when there is no video yet.
  • No key to copy to start: codex mcp login postwire signs you in with your email and a 6-digit code, and creates the free account too. A key is there for CI.
  • A person approves what Codex queued: on paid plans, approval rules hold the upload until you approve it from an emailed link.
Sources, all read on Nov 5, 2026:
  • Postiz — Upload to YouTube from Codex (codex mcp add postiz --url https://mcp.postiz.com/mcp-oauth-dynamic and codex mcp login postiz; or the Postiz skill with POSTIZ_API_KEY): postiz.com/codex/youtube
  • Postiz pricing ("Start with a 7-day free trial"; Standard $29 a month, 5 channels): postiz.com/pricing
  • Blotato + OpenAI Codex (codex mcp add Blotato --url https://mcp.blotato.com/mcp, codex mcp login Blotato --scopes email,offline_access; "API and MCP access require a paid Blotato plan"): www.blotato.com/codex
  • Blotato pricing (Starter $29 a month; the free trial covers all features "except the API and MCP server"): www.blotato.com/pricing
  • Upload-Post — YouTube MCP server (mcp.upload-post.com; "YouTube works on the Free plan: 10 uploads a month, 2 profiles, no card. Unlimited uploads from $24/month, or $16/month billed yearly"): www.upload-post.com/mcp/youtube/
  • Upload-Post llms-full.txt (Free 10 uploads a month, "no credit card required"; Basic $24 a month, $16 billed yearly, 5 profiles): www.upload-post.com/llms-full.txt
  • OpenAI — Codex MCP docs (~/.codex/config.toml shared by the ChatGPT desktop app, the Codex CLI and the IDE extension; codex mcp login <server-name>, with --no-browser for a terminal without a local browser; bearer_token_env_var; /mcp in the TUI): developers.openai.com/codex/mcp
  • YouTube Help — Shorts of up to three minutes (videos uploaded on or after October 15, 2024 "with a square or vertical aspect ratio up to three minutes in length will be categorized as Shorts"): support.google.com/youtube/answer/15424877

What to say in Codex, and what your channel receives

You sayCodex callsYour channel receives
"Upload ./videos/demo.mp4 to YouTube, unlisted"create_upload_link, generate_posts, then post_to_socialThe video, with its title, description and tags
"Upload the vertical clip as a Short"post_to_social with video_urlA Short (square or vertical, up to 3 minutes)
"Make a 10-second clip from these release notes"make_video_from_text, then post_to_socialAn 8-12 second vertical video, shown as a Short
"Schedule it public for Thursday at 10"schedule_post with run_at and privacyThe same video, at that time
"Upload it to YouTube and TikTok"post_to_social with both networksThe same file on both, each with its own text
"What do I have scheduled?"list_scheduled_postsNothing — it reads your queue

Source: PostWire's MCP server and YouTube publisher, OpenAI's Codex MCP docs and YouTube's Shorts rule, read Nov 5, 2026. Every YouTube tool and limit: YouTube MCP server.

Why upload to YouTube from Codex

  • The title comes from what the video shows: Codex reads the README, the changelog or the script in your repo and writes a title and description with the words people search for.
  • One video, three feeds: "upload this to YouTube as a Short and post it to TikTok" sends the same file to both, each with its own text. On the free plan one post reaches 2 networks; paid plans (from $19 a month) add Instagram Reels and the rest in the same request.
  • The same upload from a script: once you know what you want, Codex can put it in your release job as one REST call, POST /api/post with {"platforms": ["youtube"], "video_url": "…", "title": "…"} and your key.
  • A person can have the last word: on paid plans, a brand's approval rules hold what Codex queues until you approve it from an emailed link.

What Starter adds to uploading to YouTube from Codex

Two videos and two Shorts a week is about 17 uploads a month, past the free plan's 10 and its 3 waiting posts. Starter is $19 a month, or $15.20 a month billed yearly:

  • An unlimited queue and 1,000 posts a month, so a month of uploads can wait in line.
  • Files of up to 1 GB, against 100 MB on the free plan, for full-length videos.
  • 3 businesses, each with its own channel and other connections, plus every network in each post.
  • 25 recurring posts and approvals: what Codex queues waits until you approve it from an emailed link.

YouTube's rules Codex works within

  • Title up to 100 characters, description up to 5,000; each tag up to 100.
  • A Short or a regular video: YouTube shows a square or vertical video of up to 3 minutes as a Short, anything else as a regular video. PostWire uploads video only; YouTube takes no text or photo posts this way.
  • Public, unlisted or private, chosen for each upload; private when none is given.
  • Through YouTube's official Data API and the access you grant on Google's own page. No browser automation and no password.

What it does not do

PostWire does not edit or cut the video, does not add videos to playlists, and does not read or answer comments. It does not post YouTube community posts. For a Short from a long video, cut the clip first (Codex can run ffmpeg in your terminal) and give it the finished file.

Questions people ask

Can Codex upload to YouTube?

Yes, with an MCP server. Codex has no YouTube access of its own; with PostWire added (codex mcp add postwire --url https://postwire.io/api/mcp, then codex mcp login postwire) and your channel connected once, it writes the title and description and uploads or schedules videos and Shorts when you ask.

Do I need a Google Cloud project or YouTube API quota?

No. PostWire's own Google app does the uploading: you sign in on Google's page and pick the channel. No OAuth client to build, no API key from Google and no quota request.

How do I upload a YouTube Short from Codex?

Give it a square or vertical video of up to 3 minutes. YouTube decides what shows as a Short from the video itself, so there is no separate Short setting; #Shorts in the description is optional.

Can Codex schedule YouTube uploads?

Yes. It calls schedule_post with a time up to 365 days ahead, or "next_slot" for your next free posting hour, and PostWire uploads the video at that time with Codex closed. The free plan keeps 3 posts waiting at once; paid plans have no such limit.

How big can the video be?

Up to 100 MB per file on the free plan and 1 GB on paid plans. A file on your disk goes through an upload page that Codex asks for; a file at a public https link is fetched directly.

Where does Codex keep the PostWire config?

In ~/.codex/config.toml, as a [mcp_servers.postwire] table with url = "https://postwire.io/api/mcp". The Codex CLI, the IDE extension and the ChatGPT desktop app read the same file.

How much does it cost?

The free plan includes YouTube and the MCP server: 1 business, 10 posts a month, 5 AI drafts a day, 2 networks per post, no card. Starter is $19 a month for 3 businesses and Pro $29 for 10, with every network in each post; nothing is charged from Codex.