Serverless
Files

Upload local file (multipart/form-data)

Changed on

Uploads a local file using multipart/form-data. The file field name must be file_upload.

Required permissions: serverless:files:write. Key presets that include them: SERVERLESS, DEPLOY, FULL. See key permissions.

post/serverless/files/file/local/{target_path}

Request

  • Base URL
    https://api.fal.ai/v1
  • URL
    https://api.fal.ai/v1/serverless/files/file/local/{target_path}
  • Auth
    API key in header Authorization

Path parameters

target_pathstring required

Target path (including filename)

Example:datasets/images/cat.jpg

Query parameters

unzipboolean nullable

If true and the uploaded file is a ZIP, it will be extracted

Request body multipart/form-data

file_uploadunknown

Response

Upload completed

boolean required

Indicates whether the operation was successful

Changes

    • info

      the endpoint scheme security deployApiKey was added to the API

    • info

      the endpoint scheme security apiKey was removed from the API