Prepare large batch upload
curl --request POST \
--url https://api.promptloop.com/v0.1/batches/uploads \
--header 'x-api-key: <api-key>'import requests
url = "https://api.promptloop.com/v0.1/batches/uploads"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.promptloop.com/v0.1/batches/uploads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"data": {
"upload_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"upload_url": "<string>",
"method": "POST",
"upload_fields": {},
"file_field": "file",
"instructions": "<string>",
"expires_in_seconds": 900,
"max_bytes": 104857600,
"max_rows": 100000
},
"message": "<string>",
"request_id": "<string>"
}{
"status": "error",
"data": {},
"message": "<string>",
"error": {
"code": 123,
"details": "<string>"
},
"request_id": "<string>"
}{
"status": "error",
"data": {},
"message": "<string>",
"error": {
"code": 123,
"details": "<string>"
},
"request_id": "<string>"
}{
"status": "error",
"data": {},
"message": "<string>",
"error": {
"code": 123,
"details": "<string>"
},
"request_id": "<string>"
}Batches
Prepare large batch upload
Upload up to 100,000 JSONL rows / 100 MiB directly to S3 using the returned multipart POST URL and fields, then call createBatchFromUpload. Input objects expire after one day; upload credentials expire after 15 minutes.
POST
/
v0.1
/
batches
/
uploads
Prepare large batch upload
curl --request POST \
--url https://api.promptloop.com/v0.1/batches/uploads \
--header 'x-api-key: <api-key>'import requests
url = "https://api.promptloop.com/v0.1/batches/uploads"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.promptloop.com/v0.1/batches/uploads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"data": {
"upload_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"upload_url": "<string>",
"method": "POST",
"upload_fields": {},
"file_field": "file",
"instructions": "<string>",
"expires_in_seconds": 900,
"max_bytes": 104857600,
"max_rows": 100000
},
"message": "<string>",
"request_id": "<string>"
}{
"status": "error",
"data": {},
"message": "<string>",
"error": {
"code": 123,
"details": "<string>"
},
"request_id": "<string>"
}{
"status": "error",
"data": {},
"message": "<string>",
"error": {
"code": 123,
"details": "<string>"
},
"request_id": "<string>"
}{
"status": "error",
"data": {},
"message": "<string>",
"error": {
"code": 123,
"details": "<string>"
},
"request_id": "<string>"
}