# Get files in and out through your assistant

Your assistant can work on your files in a sandbox – a spreadsheet, photos, a PDF, a ZIP – and hand you the result as a file. This guide shows the three ways files travel and which one to pick for which size.

## What you'll build

You send a spreadsheet to Claude or ChatGPT, it analyses the data in a sandbox and you get back a chart and a cleaned-up CSV you can download. The same steps work for any file: photos to resize, documents to convert, a dataset to process.

## What you need

- Your AI assistant connected to WBX Sandbox – see [Your first result](https://sandbox.wbx.cz/docs/guides/first-result.md) (five minutes, once).
- A file to work with. About **ten minutes**. No programming.

## The three ways, in short

| Direction | How | Good for |
| --- | --- | --- |
| Into the sandbox | Attach the file to the chat; the assistant writes it into the sandbox. Or give a link and the sandbox downloads it. | Attachments: small files (text, a small spreadsheet). Links: anything larger – the sandbox has its own fast internet connection. |
| Out, small | The assistant reads the file from the sandbox and shows it or turns it into a file in the chat. | Text, CSV, short reports. Binary files up to 5 MB. |
| Out, any size | The assistant starts a small download page in the sandbox and gives you a private link (a *public URL*). | Images, ZIP archives, videos – you click and your browser downloads the file. |

## Steps

1. ### Send the file in

   Attach the spreadsheet to your message and say what to do with it:

   “Use WBX Sandbox: here is sales.csv. Save it in the sandbox, tell me which month had the best sales and draw a bar chart by month.”

   For a file that is too large to attach, or one that is already online, give the link instead:

   “Use WBX Sandbox to download https://example.com/data/sales-2026.csv and tell me which month had the best sales.”

   What you see: the assistant writes the file into the sandbox (or runs a download command), runs a short program and answers with the numbers.
2. ### Get a small result back

   “Save the cleaned data as sales-clean.csv and show it to me.”

   The assistant reads the file from the sandbox. Text comes back as text – Claude can offer it as a file to download in the chat; a very long text is shortened in the middle, so ask for a summary or the part you need. A binary file (an image, a ZIP) comes back only up to 5 MB, and even then a link (next step) is usually easier.
3. ### Get a larger file through a private link

   “Put the chart and sales-clean.csv in a ZIP and give me a link where I can download it.”

   The assistant zips the files and makes them available at a private web address. You get a link that starts with `https://` and contains a long secret code (`wbx_token=…`) – only people with the whole link can open it. Open it, click the file and your browser downloads it.

   Under the hood the assistant starts a small web server in the sandbox and asks WBX for a public HTTPS address of its port, protected by that token.
4. ### Let the sandbox sleep or delete it

   When you have what you need, nothing else is required: the sandbox falls asleep on its own after 10 minutes without a command, and the link stops working then. Its files stay for a while, so you can come back. Want it gone now?

   “I have the files. Delete the sandbox.”

### Results of background jobs

Work the assistant runs as a **background job** keeps only the files the job saves as *result files* (usually everything in the job's `output/` folder) – the sandbox of the job is removed when it ends. The assistant can read a result file up to 1 MB. Larger ones you download yourself: in the portal open *Jobs*, click the job and download the file (up to 100 MB each). Result files are kept for 7 days.

## How to tell it works

- Ask “list the files in the sandbox with their sizes” – you should see your file with the size you expect. A spreadsheet of a few kilobytes that shows 0 bytes was not passed in completely.
- The link opens a page listing the files, and the downloaded file opens on your computer.

## Limits at a glance

| What | Limit |
| --- | --- |
| Reading a file from a sandbox | Text up to 10 MB, shortened in the middle to about 60,000 characters. Other files (images, ZIPs, PDFs) up to 5 MB – but they use up a lot of what the assistant can keep in mind during the chat, so for those a link is better. (Technically they are passed as base64 and take up the model's context.) |
| Reading a job's result file | Up to 1 MB; larger in the portal (*Jobs*) or over the REST API. |
| Writing a file from the chat | Limited by what the assistant can pass in one message – fine for text and small files. For anything larger, use a link. |
| Private link (public URL) | No size limit of its own. Works while the sandbox runs; anyone with the link can open it. |

## Common problems

| What you see | What to do |
| --- | --- |
| “The file is too large to read directly (limit 10 MB)” | Ask for the part you need (“show the first 50 lines”, “summarise it”), or for a download link. |
| “Binary file of … bytes is too large (limit 5 MB)” | Ask for a download link instead. |
| A job result file “too large for this tool” | Download it from the portal: *Jobs* → the job → result files. |
| The download link shows an error page or `409 sandbox_sleeping` | The sandbox fell asleep and its web server stopped. Ask “wake the sandbox, start the download page again and give me a new link”. |
| The sandbox cannot download your link | The link must be reachable from the internet without signing in (not a page on your home network). If you asked for a sandbox without internet, it cannot download anything. |

## Next steps

- [A workspace that remembers](https://sandbox.wbx.cz/docs/guides/workspace.md): Keep the files for next week's chat.
- [Run a web app with a public URL](https://sandbox.wbx.cz/docs/guides/web-app.md): The same private links, from your own code.
- [Files reference](https://sandbox.wbx.cz/docs/sandboxes/files.md): Upload and download from the SDKs and the REST API.

Source: https://sandbox.wbx.cz/docs/guides/files
