Create Instagram post
Input
caption optionalPost caption; empty for none. Max 2200 chars.
Default: ""dry_run optionalWhen true, the whole composer flow runs — the image is attached, cropped, the edit step passed and the caption typed — and then the run stops on the step before Share. Nothing is published, and code/url come back null with dry_run true. Use it to verify an image and caption are accepted without spending a real, irreversible public post.
image_url optionalDirect URL of a single image to post (jpeg/png/gif/webp). Fetched by the browser itself, so it works on devices with no outbound network of their own. No size ceiling and no device requirement. Equivalent to passing a 1-item image_urls.
attachment optionalA single image to post, bound through the platform's own file channel and handed straight to the composer's file input. Carries the bytes outside the argument payload, so unlike image_base64 it is not capped near 72KB, and it works on every device. One image only — for a carousel use image_urls or images_base64.
image_urls optional1-10 direct image URLs, in order. A single URL publishes a normal post; 2 or more publish a carousel. Each is fetched by the browser itself, so this works on devices with no outbound network of their own. No size ceiling and no device requirement — the general answer, and the only practical route for a carousel of real photos.
image_base64 optionalA single image's bytes as base64 (a bare payload or a full data: URL), decoded in-page. Capped at ~96KB of base64, i.e. about a 72KB file. Prefer the `attachment` file input, which has no such cap. Line-wrapped output, base64url and missing padding are all accepted. Equivalent to a 1-item images_base64.
images_base64 optional1-10 images as base64 (bare payloads or full data: URLs), in order, decoded in-page. Capped across all images combined at ~96KB of base64 total. Real photos will not fit for more than one — use image_urls for a real carousel. Takes precedence over image_urls.
Output
url requiredPermalink of the new post. Null on a dry run, where nothing was published.
code requiredShortcode of the new post. Null on a dry run, where nothing was published.
caption_applied requiredTrue when a caption was requested and Instagram recorded it; false when one was requested but the published post carries none. Always true when no caption was requested. Always false on a dry run, where Instagram recorded nothing.
pk optionalMedia pk. Null on a dry run.
caption optionalThe caption Instagram actually recorded on the published post (read back from configure/configure_sidecar), NOT an echo of the input. Empty when none was requested, none landed, or the run was a dry run.
dry_run optionalTrue when this run stopped before Share and published nothing. The image was still attached and the caption still typed — only the final publish was skipped.
image_bytes optionalTotal size in bytes of the image(s) injected into the composer. null when attached via a *_path field, where the browser opens the file(s) itself and the bytes never cross the driver boundary.
carousel_count optionalcarousel_media_count as Instagram reported it on configure_sidecar. null for a single-image post, and null on a dry run.
