Upload a file
curl --request POST \
--url https://api.aircaps.com/v1/files \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/octet-stream' \
--data '<string>'import requests
url = "https://api.aircaps.com/v1/files"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/octet-stream"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/octet-stream'},
body: '<string>'
};
fetch('https://api.aircaps.com/v1/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "file_01k6z3m4q8w7e5r2t1y0u9i8o7",
"object": "file",
"size_bytes": 115200044,
"created_at": "2026-10-06T18:01:02Z",
"expires_at": "2026-10-07T18:01:02Z"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_request",
"message": "empty request body; send the audio bytes as the body",
"param": null,
"request_id": "req_01k6z3m4q8w7e5r2t1y0u9i8o7"
}
}{
"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://aircaps.ai/contact.",
"param": null,
"request_id": "req_01k6z3m4q8w7e5r2t1y0u9i8o7"
}
}{
"error": {
"type": "invalid_request_error",
"code": "file_too_large",
"message": "direct uploads are limited to 1 GB; use /v1/files/upload-url for larger files (up to 5 GB)",
"param": null,
"request_id": "req_01k6z3m4q8w7e5r2t1y0u9i8o7"
}
}{
"error": {
"type": "api_error",
"code": "internal_error",
"message": "internal error",
"param": null,
"request_id": "req_01k6z3m4q8w7e5r2t1y0u9i8o7"
}
}{
"error": {
"type": "api_error",
"code": "service_unavailable",
"message": "temporarily unavailable; please retry",
"param": null,
"request_id": "req_01k6z3m4q8w7e5r2t1y0u9i8o7"
}
}Files
Upload a file
Upload up to 1 GB in the request body. For larger files (up to 5 GB), use an upload URL. An upload that takes longer than about 2.5 minutes is answered with a 303 redirect to its result: follow redirects (most HTTP clients do by default).
POST
/
v1
/
files
Upload a file
curl --request POST \
--url https://api.aircaps.com/v1/files \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/octet-stream' \
--data '<string>'import requests
url = "https://api.aircaps.com/v1/files"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/octet-stream"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/octet-stream'},
body: '<string>'
};
fetch('https://api.aircaps.com/v1/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "file_01k6z3m4q8w7e5r2t1y0u9i8o7",
"object": "file",
"size_bytes": 115200044,
"created_at": "2026-10-06T18:01:02Z",
"expires_at": "2026-10-07T18:01:02Z"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_request",
"message": "empty request body; send the audio bytes as the body",
"param": null,
"request_id": "req_01k6z3m4q8w7e5r2t1y0u9i8o7"
}
}{
"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://aircaps.ai/contact.",
"param": null,
"request_id": "req_01k6z3m4q8w7e5r2t1y0u9i8o7"
}
}{
"error": {
"type": "invalid_request_error",
"code": "file_too_large",
"message": "direct uploads are limited to 1 GB; use /v1/files/upload-url for larger files (up to 5 GB)",
"param": null,
"request_id": "req_01k6z3m4q8w7e5r2t1y0u9i8o7"
}
}{
"error": {
"type": "api_error",
"code": "internal_error",
"message": "internal error",
"param": null,
"request_id": "req_01k6z3m4q8w7e5r2t1y0u9i8o7"
}
}{
"error": {
"type": "api_error",
"code": "service_unavailable",
"message": "temporarily unavailable; please retry",
"param": null,
"request_id": "req_01k6z3m4q8w7e5r2t1y0u9i8o7"
}
}Authorizations
Your API key: Authorization: Bearer aircaps_sk_...
Body
application/octet-stream
The raw file bytes (any audio format).
The body is of type file.
Response
File stored.
Use as file_id.
Example:
"file_01k6z3m4q8w7e5r2t1y0u9i8o7"
Available options:
file Example:
115200044
Usable until this time (24 hours after upload); the file is deleted within the following 24 hours, or right away when a transcript that used it is deleted.

