POST
/
users
/
me
/
files
/
presigned-url
JavaScript
import BrowserUse from 'browser-use-sdk';

const client = new BrowserUse({
  apiKey: 'My API Key',
});

const response = await client.users.me.files.createPresignedURL({
  contentType: 'image/jpg',
  fileName: 'x',
  sizeBytes: 1,
});

console.log(response.expiresIn);
{
  "url": "<string>",
  "method": "<string>",
  "fields": {},
  "fileName": "<string>",
  "expiresIn": 123
}

Authorizations

X-Browser-Use-API-Key
string
header
required

Body

application/json

Request model for uploading a file to the user's files bucket

Attributes: file_name: The name of the file to upload content_type: The content type of the file to upload size_bytes: The size of the file to upload

Response

200
application/json

Successful Response

Response model for a presigned upload URL

Attributes: url: The URL to upload the file to method: The HTTP method to use for the upload fields: The form fields to include in the upload request file_name: The name of the file to upload (should be referenced when user wants to use the file in a task) expires_in: The number of seconds until the presigned URL expires