Skip to Content

Simulators

Files

The Files API stores documents your requests refer to. Upload a file, list it, see that it cannot be downloaded and delete it, then load a scenario whose files can be:

A=(-H 'x-api-key: sk-ant-placeholder' -H 'anthropic-version: 2023-06-01')
printf 'quarter,churn\nQ1,2.1\n' > churn.csv
curl -s "${A[@]}" "$RYSTIC_URL/v1/files" -F 'file=@churn.csv;type=text/csv' -F expires_in_seconds=3600 | jq -c '{id, filename, downloadable, expires_at}'
# -> {"id":"file_000000000000000000000001","filename":"churn.csv","downloadable":false,"expires_at":"2026-02-10T01:00:00.001000Z"}
curl -s "${A[@]}" "$RYSTIC_URL/v1/files" | jq -c '[.data[].id]'
# -> ["file_000000000000000000000001"]
curl -s "${A[@]}" "$RYSTIC_URL/v1/files/file_000000000000000000000001/content" | jq -c '{type: .error.type, code: .error.details.error_code}'
# -> {"type":"invalid_request_error","code":"file_not_downloadable"}
curl -s "${A[@]}" -X DELETE "$RYSTIC_URL/v1/files/file_000000000000000000000001" | jq -c .
# -> {"id":"file_000000000000000000000001","type":"file_deleted"}
curl -s -X POST "$RYSTIC_URL/_rystic/scenario" -d '{"name":"anthropic_file_vault"}'
curl -s "${A[@]}" "$RYSTIC_URL/v1/files/file_01ChurnExport00001/content" | head -n 2
# -> account,arr_usd,renewal_date,health
# -> Northwind,124000,2026-07-01,green

Uploads

POST /v1/files takes a multipart file part and an optional expires_in_seconds from 3600 to 7776000, which sets expires_at on the clock. A value outside that range returns 400 invalid_request_error. Files are listed, read and deleted by id, and an unknown id returns 404 not_found_error.

Downloads

A file you upload is not downloadable, as on the API. Its /content returns 400 invalid_request_error with error_code file_not_downloadable. To see that refusal, upload a file yourself.

The files in anthropic_file_vault return their bytes with their own content type. The exception is legacy-upload.txt, which expired on 2026-02-01, before the scenario’s clock, so its /content returns 404 not_found_error. Any file’s /content returns 404 once the clock passes its expires_at, and its record still lists and reads.

Last updated on