How to post to Instagram from Gemini CLI
gemini mcp add -s user --transport http postwire https://postwire.io/api/mcp, type /mcp auth postwire to sign in, connect your Instagram Business or Creator account once, and ask "post ./launch/demo.mp4 to Instagram as a Reel with a caption from CHANGELOG.md". Gemini writes the caption with generate_posts, shows it to you, and publishes with post_to_social or queues with schedule_post: one photo is a feed post, one video is a Reel, and 2 to 10 photos and videos are a carousel. PostWire posts through Meta's official Instagram API with its own approved app, so you need no Meta developer app, and Log in with Instagram works without a Facebook Page. The free plan includes Instagram: 1 business, 10 posts a month, 5 AI drafts a day, 2 networks per post, no card.Gemini CLI asks before it runs each PostWire tool, so nothing reaches your Instagram until you say yes. A scheduled post goes out from PostWire's servers with your terminal closed. PNG screenshots and AI-generated images work as they are: PostWire converts them to the JPEG Instagram's API takes.
Updated . Written from PostWire's own code; vendor prices read on Nov 11, 2026. Live networks: TikTok, Instagram, YouTube, LinkedIn (personal profiles), Facebook Pages, Bluesky, Mastodon, Telegram, Discord, and X on paid plans.
Set it up and post, step by step
Prompt to copy once Instagram is connected: Upload ./launch/slide-1.png, slide-2.png and demo.mp4, write an Instagram caption for the v2.4 launch from CHANGELOG.md, show it to me, and schedule the carousel for Tuesday at 6pm.
- Add PostWire to Gemini CLI
In your terminal (not inside Gemini) run
gemini mcp add -s user --transport http postwire https://postwire.io/api/mcp.-s usersaves it in~/.gemini/settings.jsonfor every folder; without it Gemini CLI saves it for the current project only. The URL is PostWire's hosted MCP server: there is nothing to install. - Sign in
Start
geminiand type/mcp auth postwire. Your browser opens PostWire's sign-in: your email and a 6-digit code, which also creates a free PostWire account if you have none, with no password and no card./mcpthen lists postwire as connected. - Connect Instagram
Ask "connect my Instagram". Gemini calls
create_connect_linkand prints a one-hour link; open it and choose Log in with Instagram (no Facebook Page needed) or connect through a Facebook Page you manage. Instagram's API publishes only from Business or Creator accounts — switching a personal account is free, in the Instagram app's settings. PostWire never sees your password. - Give the post a photo or a video
Instagram refuses text-only posts, and it fetches media from a link, so a file on your disk goes through an upload page: Gemini asks for one (
create_upload_link), you pick the file there, andget_uploaded_filehands Gemini its link (up to 100 MB on the free plan and 1 GB on paid plans). A public https link works too, asphoto_urlorvideo_url, or a list inmediafor a carousel. - Ask for the caption
"Write the Instagram caption for the launch."
generate_postsreturns a draft and publishes nothing: the hook in the first line, a short caption, at most 5 hashtags at the end, within Instagram's 2,200 characters. Ask for the TikTok or LinkedIn version in the same sentence and each comes back written for its own network. - Post now, or schedule it
Say "post it" and Gemini calls
post_to_social. Say "schedule it for Tuesday at 6pm" and it callsschedule_post, up to 365 days ahead, or withrun_at: "next_slot"for your next free posting hour. Two or more items inmediamake a carousel; Instagram crops every slide to the first one's shape. Gemini CLI shows the call and waits for you to allow it. This is the call:{ "name": "schedule_post", "arguments": { "platforms": ["instagram"], "per_platform": { "instagram": { "text": "v2.4 is here 🚀 Dark mode, 2x faster sync, 14 fixes. Swipe for the demo 👉 #buildinpublic #saas" } }, "media": [ { "url": "https://postwire.io/m/…/slide-1.png", "type": "image" }, { "url": "https://postwire.io/m/…/slide-2.png", "type": "image" }, { "url": "https://postwire.io/m/…/demo.mp4", "type": "video" } ], "run_at": "2026-11-17T18:00:00-05:00" } } - Check that it went out
Instagram processes a video before it can be published. If that takes longer than the call can wait, the result says
processingand PostWire publishes it on its own a few minutes later;get_post_statusorlist_scheduled_postsshows when it is live.
"What's scheduled on Instagram?" calls list_scheduled_posts and "cancel Tuesday's post" calls cancel_scheduled_post; the same queue is on the dashboard's Queue page. Prefer to set it up by hand? Open the dashboard, connect Instagram under Accounts and copy your key under API & MCP. All Gemini CLI clients: Gemini CLI setup.
Ways to post to Instagram from Gemini, side by side
How each service plugs into Gemini and what it costs to start, read on its own Gemini, Instagram and pricing pages on Nov 11, 2026.
| Service | How it plugs into Gemini CLI | Sign-in | Instagram on the free start | Cheapest paid plan |
|---|---|---|---|---|
| PostWire | gemini mcp add with https://postwire.io/api/mcp | /mcp auth postwire in the browser, or a key header | Yes — free plan: 1 business, 10 posts a month, 5 AI drafts a day, 2 networks per post, no card | $19/mo — 3 businesses, every network in each post |
| Postiz | gemini extensions install with its GitHub extension | Browser sign-in on the first call | 7-day free trial | $29/mo — 5 channels |
| Upload-Post | A block in ~/.gemini/settings.json with its MCP URL | An API key in a header | Free plan of 10 uploads a month; its free-plan network list names Instagram | $24/mo — 5 profiles |
Checked on Nov 11, 2026 (2026-11-11) on each vendor's own pricing or docs page, linked in the first column and below. Monthly billing in USD unless noted. "Not listed" means we could not find it on their page, not that it is missing.
Where PostWire is ahead
- A free plan with no time limit: 10 posts a month, no card. Postiz starts with a 7-day trial.
- The cheapest paid plan here: $19 a month for 3 businesses, each with its own Instagram account. Upload-Post $24 for 5 profiles, Postiz $29 for 5 channels.
- Sign in without pasting a key into a config file:
/mcp auth postwireopens the browser, and the key is there for scripts that need it. - The caption is written for Instagram:
generate_postswrites a hook-first caption with at most 5 hashtags and, from the same launch, the TikTok caption and the YouTube title in one call. - PNG straight from a screenshot or an image model works: PostWire converts it to the JPEG Instagram requires.
- A slow video does not fail the post: when Instagram is still processing a Reel, PostWire publishes it on its own once it is ready.
- Postiz — Schedule Social Media Posts with Gemini ("One command installs the Postiz extension in Gemini CLI": gemini extensions install https://github.com/gitroomhq/postiz-agent; "Gemini opens your browser to sign in to Postiz"; Instagram and LinkedIn in its platform list; "Postiz starts with a 7-day free trial, then plans run from $29 per month for 5 channels"): postiz.com/gemini
- Postiz pricing ("Start with a 7-day free trial"; Standard $29 a month, 5 channels): postiz.com/pricing
- Upload-Post — Post to Social Media with Gemini ("Add one block to ~/.gemini/settings.json" with httpUrl https://mcp.upload-post.com/mcp and an "Authorization: ApiKey" header; "Start free, no card"): www.upload-post.com/gemini-social-media/
- Upload-Post — Instagram MCP server ("publish Reels, photos, carousels and Stories to Instagram"; "a carousel of up to 10 items"): www.upload-post.com/mcp/instagram/
- Upload-Post llms-full.txt (Free plan: 10 uploads a month, no credit card, "platforms without TikTok (Instagram, LinkedIn, YouTube, Facebook, …)"; Basic $24 a month, 5 profiles): www.upload-post.com/llms-full.txt
- Gemini CLI docs — MCP servers (gemini mcp add, --scope, /mcp auth, httpUrl, headers, trust, includeTools): github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md
What to say in Gemini CLI, and what Instagram receives
| You say | Gemini calls | Instagram receives |
|---|---|---|
| "Post ./assets/team.png with a caption about the open day" | create_upload_link, generate_posts, then post_to_social | A feed post with the photo |
| "Post ./launch/demo.mp4 as a Reel" | create_upload_link, then post_to_social with video_url | A Reel |
| "Make a carousel from the three slides and the demo" | post_to_social with 4 items in media | One carousel of 3 photos and a video |
| "Schedule it for Tuesday at 6pm" | schedule_post with run_at | The same post, at that time |
| "Post this week's offer every Friday at noon" | create_recurring_post (paid plans) | The post, every Friday at noon |
| "Which of my Instagram posts did best?" | get_post_performance | Nothing: Gemini reads the likes and comments Instagram reports |
From a script: Instagram posts with Gemini CLI headless
Gemini CLI also runs without its chat screen: gemini -p "…" answers one prompt and exits, which fits a cron job or a CI step. Three settings matter there, all on the postwire entry of ~/.gemini/settings.json:
- Sign-in by key instead of the browser: copy your key in the dashboard under API & MCP and send it in a header.
- No one to press "allow":
"trust": truelets that server's tools run without asking and leaves every other tool asking as before. - Only the tools the job needs:
"includeTools"is an allowlist. With the list below Gemini can draft, upload and schedule, and it cannot publish on the spot, so every post from the script waits in the queue where you can still cancel it.
{
"mcpServers": {
"postwire": {
"httpUrl": "https://postwire.io/api/mcp",
"headers": { "Authorization": "Bearer YOUR_KEY" },
"trust": true,
"includeTools": ["generate_posts", "create_upload_link", "get_uploaded_file",
"schedule_post", "list_scheduled_posts"]
}
}
}
Then gemini -p "Write an Instagram caption for https://example.com/renders/today.mp4 and schedule the Reel for 6pm" queues it from a script. Without Gemini at all, the same Reel is POST /api/post with {"platforms": ["instagram"], "video_url": "…", "text": "…"} and your key: see the API docs.
Source: Gemini CLI's MCP docs, read Nov 11, 2026.
Instagram's rules Gemini works within
- Business or Creator accounts: personal accounts cannot publish through Instagram's API.
- Every post needs a photo or a video: one photo is a feed post, one video a Reel, 2 to 10 items (photos, videos or a mix) a carousel.
- JPEG only, for Meta: PostWire converts PNG, WebP and other still images to JPEG when it publishes, so screenshots and AI-generated images work as they are.
- Captions up to 2,200 characters; Stories carry no caption through the API.
- Videos are processed first: Instagram needs a moment before a Reel can go live, and PostWire finishes the publish on its own when it is ready.
- Stories and trial reels go through PostWire's REST API with
"options": {"instagram": {"post_type": "story"}}or{"trial_reel": true}, with the same connected account: see network options.
More on the API itself: Does Instagram have an API?
What Starter ($19 a month) adds for Instagram
- No limit on the queue: ask Gemini to schedule a month of Reels and carousels in one go, instead of 3 at a time.
- 25 recurring posts:
create_recurring_postposts "this week's offer" every Friday, with versions of the caption used in turn. - 3 businesses, each with its own Instagram account and its own networks: name the business in the request and Gemini posts to that account.
- Every network in each post: the Reel also goes to TikTok, YouTube Shorts and Facebook from one request, with files up to 1 GB.
Plans and prices: pricing. Paid plans have a 14-day refund.
What it does not do
Gemini with PostWire publishes and schedules photos, Reels and carousels, and reports how your own posts did. It does not read or answer comments or DMs, it does not post a first comment on Instagram, and it does not tag people, products or a location. Stories and trial reels are a REST option today, not a field of the MCP tools. This guide is for Gemini CLI, Google's terminal agent; PostWire has not been tested as a custom app in the Gemini web app at gemini.google.com, so this page makes no claim about it.
Questions people ask
Can Gemini post to Instagram?
Yes, from Gemini CLI with an MCP server. Gemini has no Instagram access of its own; with PostWire added (gemini mcp add -s user --transport http postwire https://postwire.io/api/mcp), a sign-in with /mcp auth postwire and your Business or Creator account connected once, it writes the caption and publishes or schedules photos, Reels and carousels when you ask.
Do I need a Facebook Page or a Meta developer app?
No developer app: you connect to PostWire's approved Meta app. No Facebook Page either if you choose Log in with Instagram; the account must be a Business or Creator account.
Can Gemini CLI post a Reel or a carousel?
Yes. One video is a Reel, and 2 to 10 photos and videos in media are a carousel; Instagram crops every slide to the first one's shape. Stories and trial reels are set through the REST API (options.instagram.post_type "story", or trial_reel true).
How does Gemini get a video from my disk to Instagram?
Instagram fetches media from a link, so Gemini asks for an upload page with create_upload_link; you pick the file there and Gemini gets its link for the post. A file that is already online goes as its public https link.
Can Gemini CLI schedule Instagram posts?
Yes. It calls schedule_post with a time up to 365 days ahead, or "next_slot" for your next free posting hour, and PostWire publishes it at that time with Gemini closed. The free plan keeps 3 posts waiting at once; paid plans have no such limit.
Can I stop Gemini from publishing without asking me?
Yes, in two ways. By default Gemini CLI shows each PostWire call and waits for you to allow it. For scripts, set includeTools on the postwire entry in ~/.gemini/settings.json to a list without post_to_social: Gemini can then only draft and schedule, and a scheduled post can be cancelled from the Queue page before it goes out.
Does it work in the Gemini app at gemini.google.com?
This guide covers Gemini CLI, where PostWire's sign-in was checked. PostWire has not been tested as a custom app in the Gemini web app. In the browser, Claude and ChatGPT have PostWire in their app directories: see the Claude and ChatGPT guides.
How much does it cost?
The free plan includes Instagram and the MCP server: 1 business, 10 posts a month, 5 AI drafts a day, 2 networks per post, no card. Starter is $19 a month for 3 businesses, with no limit on the queue and 25 recurring posts; Pro is $29 for 10. Paid plans have a 14-day refund.
Try it on one business, free.
The free plan is 1 business, 10 posts a month, 5 AI drafts a day (about 20 a month) and 2 networks per post — every network connects free, no card, no time limit. Paid plans start at $19 a month and have a 14-day refund; Pro can be tried free for 7 days and Agency for 14, with a card at checkout and nothing charged that day.