curl --request PUT \
--url "{PRESIGNED_URL}" \
--header 'Content-Type: application/pdf' \
--data-binary '@/path/to/your/file.pdf'
import requests
presigned_url = "{PRESIGNED_URL}"
with open("/path/to/your/file.pdf", "rb") as file:
response = requests.put(
presigned_url,
data=file,
headers={"Content-Type": "application/pdf"}
)
print(response.status_code) # 200 on success
const fs = require("fs");
const presignedUrl = "{PRESIGNED_URL}";
const fileBuffer = fs.readFileSync("/path/to/your/file.pdf");
const response = await fetch(presignedUrl, {
method: "PUT",
body: fileBuffer,
headers: {
"Content-Type": "application/pdf",
},
});
console.log(response.status); // 200 on success
(empty body)
Jobs
Upload File
Upload your file to the presigned URL from Get Upload URL
PUT
{presignedUrl}
curl --request PUT \
--url "{PRESIGNED_URL}" \
--header 'Content-Type: application/pdf' \
--data-binary '@/path/to/your/file.pdf'
import requests
presigned_url = "{PRESIGNED_URL}"
with open("/path/to/your/file.pdf", "rb") as file:
response = requests.put(
presigned_url,
data=file,
headers={"Content-Type": "application/pdf"}
)
print(response.status_code) # 200 on success
const fs = require("fs");
const presignedUrl = "{PRESIGNED_URL}";
const fileBuffer = fs.readFileSync("/path/to/your/file.pdf");
const response = await fetch(presignedUrl, {
method: "PUT",
body: fileBuffer,
headers: {
"Content-Type": "application/pdf",
},
});
console.log(response.status); // 200 on success
(empty body)
Upload your file’s binary content to the
presignedUrl received from Get Upload URL.
This request goes to AWS S3, not the Opus API. Do not include the
x-service-key header.Headers
string
required
MIME type matching your file (e.g.,
application/pdf, image/png, text/csv)Body
Raw binary data of your file.The maximum file size for uploads is 10 MB. Requests with files exceeding this limit will be rejected.
Response
Returns HTTP200 on success with an empty body.
curl --request PUT \
--url "{PRESIGNED_URL}" \
--header 'Content-Type: application/pdf' \
--data-binary '@/path/to/your/file.pdf'
import requests
presigned_url = "{PRESIGNED_URL}"
with open("/path/to/your/file.pdf", "rb") as file:
response = requests.put(
presigned_url,
data=file,
headers={"Content-Type": "application/pdf"}
)
print(response.status_code) # 200 on success
const fs = require("fs");
const presignedUrl = "{PRESIGNED_URL}";
const fileBuffer = fs.readFileSync("/path/to/your/file.pdf");
const response = await fetch(presignedUrl, {
method: "PUT",
body: fileBuffer,
headers: {
"Content-Type": "application/pdf",
},
});
console.log(response.status); // 200 on success
(empty body)
Was this page helpful?
⌘I