Create an upload URL
curl --request POST \
--url https://api.aircaps.com/v1/files/upload-url \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aircaps.com/v1/files/upload-url"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aircaps.com/v1/files/upload-url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "file_01k6z3m4q8w7e5r2t1y0u9i8o7",
"object": "file",
"upload_url": "https://storage.example/...",
"method": "PUT",
"upload_expires_at": "2026-10-06T19:01:02Z",
"expires_at": "2026-10-07T18:01:02Z",
"max_size_bytes": 5368709120
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "invalid API key",
"param": null,
"request_id": "req_01k6z3m4q8w7e5r2t1y0u9i8o7"
}
}{
"error": {
"type": "permission_error",
"code": "model_access_denied",
"message": "This account does not have access to A5S Async v1. To get access, talk to sales at https://research.aircaps.com/contact.",
"param": null,
"request_id": "req_01k6z3m4q8w7e5r2t1y0u9i8o7"
}
}{
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"message": "too many requests; retry after the Retry-After interval",
"param": null,
"request_id": "req_01k6z3m4q8w7e5r2t1y0u9i8o7"
}
}{
"error": {
"type": "api_error",
"code": "internal_error",
"message": "internal error",
"param": null,
"request_id": "req_01k6z3m4q8w7e5r2t1y0u9i8o7"
}
}Files
Create an upload URL
Get a presigned URL to upload a file of up to 5 GB straight to storage. PUT the raw bytes to upload_url within an hour, then use id as file_id.
POST
/
v1
/
files
/
upload-url
Create an upload URL
curl --request POST \
--url https://api.aircaps.com/v1/files/upload-url \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aircaps.com/v1/files/upload-url"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aircaps.com/v1/files/upload-url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "file_01k6z3m4q8w7e5r2t1y0u9i8o7",
"object": "file",
"upload_url": "https://storage.example/...",
"method": "PUT",
"upload_expires_at": "2026-10-06T19:01:02Z",
"expires_at": "2026-10-07T18:01:02Z",
"max_size_bytes": 5368709120
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "invalid API key",
"param": null,
"request_id": "req_01k6z3m4q8w7e5r2t1y0u9i8o7"
}
}{
"error": {
"type": "permission_error",
"code": "model_access_denied",
"message": "This account does not have access to A5S Async v1. To get access, talk to sales at https://research.aircaps.com/contact.",
"param": null,
"request_id": "req_01k6z3m4q8w7e5r2t1y0u9i8o7"
}
}{
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"message": "too many requests; retry after the Retry-After interval",
"param": null,
"request_id": "req_01k6z3m4q8w7e5r2t1y0u9i8o7"
}
}{
"error": {
"type": "api_error",
"code": "internal_error",
"message": "internal error",
"param": null,
"request_id": "req_01k6z3m4q8w7e5r2t1y0u9i8o7"
}
}Authorizations
Your API key: Authorization: Bearer aircaps_sk_...
Response
Upload URL created.
Use as file_id after the upload.
Example:
"file_01k6z3m4q8w7e5r2t1y0u9i8o7"
Available options:
file Presigned URL: PUT the raw file bytes here.
Available options:
PUT Upload before this (one hour).
The file is deleted after this (24 hours).
Example:
5368709120