Instagram · from Codex

Post to Instagram from Codex.

Instagram will not take a post without a picture, and in Codex the picture is a file. Getting it there takes one step Codex will ask you about.

Instagram refuses any post without an image or video, so the first thing Codex needs is the picture, and in a repository that is a file: a screenshot in the docs, an export from a design tool, an image a build step produced. Nothing in Codex’s documentation hands a file straight to a tool, so it uses our upload tool instead: it asks for a short-lived upload link, sends the file’s bytes to it with a shell command, and passes the public address it got back into the post.

Showing Codex the picture with --image, or pasting it into the composer, lets it write a caption from what is actually in it; the upload is still made from the file on disk. The draft is then checked against Instagram — picture present, caption within 2,200 characters, carousel within 10 items — and published through Meta’s API on the professional account, Business or Creator, that you connected in a browser.

Asking Codex for an Instagram post

The Instagram ceilings in this exchange come from the same table the publisher enforces — the conversation is drawn, the numbers are not.

Codex10:48

› Set me up — what do you need?

Just the accounts. Connect them in the browser once and I can publish from here after that.

› Done, connected

I will tell you before publishing if a network cannot take what you wrote.

› Good. Drafting the launch note now

Send it over and I will check it before anything goes out.

› post assets/launch-card.png to instagram with a caption about the new themes, look at the image first so the caption matches

--image assets/launch-card.png · one account

1S

The card fits Instagram’s shape. Two steps need your approval:

Instagram caption2,200fits
Image or videorequired — attached
Reply chainsjoined into one post
Attachments allowed10per post

Uploaded once you allowed the command, then published to Instagram.

› _

What Instagram allows

Read from the same table the publisher enforces, so this cannot drift from what actually happens when you press send.

Caption limit
2,200 characters
Post with no image or video
Refused by Instagram
Reply chains
No — the parts are joined into one post
Images or video per post
10
Image formats
Anything we accept for upload

Codex, on the other networks

Instagram, from the other agents

Publishing to Instagram from Codex

Seen for the caption, uploaded for the post

Passing the picture with --image lets Codex describe what is in it, while the bytes that reach Instagram still come from the file on disk, through an upload link.

The upload asks first

Codex’s default sandbox keeps commands off the network, so the step that sends your file to the upload link is shown to you and waits before it runs.

Wrong shapes fixed locally

Codex can read an image’s dimensions and, with a tool already installed, crop or pad a copy to a shape Instagram accepts before any network step happens.

The publish prompt is the brake

A published Instagram post cannot be removed through the API, so the approval Codex asks for before publishing is the last point at which to change your mind.

How it works

1

Connect once

~2 min

Link the accounts you use in a browser. OAuth, no passwords typed into a chat, no API keys to paste anywhere.

ChatGPT

Claude

Cursor

2

Ask, in your own words

one sentence

Tell Codex to publish to Instagram, now or on a day you name. No dashboard, no tab switch.

3

Read the receipt

per network

One line per network — what landed, what failed and why, and what genuinely could not be determined.

The upload is the one step that needs the network

Codex runs shell commands in a sandbox that, by default, has no network access, and under its usual Auto setting it asks before running a command that needs some. Getting a picture from disk to Instagram is exactly that command: our upload tool hands Codex a link and headers, and Codex has to send the file’s bytes there itself. So expect a prompt for the upload as well as for the publish. In an unattended run nobody answers it and the upload fails inside the sandbox; either switch network access on for that job in config.toml, or give the post a public https link to an image you already host.

A rule of Instagram from Codex, not ours and not the network’s. From documentation, checked 2026-11-23.

When this is the wrong tool

If the photo is on your phone, posting it from the phone is quicker; from Codex it first has to be on the machine. Stories, Reels and anything beyond feed posts and carousels are not part of this, and a post that has gone out can only be taken down in Instagram itself.

Questions people actually ask

Why does Codex ask permission before uploading my image for Instagram?

Because sending the file to the upload link is a shell command that reaches the network, and Codex’s default sandbox keeps commands offline unless you approve them. Approve that command when it comes up, or enable network access for the workspace in config.toml.

Is an image I pass to Codex with --image what gets posted to Instagram?

Codex’s documentation describes --image as input for the model, not as something handed on to tools, so name the path as well. The post is built from the file on disk, uploaded through 1Social, while the attached picture helps Codex write a caption that matches it.

Which Instagram accounts can Codex post to?

Professional ones, Business or Creator, since Instagram only allows publishing through its API on those. A personal account can be switched to Creator in the Instagram app at no cost and then connected in a browser like any other.

Something else? Ask us — a person answers.

Read next

Start where you already work.

Connect an account and post your first update in about two minutes. Every plan starts with a free trial.

Posts go out through each network’s official API — not scraping.