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={
"data_uuid": "string",
"inputs": [
"string"
]
}' \
--form 'task_id=<string>'import requests
url = "https://api.promptloop.com/v0/batches/validate-data"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"batch_input_data\"\r\n\r\n{\r\n \"data_uuid\": \"string\",\r\n \"inputs\": [\r\n \"string\"\r\n ]\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"task_id\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
headers = {
"x-api-key": "<api-key>",
"Content-Type": "multipart/form-data"
}
response = requests.post(url, data=payload, 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={
"data_uuid": "string",
"inputs": [
"string"
]
}' \
--form 'task_id=<string>'import requests
url = "https://api.promptloop.com/v0/batches/validate-data"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"batch_input_data\"\r\n\r\n{\r\n \"data_uuid\": \"string\",\r\n \"inputs\": [\r\n \"string\"\r\n ]\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"task_id\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
headers = {
"x-api-key": "<api-key>",
"Content-Type": "multipart/form-data"
}
response = requests.post(url, data=payload, 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
