Validate Batch Data
curl --request POST \
--url https://api.promptloop.com/v0/batches/validate-data \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-key: <api-key>' \
--form batch_input_data='@example-file' \
--form 'task_id=<string>'import requests
url = "https://api.promptloop.com/v0/batches/validate-data"
files = { "batch_input_data": ("example-file", open("example-file", "rb")) }
payload = { "task_id": "<string>" }
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('batch_input_data', '{
"data_uuid": "string",
"inputs": [
"string"
]
}');
form.append('task_id', '<string>');
const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
options.body = form;
fetch('https://api.promptloop.com/v0/batches/validate-data', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"data": [
{
"job_count": 123,
"job_improper_format_count": 123,
"job_improper_format": [
{
"error_index": 123,
"error_message": "<string>"
}
]
}
],
"message": "<string>",
"error": {
"code": 123,
"details": "<string>"
}
}{
"status": "error",
"data": {},
"message": "<string>",
"error": {
"code": 123,
"details": "<string>"
}
}{
"status": "error",
"data": {},
"message": "<string>",
"error": {
"code": 123,
"details": "<string>"
}
}{
"status": "error",
"data": {},
"message": "<string>",
"error": {
"code": 123,
"details": "<string>"
}
}Batches
Validate Batch Data
Uploads a JSONL file and validates the data for a new batch with the provided data. Returns the batch id.
POST
/
v0
/
batches
/
validate-data
Validate Batch Data
curl --request POST \
--url https://api.promptloop.com/v0/batches/validate-data \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-key: <api-key>' \
--form batch_input_data='@example-file' \
--form 'task_id=<string>'import requests
url = "https://api.promptloop.com/v0/batches/validate-data"
files = { "batch_input_data": ("example-file", open("example-file", "rb")) }
payload = { "task_id": "<string>" }
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('batch_input_data', '{
"data_uuid": "string",
"inputs": [
"string"
]
}');
form.append('task_id', '<string>');
const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
options.body = form;
fetch('https://api.promptloop.com/v0/batches/validate-data', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"data": [
{
"job_count": 123,
"job_improper_format_count": 123,
"job_improper_format": [
{
"error_index": 123,
"error_message": "<string>"
}
]
}
],
"message": "<string>",
"error": {
"code": 123,
"details": "<string>"
}
}{
"status": "error",
"data": {},
"message": "<string>",
"error": {
"code": 123,
"details": "<string>"
}
}{
"status": "error",
"data": {},
"message": "<string>",
"error": {
"code": 123,
"details": "<string>"
}
}{
"status": "error",
"data": {},
"message": "<string>",
"error": {
"code": 123,
"details": "<string>"
}
}Authorizations
Body
multipart/form-data
⌘I
