Data Types


To process files and save the results back to a folder in your Bytescale account, instead of the permanent cache, follow these steps:

  1. Create a file transformation URL (see ProcessFile docs).

  2. Test the file transformation URL (with GET).

  3. Add /save to the URL (after your account ID).

  4. Submit a POST request to the URL (with the request body described below).

Tip: you can use ProcessFile to use GET requests instead. You can leverage Bytescale's permanent caching to ensure each URL is only processed once, no matter how many times it is requested.

1curl "{accountId}/save/{transformation}/{filePath}{?params}" \
2 -H "Authorization: Bearer YOUR_API_KEY" \
3 -H "Content-Type: application/json" \
4 -d @- << EOF
5 {
6 "destination": "/destination/image.jpg"
7 }
Response (200)
2 "async": false,
3 "accountId": "A623uY2",
4 "filePath": "/my-processed-image.jpg",
5 "fileUrl": ""

Your account ID.

This is visible on the settings page:

Example: "A623uY2"

Type: String

Length: 7

Absolute path to a file. Begins with a /.

Example: "/uploads/image.jpg"

Type: String

Min Length: 1

Max Length: 512

The name of the File Processing API (e.g. image, video, audio) or transformation preset (created in the Bytescale Dashboard) to use when processing the file.

Example: "image"

Type: String

Min Length: 1

Max Length: 100

Add one of these Authorization header values to your request:

Option 1: prefix "Bearer " to your API key. The result is your Authorization header value.

Option 2: use HTTP basic authorization with apikey as your username and your API key as your password.

For advanced options, please see:

Type: String

This endpoints requires a JSON request body.

Type: String

Value: "application/json"

Was this section helpful? Yes No

You are using an outdated browser.

This website requires a modern web browser -- the latest versions of these browsers are supported: