App Logo
instagram.com

Create Instagram post

Publish a single-image Instagram feed post from an image URL, inline base64 bytes, or a local file path (image_path, which needs a CLI-run device). Drives the web composer (New post → crop → edit → caption → Share) and returns code, pk, url, caption. Supersedes create_post_from_file.

Input

caption optional

Post caption; empty for none. Max 2200 chars.

Default: ""
image_url optional

Direct URL of the 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 — the general answer, and the ONLY route for a photo of ordinary size on an extension-paired device.

image_path optional

Path to a local image file, 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 a format:file input is the same CDP call underneath). Absolute paths only. Takes precedence over image_url.

image_base64 optional

The image bytes as base64 (a bare payload or a full data: URL), decoded in-page — needs no network and no CDP, so it is the only local-file route on an extension-paired device. CAPPED AT ~96KB OF BASE64, i.e. about a 72KB file: the MCP endpoint answers `Payload Too Large` above that, before this script runs, so nothing here can report it. A camera photo will not fit — use image_url. Line-wrapped output, base64url and missing padding are all accepted. Takes precedence over image_path and image_url.

Output

url required

Permalink of the new post.

code required

Shortcode of the new post.

pk optional

Media pk.

caption optional
image_bytes optional

Size in bytes of the image injected into the composer. null for image_path, where the browser opens the file itself and the bytes never cross the driver boundary.

Start building not clicking