# Files and outputs

> Get files back from a run, and keep work on the cloud computer between runs.

## Outputs

When Cosmos saves a file as an **output**, it appears in the run's `files` array:

```json
"files": [
  { "name": "report.md", "bytes": 2048 },
  { "name": "hello.py", "bytes": 61 }
]
```

Ask for the contents with `?include=files`:

```bash
curl "https://api.agent.clatterlabs.xyz/v1/runs/RUN_ID?include=files" \
  -H "Authorization: Bearer $CLATTER_API_KEY" \
  -H "X-Clatter-Account: $CLATTER_ACCOUNT_ID"
```

Each file then also has `content`. To make sure you get a file back, say so in the instructions: *"Save the final script as an output named sync.py."*

## Work that stays on the computer

Runs work on your account's cloud computer, so code and data can outlive a run:

- **Cloud Repos** keep code with history. Ask Cosmos to "commit the project to a Cloud Repo named todo-api" and later runs can continue from it.
- **Hosting** deploys sites and APIs to `<name>.clatterai.com`.
- **Database and storage** keep data and assets.

<Warning>
Treat outputs as untrusted until you've reviewed them, like any code from a pull request. Don't paste secrets into `input`; connect services to your account instead.
</Warning>

## Storage costs

Writes to the cloud computer and run results are billed at **$0.10 per GB written**. See [Rates](/billing/rates).
