Skip to main content
POST
This endpoint uploads one or more files into the sandbox workspace associated with a task run. Files are uploaded via multipart/form-data. The target directory is created automatically if it doesn’t exist.

Authentication

To use this API, you need a BLACKBOX API Key. Follow these steps to get your API key:
  1. Go to app.blackbox.ai/agent-api and click Get an API Key (requires a Pro subscription)
  2. Once provisioning completes, you will be redirected to your Dashboard
  3. From the Dashboard, create an API key to use with all Agent API requests
Your API key will be in the format: sk-xxxxxxxxxxxxxxxxxxxxxx

Headers

string
required
API Key of the form Bearer <api_key>.Example: Bearer sk_b41b647ffbfed27f616560
string
required
Must be multipart/form-data (set automatically by most HTTP clients when using form data).

Path Parameters

string
required
The unique run identifier returned when the task was created.

Form Fields

file
required
One or more file fields. Each file field uploads one file. You can include multiple file fields in a single request.
string
Target directory inside the sandbox where files will be uploaded.Default: /vercel/sandboxExample: path=/vercel/sandbox/uploads

Response Fields

array
Array of successfully uploaded file entries.

Error Codes