Docs

Built-in tools›Preview

Upload image

preview_upload_image
Group
Preview
Turned on by
Its own switch on the Tools page of Conversation settings.
Approval
Reviewed: writes and open-ended actions ask for approval unless the security level or an earlier “Always allow” covers them.
Profile key
tool.preview_upload_image.description

Puts an image from this conversation into a file input on the conversation's preview page, as a real file.

Only models with the Vision capability get this tool (see model properties).

When it asks you

Asks at Manual and Accept edits, because the image leaves the conversation; Always allow is not offered. If you have been using the page yourself, you hand it back first in the pane; on a signed-in page, that takeover needs your approval at every security level. See Browser and preview.

Good to know

  • selector is optional. Without it, the image goes into the file chooser the page has open, or else into the first file input on the page. A hidden file input works.
  • While a file chooser is open, the model's other page tools are refused until this tool fills it.

Parameters

ParameterTypeDetails
image_id required
Image number
stringThe conversation image number, e.g. 3, #3, or [Image #3]. A 64-character hex digest also resolves.
filename
File name
stringThe file name the page sees. Defaults to the attachment's own name.
selector
CSS selector
stringCSS selector of the target file input. Omitted, the image goes into the file chooser the page has open, or else into the first file input on the page, hidden or not.
serverId
Server ID
stringServer ID

Edit this page on GitHub