upload_image
Upload an image to Substack's CDN using a base64 string, local file, or public URL, and receive a hosted image URL ready for posts.
Instructions
Upload an image to Substack's CDN. Provide exactly one of image_base64 (a base64 data URI), image_path (a local file path) or image_url (a public HTTPS image to download first). Returns a hosted image URL that is publicly fetchable by anyone with the link (an unlisted asset — not attributed to you or added to your feed).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image_url | No | HTTPS URL of a PNG, JPEG, GIF, WebP or AVIF image to download and upload. Sent without Substack cookies; private, loopback, link-local, metadata and reserved destinations are refused at connection time and on every redirect (at most 3). Limits: 5 MB and 15 seconds; the bytes must match the declared type. Not available on every deployment. Mutually exclusive with image_base64 and image_path. | |
| image_path | No | Absolute path to a local image file (e.g., "/Users/me/pic.png"). Read and encoded automatically; MIME type inferred from the extension. Mutually exclusive with image_base64 and image_url. | |
| image_base64 | No | Base64-encoded image with data URI prefix (e.g., "data:image/png;base64,..."). Mutually exclusive with image_path and image_url. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image_url | Yes |