Skip to content

Post to Instagram from Codex

Codex is OpenAI's coding agent. It runs as the Codex CLI in your terminal, as an IDE extension and inside the ChatGPT desktop app, and all three can use MCP servers. A video from your Kreatix library or a public link, posted as a Reel; Instagram takes no text-only post.

Updated November 2026

Connect Codex to Kreatix

Sign in with Kreatix

No key to copy: paste the address, sign in to Kreatix and press Allow.

  1. Run once in a terminal: codex mcp add kreatix --url https://api.kreatix.cc/mcp
  2. Run codex mcp login kreatix, sign in to Kreatix in the browser and press Allow.
  3. Start codex and type /mcp to check that kreatix is listed.
codex mcp add kreatix --url https://api.kreatix.cc/mcp

With a key

For setups without sign-in. The key works like a password, so keep it to yourself.

  1. In Kreatix, open Settings > AI agent and create a key. It is shown once.
  2. Add the [mcp_servers.kreatix] table from the snippet to the end of ~/.codex/config.toml.
  3. To keep the key out of the file instead, run export KREATIX_API_KEY=YOUR_KEY in your shell and then codex mcp add kreatix --url https://api.kreatix.cc/mcp --bearer-token-env-var KREATIX_API_KEY.
  4. Check with codex mcp list, or with /mcp inside codex.
[mcp_servers.kreatix]
url = "https://api.kreatix.cc/mcp"
http_headers = { "Authorization" = "Bearer YOUR_KEY" }

What Codex can do on Instagram

A video from your Kreatix library or a public link, posted as a Reel; Instagram takes no text-only post.

SettingValuesNeededWhat it does
media_urlURLYesOne video: a link from your Kreatix library (list_posts shows it) or a public YouTube, TikTok, Instagram or Facebook post, which Kreatix imports first. Pictures and carousels are not scheduled.
captionstring (max 5000)NoThe Reel's caption. At most 30 hashtags and 20 @mentions, or schedule_post refuses the post.
cover_urlURLNoThe Reel's cover: a picture stored in Kreatix, such as a thumbnail_url from list_posts. With an imported link and no cover, the link's own thumbnail is used.

Ask in plain words

Ask inside the codex terminal app, or one-off from a script: codex exec "Which of my Kreatix pages got the most views this week?"

  • codex exec "Post this TikTok link as a Reel on all my Instagram pages tomorrow at 18:00."
  • codex exec "Schedule yesterday's video on my brand's Instagram for Friday 20:00 with the same cover."
  • codex exec "Do any of my Instagram pages have an alarm or need reconnecting?"

Instagram rules to know

  • Every Instagram post needs a video, and it goes out as a Reel.
  • A caption with more than 30 hashtags or 20 @mentions is refused before anything is scheduled.
  • Instagram processes the video first; if it is not ready within 30 minutes, the post fails with Instagram's reason.
  • Kreatix connects only professional Instagram accounts (Business or Creator).
  • If Instagram locks an account, it wants the owner to finish a check on instagram.com; reconnecting does not help.

Tips for Codex

  • Add default_tools_approval_mode = "writes" to [mcp_servers.kreatix]. Codex then asks before schedule_post, reschedule_post and cancel_post, and runs the reading tools straight away.
  • Set it up once: the Codex CLI, the IDE extension and Codex in the ChatGPT desktop app share ~/.codex/config.toml.
  • In the IDE extension you can skip the terminal: gear menu > MCP servers > Add server, choose Streamable HTTP, enter the address, save, select Restart extension, then Authenticate.
  • The agent checks the pages, caption and time with you before it posts. It cannot delete pages, read messages or change your account, and you can remove it any time in Settings > AI agent.

Questions

How do I post to Instagram from Codex?

Connect Codex to Kreatix once, as shown above. Then ask it to post: name your Instagram pages or a page group, the video or text and the time. Codex shows you the plan and posts after you say yes.

Can my agent post photos or carousels to Instagram?

No. Through the agent, Kreatix schedules a video or a text post, and Instagram takes no text-only post. Photos and carousels go out from Kreatix with Publish now.

Why did the agent refuse my caption?

Instagram takes at most 30 hashtags and 20 @mentions in a caption. Kreatix counts them before scheduling, so the post is stopped up front instead of failing on Instagram later.

What if Instagram is slow to process my Reel?

Kreatix keeps checking for up to 30 minutes, and your other posts keep going out meanwhile. If Instagram still has not finished, the post fails with Instagram's own reason.

Will my agent know if an Instagram page is in trouble?

Yes. list_channels shows Kreatix's page alarm when several of the page's newest videos in a row stay under 50 views, and marks a page Instagram has locked or closed. Kreatix tells the agent to raise these with you before planning posts there.

Can I sign in on a machine without a browser?

Yes. Run codex mcp login kreatix --no-browser, open the printed link on another device, sign in and press Allow, then paste the full redirect URL back into the terminal.

Does the config go in my home folder or the project?

~/.codex/config.toml works everywhere. A project's .codex/config.toml also works, but only in projects you trust.

Kreatix schedules one video to every page you run, each with its own platform settings.

Start free, then connect Codex

Codex with other platforms

Instagram from other agents