Post to Instagram from Codex
Codex can post to Instagram through Postiz. Install the Postiz skill or add the Postiz MCP server to Codex, connect your Instagram account in Postiz, then describe the post. Codex uploads the photo or video, writes the caption, chooses feed post or story, adds collaborators or a trial reel when asked, and schedules it.
Please make sure there is always a human in the loop.
Last updated: September 2026
How do I post to Instagram from Codex?
Set up Codex once with the Postiz skill or the Postiz MCP server, connect Instagram 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 the product photo to Instagram
with a caption, tomorrow at 6pm
Codex: Done! Your Instagram post is scheduled.Instagram-Specific Features
Feed Posts
Publish photo and video posts to your Instagram feed with captions, hashtags, and location tags. Schedule for optimal engagement times.
Stories
Share ephemeral content with Instagram Stories. Upload images or videos that disappear after 24 hours.
Trial Reels
Test content with trial reels that have limited initial reach. Graduate to full distribution manually or automatically based on performance.
Collaborator Tags
Tag collaborators on your posts to co-author content. The post appears on both profiles, doubling your reach.
Graduation Strategy
Control how trial reels graduate to full reach. Choose MANUAL for hands-on control or SS_PERFORMANCE for automatic promotion.
Scheduled Posting
Schedule posts and stories with precise timestamps. Plan your Instagram content calendar and let Postiz handle the publishing.
How does Codex post to Instagram?
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 Instagram Integration
Ask Codex whether your Instagram account is connected. It also checks which options the platform supports.
Example conversation
> Is my Instagram account connected to Postiz?
Codex: Yes — your Instagram account is connected
and ready. Want me to post something?Upload Your Media
Upload your photo or video to get a public URL. Instagram requires media to be accessible via HTTPS. Supports JPG, PNG, MP4, and more.
Example conversation
> Draft a Instagram post about our new
feature launch
Codex: Here's a draft for Instagram:
"We just shipped something big..."
Want me to add media and schedule it?Create Your Post
Schedule an Instagram post with your media, caption, hashtags, and platform-specific settings like post type, trial reels, and collaborators.
Example conversation
> Yes — add screenshot.png and schedule
it for tomorrow at 9am
Codex: Done! Scheduled on Instagram for
tomorrow at 9:00 AM.Instagram Settings Reference
Mention any of these in plain language and Codex sets them for you. These are the Instagram options it can apply to any post.
| Field | Type | Description |
|---|---|---|
__type | string | Must be "instagram" or "instagram-standalone" |
post_type | string | Content type: "post" (feed) or "story" |
is_trial_reel | boolean | Post as a trial reel with limited initial reach |
graduation_strategy | string | Trial reel graduation: "MANUAL" or "SS_PERFORMANCE" (auto based on performance) |
collaborators | array | List of collaborator objects, e.g. [{"label":"username"}] |
Common Configurations
Ask Codex for any of these common Instagram scenarios and it applies the matching settings.
Simple Feed Post
Just ask
> Post it with: Simple Feed Post
Codex: Got it. Applying:
post_type: postStory Post
Just ask
> Post it with: Story Post
Codex: Got it. Applying:
post_type: storyTrial Reel with Auto Graduation
Just ask
> Post it with: Trial Reel with Auto Graduation
Codex: Got it. Applying:
post_type: post
is_trial_reel: yes
graduation_strategy: SS_PERFORMANCECollaborator Post
Just ask
> Post it with: Collaborator Post
Codex: Got it. Applying:
post_type: post
collaborators: cofounder, designer_janeWhat 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 Instagram 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 Instagram 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 Instagram"Instagram 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 Instagram about our
new feature launch, schedule for
tomorrow at 9am"
Codex: I'll handle that.
Found your Instagram 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 Instagram
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 Instagram workflows.
- ✓Runs in your terminal or IDE — just type what you want
- ✓Autonomous execution in sandboxed environments
- ✓Parallel task support — post while coding
- ✓Trial reels and graduation strategies applied automatically
- ✓Cross-post to Instagram + 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 Instagram
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>
# Instagram Settings
post_type, is_trial_reel,
graduation_strategy,
collaboratorsAlso 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 Instagram 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 Instagram integration, uploads your photo, applies post type and collaborator settings, and schedules the post.
Claude Code
> Post my product photo to Instagram
as a feed post with collaborator tags,
schedule for tomorrow evening
Claude: Done! Scheduled on Instagram for
tomorrow at 9:00 AM.Can Codex post to Instagram and other platforms at once?
Schedule the same content to Instagram and other platforms in a single request. Each platform gets its own settings.
Example
> Post "Excited to announce our new feature!" to
Instagram and LinkedIn tomorrow at 9am, then schedule
a daily tip on Instagram every weekday at 10am
Codex: Done! Scheduled:
- Instagram + LinkedIn: tomorrow 9:00 AM
- Daily tips on Instagram: Mon-Fri 10:00 AMPost Types
Feed Post
postStory
storyWhat can I ask Codex to post on Instagram?
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 Instagram.
Prompts for Instagram
> Post ./assets/launch.jpg to Instagram with a caption about
the new dashboard, tomorrow 6pm
$ codex exec "Publish clip.mp4 as an Instagram trial reel with automatic
graduation and tag @designpartner as a collaborator"
> $postiz Post the same image as an Instagram story
right after the feed postWhat Instagram rules should Codex follow?
These are the Instagram limits and required settings Postiz enforces. Codex reads them from postiz integrations:settings, and you can mention any of them in your prompt.
- ✓Instagram needs an image or video on every post; text-only posts are not possible.
- ✓post_type is required: post for the feed or story for stories.
- ✓Captions can be up to 2,200 characters.
- ✓Media must go through postiz upload; Instagram rejects raw paths and external URLs.
- ✓Trial reels use is_trial_reel with graduation_strategy MANUAL or SS_PERFORMANCE; collaborators are a list of usernames.
Codex and Instagram FAQ
How do I post to Instagram 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 Instagram in Postiz once, then ask Codex in plain English what to post and when. Codex resolves the Instagram settings, uploads any media, and schedules the post.
Can Codex post Instagram stories as well as feed posts?
Yes. Postiz exposes a post_type setting with two values, post for the feed and story for stories. Say "as a story" and Codex sets it for you. Stories still need an uploaded image or video, and the same media can be scheduled to the feed and to a story in one request.
What is a trial reel and can Codex schedule one?
A trial reel is shown first to people who do not follow you, so you can test content before it reaches your audience. Codex sets is_trial_reel to true and picks a graduation_strategy: MANUAL keeps it as a trial until you promote it, SS_PERFORMANCE lets Instagram graduate it automatically based on performance.
Can Codex post to Instagram on a schedule without me watching?
Yes. Postiz stores scheduled Instagram 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 Instagram 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 Instagram. The CLI skill route needs either postiz auth:login or a POSTIZ_API_KEY environment variable. Your Instagram login itself never leaves Postiz.
Is posting to Instagram 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 Instagram; see the ChatGPT guide for that setup.
Related Codex and Instagram 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 TikTok from Codex
→TikTok settings, prompts, and rules for Codex.
Post to Facebook from Codex
→Facebook settings, prompts, and rules for Codex.
Post to Pinterest from Codex
→Pinterest settings, prompts, and rules for Codex.
Post to YouTube from Codex
→YouTube settings, prompts, and rules for Codex.
Instagram channel on Postiz
→How Postiz connects to Instagram, 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 Instagram
Install Postiz Agent and automate your Instagram content strategy with AI-powered scheduling and publishing.