publish_image
Publishes a single photo to an Instagram feed only after returning a preview and receiving user confirmation, preventing accidental posts.
Instructions
Publish a single photo to the user's Instagram feed. Public and immediate.
Use only when the user explicitly asks to post. ALWAYS call with confirm=false first: that returns a preview (image URL, exact caption, warnings) and sends nothing. Show it to the user and call again with confirm=true only after they approve.
Args: image_url: Public URL of a JPEG that Instagram can download (no login or expiring link). Max 8 MB, aspect ratio between 4:5 and 1.91:1, width 320-1440 px. caption: Post text. Max 2,200 characters, 30 hashtags, 20 @mentions. confirm: false = preview only (default); true = publish.
Returns: executed, summary, container_ids, and media_id + permalink once published. Limits: a capped number of API posts per rolling 24 hours (see get_publishing_limit). Publishing usually takes seconds but can take up to ~5 minutes while Instagram processes it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| caption | No | ||
| confirm | No | ||
| image_url | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | No | ||
| action | Yes | ||
| caption | No | ||
| summary | Yes | ||
| executed | Yes | False = preview only; nothing was sent to Instagram | |
| media_id | No | ID of the published post | |
| permalink | No | ||
| image_urls | Yes | ||
| container_ids | No | Media containers created (children first) |