JavaScript
const options = { method: 'POST', headers: {'X-Browser-Use-API-Key': '<api-key>', 'Content-Type': 'application/json'}, body: JSON.stringify({files: [{name: '<string>', contentType: 'application/octet-stream', size: 2}]}) }; fetch('https://api.browser-use.com/api/v3/workspaces/{workspace_id}/files/upload', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
{ "files": [ { "name": "<string>", "uploadUrl": "<string>", "path": "<string>" } ] }
Get presigned PUT URLs for uploading files to a workspace.
Directory prefix to upload into (e.g. "uploads/")
Request body for generating presigned upload URLs.
1 - 10
Show child attributes
Successful Response
Presigned upload URLs for the requested files.