Images
Two tools, list_images and upload_image, let the agent use your own photos on the app’s website, from photos you uploaded or from links and files you send in the chat.
A spa’s website looks far more real with photos of its own rooms, team and treatments. The agent uses your photos first; stock photos only hold the place.
list_images
Lists the photos you uploaded for the app, in the public/ folder of its file storage.
- Parameters:
project;folder: a sub-folder ofpublic/, such asgallery. All ofpublic/by default. - Returns:
images, up to 200, each withsrc,nameand size (KB);total. - When the agent calls it: before building the home page, a gallery or an about page.
src looks like /_files/public/<name>, with #w=480,800,… when phone-sized copies exist. The agent puts src as is in <Img src> or <img src>; the website kit’s Img turns the #w= part into srcset. The agent can’t see the photos, so it describes each one only from its file name or what you told it.
upload_image
Saves a photo you gave (a public https link, or a file you attached in the chat) into public/ of the file storage, with phone-sized copies.
- Parameters:
project.url: anhttpslink to the image; orfile: a file you attached.name: the file name to save as, such ashero-studio. Accented letters become plain ASCII.folder: a sub-folder ofpublic/, such asgallery.
- Returns: the
srcto use on the website,name, the image size and the smaller widths. - When the agent calls it: when you send a photo in the chat or paste a link to one.
Images only: jpg, png, webp, gif, avif or heic, up to 20 MB. A file with the same name is replaced. The photo is served on the app’s own domain at once, no deploy needed. The agent saves only photos you gave or asked for, never images copied from other sites.
You can also upload photos in the dashboard, on the project’s Files page.
Next steps
- blob: read and write files from the app’s server code.
- Plan limits: file storage per plan.