Automate

Automate Instagram with Gemini CLI

Instagram is one of only two places here where images and video can share a post, and the only one that will not take a PNG.

One command
$ gemini mcp add --transport http antwork https://api.antwork.io/mcp

Gemini CLI adds Antwork over HTTP with one command, then authorizes with its own slash command. Two lines and you are posting from the terminal.

Connect it

01Authorize with /mcp authRun /mcp auth antwork inside the Gemini CLI. It opens an OAuth consent screen in your browser; there is no key to paste into a config file.
02Connect the social accountAsk it to connect your account and it returns a connect link per platform. Authorize once and Antwork refreshes that token for you.
03Draft, then publish as a second stepDrafting and publishing are separate tool calls. The agent writes first and only publishes when you say so, which matters more in a terminal where there is no card to review.

What you can say once Instagram is connected

Draft an Instagram caption for this photo in my voice, with three hashtags at the end.
Turn this carousel of five images into an Instagram post and schedule it for Saturday.
Rewrite my last Instagram caption with a stronger first line.
Which of my Instagram posts got the most engagement this month?

What is different about Instagram

Only here

JPEG only

Instagram accepts .jpg and .jpeg and nothing else. A PNG, which is what most design tools export by default, is refused. Antwork checks the extension when you attach rather than letting you find out at publish.

Only here

A carousel does not have to be all one thing

Up to ten items in a post, and they can be images and video together. Most platforms here force you to pick one kind; this is not one of them.

Only here

There is no landscape

Image ratios are 4:5, 1:1 and 1.91:1, and video is 9:16, 1:1 or 4:5. Nothing 16:9 fits, so a cut made for YouTube needs recutting before it comes here.

Only here

Fifteen minutes, ten times over

Each video can run fifteen minutes at 300 MB, and ten of them can sit in one post. The limit you will hit first is almost never the length.

Instagram limits, as the server enforces them

Max characters2,200
Media per post10
Countingcode points

Posts are capped at 2,200 characters, and the cap is enforced when you schedule or publish, not silently truncated.

Image.jpg, .jpeg
Max size
8 MB
Per post
10
Ceiling
up to 1440x1440 · 4:5 / 1:1 / 1.91:1
Video.mp4
Max size
300 MB
Per post
10
Ceiling
up to 1080x1920 · 15 min max · 9:16 / 1:1 / 4:5
  • 10 media items per post, in total.
  • Images and video can share a post.

These numbers are read at build time from the same rules file the publishers validate against, so this page cannot claim a limit the server does not enforce.

Questions

Do I need an API key to connect Gemini CLI?
No. Antwork connects over OAuth — you approve a consent screen in the browser and you are done. There is no key to generate or paste into a URL, which is how most social MCP servers handle it.
Do I need a paid account?
No. The free tier covers one workspace, two connected accounts and 20 posts per cycle, and there is no plan gate on MCP access.
Will Gemini CLI post without showing me first?
Not unless you ask it to. Drafting and publishing are two separate steps: the agent writes, renders the post card, and only publishes when you confirm.
Does the writing sound like AI?
Antwork learns a voice profile per connected account by reading what you have already published there, and the agent drafts from that profile. On Instagram that includes writing to the length the format rewards, up to 2,200 characters.
Keep going

Never leave Gemini CLI to post again.

One command, one consent screen, and Instagram is something you can just ask for.

Connect your AI