ig_publish_photo
Publish a photo post to Instagram using a publicly accessible image URL. Creates a media container and publishes it with optional caption and first comment.
Instructions
Publish a photo post to Instagram. The image_url must be publicly accessible. Flow: create media container → publish.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| caption | No | Post caption (max 2200 characters). Supports #hashtags and @mentions. | |
| imageUrl | Yes | Publicly accessible URL to the image. Must be JPEG or PNG. | |
| accountId | No | Instagram Business Account ID. Falls back to INSTAGRAM_BUSINESS_ACCOUNT_ID env var. | |
| accessToken | No | Instagram access token. Falls back to INSTAGRAM_ACCESS_TOKEN env var. | |
| firstComment | No | Optional first comment posted immediately after publishing. Use for hashtags or a call-to-action. NOTE: links in Instagram comments are NOT clickable — do not use for bare URLs. Requires an IG Business account. Max 2200 chars. |