import requests
url = "https://api.reali3.net/v1/reconstruction"
headers = {
"Authorization": "Bearer YOUR_API_KEY"
}
# Prepare files for upload
files = [
("files", ("image1.jpg", open("image1.jpg", "rb"), "image/jpeg")),
("files", ("image2.jpg", open("image2.jpg", "rb"), "image/jpeg")),
("files", ("image3.jpg", open("image3.jpg", "rb"), "image/jpeg"))
]
response = requests.post(url, headers=headers, files=files)
print(response.json())
const FormData = require('form-data');
const fs = require('fs');
const axios = require('axios');
const form = new FormData();
form.append('files', fs.createReadStream('image1.jpg'));
form.append('files', fs.createReadStream('image2.jpg'));
form.append('files', fs.createReadStream('image3.jpg'));
axios.post('https://api.reali3.net/v1/reconstruction', form, {
headers: {
...form.getHeaders(),
'Authorization': 'Bearer YOUR_API_KEY'
}
})
.then(response => console.log(response.data))
.catch(error => console.error(error));
curl -X POST https://api.reali3.net/v1/reconstruction \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "files=@image1.jpg" \
-F "files=@image2.jpg" \
-F "files=@image3.jpg"