Upload an image or video
upload_imageUpload 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, MOV, M4V, MKV, MPEG, WMV, FLV, 3GP video. Provide exactly one of: url for a public link the server downloads itself (up to 200MB), or base64 + filename for in-memory content (up to 15MB). Uploading a file your account already uploaded returns that upload with duplicate: true. Works without an API key too (anonymous, like the website: unlisted or private only, lower limits, deleted only through the returned delete_url). Returns three URLs for the same upload: a raw storage link (path), a direct embeddable link (src) and a shareable page link (direct). Errors (oversized/unsupported file, bad API key, rate limit) come back as a normal tool error.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "upload_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public http(s) link to an image or video; the server downloads it (up to 200MB). | |
| title | No | Title shown on the upload page (up to 90 characters). | |
| base64 | No | Base64-encoded file contents (a data: URL also works), up to 15MB. Requires `filename`. | |
| filename | No | Filename with extension, e.g. chart.png. Required with `base64`. | |
| expiresIn | No | Auto-delete after this many seconds (60 to 31,536,000 = 1 year). Omit for a permanent upload. | |
| visibility | No | unlisted (default): file and page work for anyone with the link, not listed. private: file only - the page link sends everyone but the owner to the file. public: listed on the site and indexable. | |
| description | No | Description (up to 500 characters). | |
| allowDuplicate | No | Store a new copy even if this account already uploaded the exact same file. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Unique identifier for this upload. Pass to get_upload / update_upload / delete_upload. | |
| src | Yes | Permanent direct/embeddable file URL - use this for <img>/<video> src attributes and when saving the link. | |
| path | Yes | Storage URL of the file as uploaded. It can change shortly afterwards when the file is converted (WebP/MP4) - store `src` instead. | |
| size | No | File size in bytes as stored. | |
| type | Yes | ||
| thumb | No | 280px wide WebP thumbnail (for a video, its first frame), or null. | |
| title | No | Title, or null. | |
| width | No | Width in pixels, or null if unknown. | |
| 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. | |
| height | No | Height in pixels, or null if unknown. | |
| locked | No | True if the upload is password-protected. | |
| duplicate | No | True if this exact file was already on your account and that upload was returned. | |
| delete_url | No | New uploads only: a private link that deletes the upload without an API key. Shown once - give it to the user if they may want it. | |
| expires_at | Yes | ISO 8601 auto-delete timestamp, or null if the upload never expires. | |
| visibility | No | private: file only, no page for others. unlisted: file and page work for anyone with the link. public: listed on the site. | |
| description | No | Description, or null. |