Publish a photo post
publish_photoPublish or schedule a single-image Instagram feed post, auto-converting and fitting images to Instagram's aspect ratio. Confirm first; it runs in the background, so check get_publish_status.
Instructions
Publish (or schedule) a single-image feed post. Images are converted to JPEG and fitted into Instagram's 4:5 to 1.91:1 range automatically. Needs the user's confirmation. Runs in the background; follow get_publish_status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fit | No | Reframing when converting: keep (only clamp into the allowed range), crop (fill the frame from the centre) or blur (whole frame over a blurred fill). Reels/stories target 9:16. | |
| url | No | Public http(s) URL of the file instead of a local path. | |
| account | No | Which connected account: @username or Instagram user ID. Omit to use the default account. | |
| caption | No | Caption (max 2,200 characters, 30 hashtags, 20 @mentions). The first ~125 characters show before 'more'. Captions can't be edited through the API after publishing. | |
| prepare | No | Convert to Instagram's specs with ffmpeg first (JPEG, H.264/AAC MP4, allowed aspect ratio and length). Default true. | |
| alt_text | No | Accessibility description (max 1,000 characters). | |
| template | No | Template from list_templates: adds header/footer, hashtags, first comment, collaborators. | |
| file_path | No | Path to the file on this computer, e.g. ~/Pictures/launch.jpg. | |
| user_tags | No | People to tag in the media. | |
| publish_at | No | Schedule: ISO 8601 date-time with timezone, at least 10 minutes and at most 75 days ahead. Instagram has no API scheduling, so this computer (or the background service) publishes it then; if the computer is off and the time passes by more than 2 hours, it is not published late (reschedule or resume_publish). | |
| location_id | No | Facebook Page ID of a place (see find_location). | |
| wait_seconds | No | Wait this long for publishing before returning; then follow get_publish_status. | |
| collaborators | No | Up to 3 usernames invited as collaborators (they must accept in the app). | |
| first_comment | No | Posted as the first comment right after publishing (hashtags, credits, links). | |
| is_ai_generated | No | Self-disclose that the content was made or edited with AI (shows an AI label). | |
| confirmation_token | No | Only after the user approved: the confirmation_token returned by the previous call with identical arguments. |