Instagram API
Skill by CraftOS-dev
Instagram API posts photos, stories, Reels, carousels and Threads posts using the official Meta Graph API. It is aimed at users who want to publish to Instagram or Threads through shell scripts.
Install Instagram API
Built from the published package, never by AI.
git clone --depth 1 https://github.com/CraftOS-dev/CraftBot /tmp/CraftBot && mkdir -p ~/.claude/skills && cp -r /tmp/CraftBot/skills/instagram-api ~/.claude/skills/instagram-apiRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/CraftOS-dev/CraftBot /tmp/CraftBot && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/CraftBot/skills/instagram-api ~/.gemini/antigravity-cli/skills/instagram-apiAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The Instagram API skill posts content to Instagram and Threads using the official Meta Graph API. It includes five shell scripts that cover feed posts, stories, Reels, carousels and Threads posts. The Graph API only accepts public URLs, so the skill uploads local media to Imgur to create temporary public links before publishing.
Setup requires a Meta developer app with the Instagram Graph API product, an access token, an Instagram Business Account ID and an Imgur Client ID. Threads posting needs a separate Threads token and user ID and is optional. The skill suits users who want to publish to Instagram or Threads from the command line. Failed API calls are logged under ~/logs/sns/.
Written from the project's SKILL.md and checked against it.
What it can do
- post-feed.shPublishes an image to the Instagram feed with a caption file.
- post-story.shPublishes an image as an Instagram story.
- post-reels.shPublishes a video as an Instagram Reel with a caption file.
- post-carousel.shPublishes a multi-image carousel post with a caption file.
- post-threads.shPublishes a text post to Threads, with an optional image URL.
What you need
- Meta developer app with the Instagram Graph API product
- Instagram Business Account ID
- Access token with instagram_basic and instagram_content_publish permissions
- Imgur API Client ID
- Threads access token and user ID (optional, for Threads posts)
Try asking
- Post ./photo.jpg to my Instagram feed with the caption in ./caption.txt
- Share ./story.jpg as an Instagram story
- Publish ./reel.mp4 as a Reel with the caption in ./caption.txt
Good to know
- Instagram only accepts public URLs, so local files are uploaded to Imgur first.
- Long-lived access tokens are valid for 60 days.
- Reel video processing can take several minutes.
- Failed API calls are logged under ~/logs/sns/.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/instagram-api/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md4 KB -
_meta.json635 B -
scripts/post-carousel.sh6 KB -
scripts/post-feed.sh3 KB -
scripts/post-reels.sh6 KB
Show all 7 files
-
scripts/post-story.sh2 KB -
scripts/post-threads.sh4 KB
Alternatives to Instagram API
All alternatives →Generates 3 to 10 second short-form video clips for product reveals, motion teasers and ambient loops. It defaults to Seedance 2 and also works with Kling 3 and 4, Veo 3 and Sora 2, saving one MP4 to the project folder.
Builds a strategic SEO plan for new or existing websites, covering competitors, architecture, content, technical setup and a 12-month roadmap. It is aimed at people who need an SEO strategy rather than a one-time audit.
Audits and rewrites a LinkedIn profile for people who want their headline, About section and other parts improved. It scores the headline, audits the whole profile from 0 to 100 and drafts an About section that works above the fold.
Builds a LinkedIn plan covering content pillars, positioning, posting cadence and whether to start a newsletter. Aimed at people pursuing a career change, consulting, thought leadership or similar goals on LinkedIn.
Guides an AI assistant to design or rewrite a single-offer landing page for SaaS, apps and services. It covers structure, layout, copywriting, conversion tactics, and SEO/AEO.
Analyzes your own exported LinkedIn post data to show which posts worked, test whether a pattern is real, and plan posting experiments. Built for people who want to understand their own LinkedIn numbers. It refuses to draw conclusions from fewer than 10 posts.
Compare with video-shortform, seo-plan or linkedin-profile
Instagram API: common questions
Can it upload local files directly to Instagram?
No. The source says Instagram only accepts public URLs, so the skill creates temporary public links through Imgur.
How long does the Instagram access token last?
The source says a long-lived token exchanged from the Graph API Explorer is valid for 60 days.
Where can I find logs if a post fails?
The source says API call failures are logged in the ~/logs/sns/ folder.
How do I install Instagram API?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is Instagram API free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is Instagram API safe to use?
It scores 76 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to Instagram API?
Similar skills: video-shortform, seo-plan, linkedin-profile, linkedin-strategy.
