---
title: "File Attachments in AI Chatbots | Hostman Docs"
description: "Learn how file attachments work in AI chatbots. Explore supported image and document formats for different AI models, file size limits, and token consumption calculations for images and text."
---

> For the complete documentation index for AI agents, see [llms.txt](https://hostman.com/llms.txt).

When interacting with an agent [through a chat bot](https://hostman.com/docs/ai-agents/manage-agents/embed-chatbots/), users can attach text files and images to their messages.

This option is useful in scenarios where the agent needs to analyze additional materials, such as error screenshots, photos of receipts, invoices, or other documents.

## Supported Formats

Supported file formats depend on the model you're using.

**ChatGPT**: `.bash`, `.bat`, `.cmd`, `.c`, `.cpp`, `.cs`, `.csv`, `.doc`, `.docx`, `.gif`, `.go`, `.html`, `.java`, `.jpeg`, `.jpg`, `.js`, `.json`, `.jsx`, `.kt`, `.md`, `.pdf`, `.php`, `.png`, `.ps1`, `.py`, `.rb`, `.rs`, `.scala`, `.sh`, `.sql`, `.svelte`, `.swift`, `.ts`, `.tsx`, `.txt`, `.vue`, `.webp`, `.xls`, `.xlsx`, `.xml`, `.yaml`, `.yml`, `.zsh`.

**Claude**, **Gemini**: `.jpg`, `.png`, `.webp`, `.gif`.

**Grok**: `.jpg`, `.png`, `.webp`.

**DeepSeek**, **Qwen**: Attachments are not supported.

The maximum file size is **5 MB**. Multiple files can be attached at the same time.

## Token Consumption

When processing files, the agent consumes tokens. The **approximate token usage** can be estimated using the formulas below.

Image: 

```shell
(Width / 512) × (Height / 512) × 700
```

Text:

```shell
Number of characters / 4
```
