Create Instagram carousel post
Input
caption optionalPost caption; empty for none. Max 2200 chars.
Default: ""image_urls optional2-10 direct image URLs, in carousel order. 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.
images_path optional2-10 paths to local images, in carousel order, attached straight from disk via CDP — no encoding, no size ceiling. Resolved on the machine RUNNING THE BROWSER, and only works on a device whose browser PERMITS DOM.setFileInputFiles. An extension-paired browser does NOT: it refuses with "Not allowed", and nothing gets around that (builtins.uploadFile with format:file inputs is the same CDP call underneath). Absolute paths only. Takes precedence over image_urls.
images_base64 optional2-10 images as base64 (bare payloads or full data: URLs), in carousel order, decoded in-page — needs no network and no CDP. CAPPED ACROSS ALL SLIDES COMBINED at ~96KB of base64, i.e. about 72KB of image bytes total (~7KB per slide at 10 slides): the MCP endpoint answers `Payload Too Large` above that, before this script runs, so nothing here can report it. Real photos will not fit — use image_urls. Line-wrapped output, base64url and missing padding are all accepted. Takes precedence over images_path and image_urls.
Output
url requiredPermalink of the new carousel post.
code requiredpk optionalcaption optionalimages_bytes optionalTotal bytes injected into the composer. null for images_path, where the browser opens the files itself and the bytes never cross the driver boundary.
carousel_count optionalcarousel_media_count as Instagram reported it on configure_sidecar — the authoritative count of slides that were actually published.
