upload_media_from_url
Upload an image or video for a social media post (Facebook, Instagram, TikTok, YouTube, X) into the user's Postemi media library; it comes back as a hosted { id, path } to attach to a post.
Accepts ONE of: a file attached or generated in this chat (preferred; pass it in the file field), a public https URL, or a complete data URL you already hold (data:image/png;base64,...).
Keep the original quality: never put a file into a base64 argument, resize, recompress or truncate it to make it fit; a truncated data URL is refused because the image is decoded before it is stored. Call this ONCE per image, pass the returned PATH (not the id) as the create_post attachment, and do not regenerate an image that uploaded. After a successful upload, do not ask the user for the same file again.
If the file transfer fails, or the answer has lowResolution, say so in one sentence and offer create_upload_link: an upload card where the user drops the original in full quality. Videos the chat cannot pass on go through create_upload_link directly.
Magyarul: kép vagy videó feltöltése posztoláshoz.
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_media_from_url"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | A public https URL, OR a data URL (data:image/png;base64,...) of an image you generated yourself. | |
| file | No | The original image or video attached or generated in this ChatGPT conversation. Prefer this native transfer and preserve its original quality. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| path | No | ||
| error | No | ||
| width | No | Pixel width of a stored image. | |
| height | No | Pixel height of a stored image. | |
| lowResolution | No | Set when the image is small for a social post. Tell the user, and offer create_upload_link so they can upload the original file in full quality. |