Upload Image
upload_imageTurns an image into a public image URL you can pass to any tool that needs one. If the photos are already LOCAL FILES in your own environment (the user attached them to the chat) and you can run shell commands, call upload_image() with no arguments to get an upload_url, POST the files there yourself (curl -sS -F file=@photo1.jpg -F file=@photo2.jpg <upload_url>, up to 10 files), then call upload_image(ticket=...) for the public URLs — the user does not have to drag anything. Otherwise: one public image URL you can pass to any tool that needs one (gbp_create_post image_url, gbp_upload_photo, upload_image_asset, upload_meta_image...). FOUR modes, in the order you should prefer them: (1) source_url=... when the photo is ALREADY somewhere on the web — the customer's own website, a WordPress media library, a Drive or Dropbox share link: we fetch it server-side and re-publish it, so NOTHING has to pass through the chat and the user does not have to do anything. Use this first whenever a URL exists. (2) call with NO arguments to get an upload link — give that link to the user, they drop their files, then call this tool again with the returned ticket. ONE link takes up to 10 photos: the user can drag all of them in at once and the link stays open for 45 minutes, so never ask for several links for several photos. (3) ticket=... to read the drop: returns images (one entry per uploaded file, each with its own public URL) plus count, and tells you whether the user can still add more. (4) image_base64=... only for a SMALL image already in the conversation — a real photo is tens of thousands of characters of base64 and will not fit in one model message, so for anything camera-sized use mode 1 or 2 instead. JPG or PNG, at least 250px on the short edge, up to 5 MB each. URLs stay reachable for 7 days, which is what image hosts like Google need because they fetch them asynchronously.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ticket | No | ||
| filename | No | ||
| source_url | No | ||
| image_base64 | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||