doodle top mobile

Post to Medium from Codex

Codex can publish articles to Medium through Postiz. Install the Postiz skill or add the Postiz MCP server to Codex, connect your Medium account in Postiz, then point Codex at a markdown file or ask it to write one. Codex sets the title, subtitle, tags, canonical URL, and publication, then schedules the article.

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 Medium from Codex?

Set up Codex once with the Postiz skill or the Postiz MCP server, connect Medium 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:
> Publish my draft article on Medium
  under our publication, tomorrow at 9am

Codex: Done! Your Medium post is scheduled.

Medium-Specific Features

📝

Article Publishing

Publish long-form articles directly to Medium with full Markdown support. Write once, publish seamlessly.

📚

Publication Support

Publish articles under any Medium publication you belong to. Reach established audiences with a single setting.

🔗

Canonical URLs

Set canonical URLs for SEO to link back to your original content. Avoid duplicate content penalties across platforms.

🏷

Smart Tagging

Add up to 4 tags per article to improve discoverability. Tags help Medium surface your content to the right readers.

📅

Scheduled Publishing

Schedule articles for future publication with precise timestamps. Plan your content calendar weeks in advance.

🤖

AI-Powered Workflows

Let AI agents draft, format, and publish your articles. From idea to published post without leaving your chat app.

How does Codex post to Medium?

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 Medium Integration

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

Example conversation

> Is my Medium account connected to Postiz?

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

Write Your Article

Compose your article content in Markdown. Medium supports rich formatting including headers, code blocks, images, and embedded links.

Example conversation

> Draft a Medium post about our new
  feature launch

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

Publish Your Article

Create a post with your article content, title, subtitle, tags, and optional publication and canonical URL settings.

Example conversation

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

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

Medium Settings Reference

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

FieldTypeDescription
__typestringMust be "medium"
titlestringArticle title (min 2 characters)
subtitlestringArticle subtitle (min 2 characters)
canonicalstringOriginal URL for SEO canonical link
publicationstringPublication ID to publish under
tagsarrayUp to 4 tags: [{value: string, label: string}]

Common Configurations

Ask Codex for any of these common Medium publishing scenarios and it applies the matching settings.

Simple Article with Tags

Just ask

> Post it with: Simple Article with Tags

Codex: Got it. Applying:
  title: Getting Started with TypeScript
  subtitle: A beginner-friendly introduction
  tags: TypeScript, JavaScript, Programming

Cross-Posted Article with Canonical URL

Just ask

> Post it with: Cross-Posted Article with Canonical URL

Codex: Got it. Applying:
  title: How We Scaled to 1M Users
  subtitle: Lessons from our growth journey
  canonical: https://engineering.myblog.com/scaling-to-1m
  tags: Startup, Scaling, Engineering

Publication Article

Just ask

> Post it with: Publication Article

Codex: Got it. Applying:
  title: The Future of AI Agents
  subtitle: Why autonomous agents are the next paradigm
  publication: towards-data-science-id
  tags: Artificial Intelligence, AI Agents, Automation, Future

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 Medium 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 Medium 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 Medium"

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

Codex: I'll handle that.
  Found your Medium 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 Medium

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

  • ✓Runs in your terminal or IDE — just type what you want
  • ✓Autonomous execution in sandboxed environments
  • ✓Parallel task support — post while coding
  • ✓Canonical URLs applied automatically when cross-posting from your blog
  • ✓Cross-post to Medium + 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 Medium
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>

# Medium Settings
title, subtitle, canonical,
publication, 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 Medium 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 Medium integration, formats your article, applies tags and publication settings, and publishes the post.

Claude Code

> Publish my API design article to Medium
  under the engineering publication with
  a canonical URL back to my blog

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

Can Codex post to Medium and other platforms at once?

Publish the same article to Medium and other platforms in a single request. Each platform gets its own settings.

Example

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

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

What can I ask Codex to post on Medium?

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

Prompts for Medium

> Publish ./posts/scheduling-with-agents.md to Medium under our
  publication with tags "AI", "automation", tomorrow 9am

$ codex exec "Repost https://postiz.com/blog/agents on Medium with that URL
  as the canonical link, subtitle 'A practical guide'"

> $postiz Draft a Medium article from README.md and
  schedule it for Monday

What Medium rules should Codex follow?

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

  • ✓title and subtitle are both required, at least 2 characters each.
  • ✓Up to 4 tags per article.
  • ✓canonical is optional but recommended when republishing content from your own site.
  • ✓publication is optional; Codex resolves the publication name to its id with postiz integrations:settings.

Codex and Medium FAQ

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

Can Codex republish my blog posts on Medium without hurting SEO?

Yes. Give Codex the original URL and it fills the canonical setting, so Medium points search engines back to your site as the source. That is the standard way to syndicate content. Codex can also add up to four tags and, if you connected one, publish under your Medium publication.

What does Codex need to publish a Medium article?

A title and a subtitle, both at least two characters, plus the article body. Tags, canonical URL, and publication are optional. Codex can generate all of these from a markdown file in your repo, so "publish ./posts/launch.md to Medium" is usually enough; it will ask if the subtitle is missing.

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

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

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

Start publishing to Medium

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