Upload an image or video
upload_imageUpload an image or video and get back three shareable links: a raw storage link, an embeddable link, and a shareable page link. Accepts common image formats and video from a local path or base64 data.
Instructions
Upload an image or video to YourImageShare and get back a shareable link. Accepts JPG, PNG, GIF, WEBP, AVIF, BMP, TIFF, HEIC/HEIF images and MP4, WEBM, AVI video, 100KB-200MB. Provide path for a file on disk this server can read, or base64 + filename for in-memory content (e.g. no local filesystem access) - never both. Returns three different URLs for the same upload (see output fields): a raw storage link, a direct embeddable link, and a shareable page link - pick whichever fits where it's going. Errors (oversized/unsupported file, bad API key, rate limit) come back as a normal tool error, not a thrown exception.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Local file path to upload. | |
| base64 | No | Base64-encoded file contents. Requires `filename`. | |
| filename | No | Filename to use. Required with `base64`; inferred from `path` otherwise. | |
| expiresIn | No | Auto-delete after this many seconds (60 to 2,592,000 = 30 days). Omit for a permanent upload. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Unique identifier for this upload. Pass to delete_upload to remove it. | |
| src | Yes | Direct/embeddable file URL - use this for <img>/<video> src attributes. | |
| path | Yes | Raw storage URL - the literal file, e.g. i.yourimageshare.com/xxx.webp. | |
| type | Yes | ||
| direct | Yes | The shareable page URL (title, description, comments, share buttons). Despite the field name, this is NOT a direct file link - use `src` for that. | |
| expires_at | Yes | ISO 8601 auto-delete timestamp, or null if the upload never expires. |