Launch uploaded batch
curl --request POST \
--url https://api.promptloop.com/v0.1/batches/from-upload \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"upload_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.promptloop.com/v0.1/batches/from-upload"
payload = {
"upload_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
upload_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
task_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.promptloop.com/v0.1/batches/from-upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"data": {
"batch_id": "<string>",
"jobs_submitted": 123,
"jobs_added": 123,
"jobs_failed_error_indexes": [
{
"error_index": 123,
"error_message": "<string>"
}
],
"estimated_time_to_start": "2023-11-07T05:31:56Z",
"estimated_time_to_complete": "2023-11-07T05:31:56Z",
"webhook_url": "<string>"
},
"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
Launch uploaded batch
Launch the team-scoped JSONL file. Repeating the same upload_id returns the existing batch without queueing work again. The upload_id is the batch_id for status checks.
POST
/
v0.1
/
batches
/
from-upload
Launch uploaded batch
curl --request POST \
--url https://api.promptloop.com/v0.1/batches/from-upload \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"upload_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.promptloop.com/v0.1/batches/from-upload"
payload = {
"upload_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
upload_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
task_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.promptloop.com/v0.1/batches/from-upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"data": {
"batch_id": "<string>",
"jobs_submitted": 123,
"jobs_added": 123,
"jobs_failed_error_indexes": [
{
"error_index": 123,
"error_message": "<string>"
}
],
"estimated_time_to_start": "2023-11-07T05:31:56Z",
"estimated_time_to_complete": "2023-11-07T05:31:56Z",
"webhook_url": "<string>"
},
"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>"
}Authorizations
Body
application/json
