Skip to content

Files API

Set up your agent

Give your coding agent a Steel browser and the Steel skills, so that it browses and writes Steel code the right way. Learn more

Install the Steel CLI. It signs you in and installs the skills for your coding agents.

curl -fsS https://setup.steel.dev | sh

Or send this prompt to your coding agent, and it does the same:

Read https://setup.steel.dev/install.md and follow it to set up Steel for this coding client.
Then continue my requested task using the installed Steel skill.

Set up your agent →

Global files are the files that your organization stores outside any session. These endpoints upload, list, download and delete them. The endpoints for one session's files are on Sessions API. For the base URL and authentication, see API conventions. For the error codes, see Errors.

The first example is a complete program. The later examples use its client.

Endpoints

List global files

GET/v1/files

Lists your organization's global files.

This endpoint takes no parameters.

Response

FieldTypeDescription
dataobject[]The files, each with path, size in bytes and lastModified.

See Files.

curl https://api.steel.dev/v1/files \
  -H "steel-api-key: $STEEL_API_KEY"

Upload a global file

POST/v1/files

Uploads a global file. The request is multipart/form-data.

Parameters

NameTypeRequiredDescription
filefile or string · bodyYesThe file content, or a URL to download the file from.
pathstring · bodyNoThe path of the file in storage, such as datasets/prices.csv.

The response is 201:

Response

FieldTypeDescription
pathstringThe path of the file in storage.
sizeintegerThe size in bytes.
lastModifiedstring (date-time)When the file was created.

To copy a global file into a session, pass its path as file to Upload a file to a session. See Files.

curl -X POST https://api.steel.dev/v1/files \
  -H "steel-api-key: $STEEL_API_KEY" \
  -F "file=@dataset.csv" \
  -F "path=dataset.csv"

Download a global file

GET/v1/files/{path}

Downloads one global file.

Parameters

NameTypeRequiredDescription
pathstring · pathYesThe path of the file. It can contain /.

The response is the file, as application/octet-stream.

See Files.

curl https://api.steel.dev/v1/files/dataset.csv \
  -H "steel-api-key: $STEEL_API_KEY" \
  -o dataset.csv

Delete a global file

DELETE/v1/files/{path}

Deletes one global file.

Parameters

NameTypeRequiredDescription
pathstring · pathYesThe path of the file. It can contain /.

The response is 204 with no body.

See Files.

curl -X DELETE https://api.steel.dev/v1/files/dataset.csv \
  -H "steel-api-key: $STEEL_API_KEY"