Upload a file
curl --request POST \
--url https://api.arg.ai/api/workspaces/{workspaceId}/files/upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file'import requests
url = "https://api.arg.ai/api/workspaces/{workspaceId}/files/upload"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.arg.ai/api/workspaces/{workspaceId}/files/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{}{
"detail": "<string>"
}Files
Upload a file
Upload one file as multipart/form-data, up to 100 MiB. Use the multipart upload endpoints for anything larger.
POST
/
api
/
workspaces
/
{workspaceId}
/
files
/
upload
Upload a file
curl --request POST \
--url https://api.arg.ai/api/workspaces/{workspaceId}/files/upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file'import requests
url = "https://api.arg.ai/api/workspaces/{workspaceId}/files/upload"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.arg.ai/api/workspaces/{workspaceId}/files/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{}{
"detail": "<string>"
}Authorizations
bearerAuthapiKeyAuth
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Destination folder. Defaults to the workspace root.
Body
multipart/form-data
File to upload.
Response
Successful response
The response is of type object.