> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lyceum.technology/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload and Process Data

> Move files into your storage bucket and read them from a run

Every account has a per-user S3-compatible bucket. This example uploads a CSV, runs a Python job that reads it, and downloads the result.

## Upload a file

### CLI

```bash theme={null}
lyceum storage load data.csv --key inputs/data.csv
```

### REST API

```bash theme={null}
curl -X POST "https://api.lyceum.technology/api/v2/external/storage/upload?key=inputs/data.csv" \
  -H "Authorization: Bearer $LYCEUM_API_KEY" \
  -F "file=@data.csv"
```

## Direct S3 access via temporary credentials

For larger transfers or programmatic clients, fetch short-lived MinIO/S3 credentials and use any standard S3 client:

```python theme={null}
import boto3, requests

api_key = "lk_..."

creds = requests.post(
    "https://api.lyceum.technology/api/v2/external/storage/credentials",
    headers={"Authorization": f"Bearer {api_key}"},
).json()

s3 = boto3.client(
    "s3",
    endpoint_url=creds["endpoint"],
    aws_access_key_id=creds["access_key"],
    aws_secret_access_key=creds["secret_key"],
    aws_session_token=creds["session_token"],
    region_name=creds["region"],
)

s3.upload_file("data.csv", creds["bucket_name"], "inputs/data.csv")
```

## List, download, delete

```bash theme={null}
lyceum storage ls inputs/ -r
lyceum storage download inputs/data.csv
```

```bash theme={null}
curl "https://api.lyceum.technology/api/v2/external/storage/list-files?prefix=inputs/" \
  -H "Authorization: Bearer $LYCEUM_API_KEY"

curl "https://api.lyceum.technology/api/v2/external/storage/download/inputs/data.csv" \
  -H "Authorization: Bearer $LYCEUM_API_KEY" \
  -o data.csv

curl -X DELETE "https://api.lyceum.technology/api/v2/external/storage/delete/inputs/data.csv" \
  -H "Authorization: Bearer $LYCEUM_API_KEY"
```

Delete a whole prefix with `DELETE /storage/delete-folder/{folder_prefix}`.
