# Attaching Images

You can share images with the AI to help it understand what you want. This is especially useful for recreating a hand-drawn sketch, a whiteboard photo, or a screenshot of an existing diagram.

## How to Attach an Image

* **Paste from clipboard** – Copy an image and press **Ctrl+V** (Windows) or **Cmd+V** (Mac) while focused on the chat input.
* **Use the slash command** – Type `/attach` and pick a file from the file picker.

The attached image appears as a thumbnail next to your message before you send it.

<figure><img src="/files/nTkCYCGX7m4rkProrBz3" alt=""><figcaption></figcaption></figure>

## What the AI Does with an Image

When you send an image along with a diagram-related request (for example, *"Recreate this diagram"*), the AI will:

1. Analyze the image to identify nodes, connections, groups, and labels.
2. Generate a diagram that matches the image as closely as possible.
3. Show you a preview so you can review it before applying. See [Reviewing & Staging Changes](/models/work-in-the-app/ai/staging.md).

## Supported Formats

PNG, JPEG, WebP, GIF.

## Tips for Good Results

* **Crop the image** before attaching it so the AI focuses on the diagram, not the surrounding page or background.
* **Make sure labels are legible.** Handwritten text works, but clearer writing gives better results.
* **Combine an image with a prompt.** Instead of just attaching, say what you want: *"Recreate this as a flowchart"* or *"Use this as a reference for the layout, but with our standard shapes."*
* **Iterate.** If the first result isn't quite right, reply with corrections rather than starting over: *"Move the database to the right"* or *"Rename the top node to 'API Gateway'."*

## Related

* [AI Chat](/models/work-in-the-app/ai/chat.md) – Sending messages and prompts
* [Reviewing & Staging Changes](/models/work-in-the-app/ai/staging.md) – Previewing what the AI builds


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ins-pi.com/models/work-in-the-app/ai/images.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
