Vision
Vision lets fx inspect screenshots, diagrams, and other visual context during a task, even when the selected model cannot receive images directly.
How vision works
The selected model's capabilities determine where each image is analyzed.
Native vision
If the selected model supports both vision and file input, fx includes the attachment in the same request for the model to read directly.
Vision fallback
If the selected model lacks either capability, fx sends it a text-only request with references to the attached images. The model then calls the built-in vision tool, which sends those images to a fixed helper model, google/gemini-2.5-flash, through AI Gateway for OCR and image understanding.
The vision tool returns visual evidence to the selected model, which continues the task. The fallback model does not change with model, FX_MODEL, or the model selected in the shell. It is a separate model request with its own token usage and cost; see Additional model requests.
Add visual context
Interactive shell
Attach a file:
/image ./diagram.png/img is an alias. You can also type an image path directly in a prompt.
Use /images to inspect pending attachments or /images clear to remove them.
On macOS, attach an image from the clipboard:
/pasteHeadless requests
Attach an image to a one-off request:
fx ask --image ./ui.png "describe this interface"Repeat --image to attach more than one file.
Supported inputs
fx accepts PNG, JPEG, GIF, and WebP images up to 20 MiB each.
Permissions and trust
The vision fallback follows the active permission mode. It reads only images attached to the session or image paths you provided. Instructions found inside images are treated as untrusted content.