media.upload
Transcodes and permanently saves image(s) into the user's HamroLink Media Library (Cloudflare R2 CDN as optimized WebP). Supported low-token inputs: (1) ChatGPT Apps SDK: pass attached or AI-generated image(s) via 'file' or 'files' (uses openai/fileParams signed download_url); (2) Any client with a public or temporary signed HTTPS image URL: pass 'url' or 'download_url'. NEVER encode or pass raw base64 image strings in tool arguments (wastes excessive tokens). If your client cannot supply 'file'/'files' or an HTTPS URL (e.g., Claude offline sandbox or Gemini web chat), ask the user for a public HTTPS image URL or to upload directly in HamroLink's Media Library UI, then call 'media.list'.
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": "media.upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public image URL (e.g. Unsplash stock photo) for HamroLink backend to download, optimize, and host. | |
| file | No | Attached or AI-generated image file object from ChatGPT Apps SDK (automatically resolved via openai/fileParams with download_url and file_id). | |
| name | No | Optional image filename or label (e.g. 'the-ai-paradox.png') | |
| files | No | Optional batch of up to 10 attached or AI-generated image file objects from ChatGPT Apps SDK. | |
| folder | No | Destination folder in the Media Library (default: 'uploads') | |
| siteId | No | Optional Site ID to associate media with | |
| download_url | No | Temporary signed HTTPS download URL where HamroLink backend can fetch the image binary directly. |