cURL
curl https://compute.prentis.ai/v1/accounts/my-account/datasets/support-chats:validateUpload \
-H "Authorization: Bearer $PRENTIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"uploadSession": "accounts/my-account/uploadSessions/01K7AWZ8C4E6G8J0L2N4Q6S8U0"}'import requests
url = "https://compute.prentis.ai/v1/accounts/{account}/datasets/{dataset}:validateUpload"
payload = { "uploadSession": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({uploadSession: '<string>'})
};
fetch('https://compute.prentis.ai/v1/accounts/{account}/datasets/{dataset}:validateUpload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://compute.prentis.ai/v1/accounts/{account}/datasets/{dataset}:validateUpload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'uploadSession' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://compute.prentis.ai/v1/accounts/{account}/datasets/{dataset}:validateUpload"
payload := strings.NewReader("{\n \"uploadSession\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://compute.prentis.ai/v1/accounts/{account}/datasets/{dataset}:validateUpload")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"uploadSession\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://compute.prentis.ai/v1/accounts/{account}/datasets/{dataset}:validateUpload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"uploadSession\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "accounts/my-account/datasets/support-chats",
"datasetId": "support-chats",
"displayName": "Support chats",
"state": "DATASET_STATE_VALIDATING",
"latestVersionNo": 1,
"createTime": "2026-10-10T07:40:00Z",
"updateTime": "2026-10-10T07:41:02Z"
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"code": "INVALID_REQUEST",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"code": "INVALID_REQUEST",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"code": "INVALID_REQUEST",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"code": "INVALID_REQUEST",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"code": "INVALID_REQUEST",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"code": "INVALID_REQUEST",
"param": "<string>"
}
}Datasets
Validate an upload
Step three, once the PUT has finished. Validation runs in the background: this returns straight away in state DATASET_STATE_VALIDATING. It checks that the file is JSON Lines — UTF-8, one JSON object per line, no line over 8 MiB — not that the rows have the shape a particular kind of training needs; that is checked when a job starts.
POST
/
accounts
/
{account}
/
datasets
/
{dataset}
:validateUpload
cURL
curl https://compute.prentis.ai/v1/accounts/my-account/datasets/support-chats:validateUpload \
-H "Authorization: Bearer $PRENTIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"uploadSession": "accounts/my-account/uploadSessions/01K7AWZ8C4E6G8J0L2N4Q6S8U0"}'import requests
url = "https://compute.prentis.ai/v1/accounts/{account}/datasets/{dataset}:validateUpload"
payload = { "uploadSession": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({uploadSession: '<string>'})
};
fetch('https://compute.prentis.ai/v1/accounts/{account}/datasets/{dataset}:validateUpload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://compute.prentis.ai/v1/accounts/{account}/datasets/{dataset}:validateUpload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'uploadSession' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://compute.prentis.ai/v1/accounts/{account}/datasets/{dataset}:validateUpload"
payload := strings.NewReader("{\n \"uploadSession\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://compute.prentis.ai/v1/accounts/{account}/datasets/{dataset}:validateUpload")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"uploadSession\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://compute.prentis.ai/v1/accounts/{account}/datasets/{dataset}:validateUpload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"uploadSession\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "accounts/my-account/datasets/support-chats",
"datasetId": "support-chats",
"displayName": "Support chats",
"state": "DATASET_STATE_VALIDATING",
"latestVersionNo": 1,
"createTime": "2026-10-10T07:40:00Z",
"updateTime": "2026-10-10T07:41:02Z"
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"code": "INVALID_REQUEST",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"code": "INVALID_REQUEST",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"code": "INVALID_REQUEST",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"code": "INVALID_REQUEST",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"code": "INVALID_REQUEST",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"code": "INVALID_REQUEST",
"param": "<string>"
}
}Authorizations
Authorization: Bearer <your API key> -- the same key as inference. A key reaches the account it belongs to and no other.
Path Parameters
Your account id -- the one in the console's address bar (my-account for this key). It must be the account the key belongs to.
Maximum string length:
64The dataset's id, as chosen when it was created.
Maximum string length:
64Body
application/json
The uploadSession.name from the getUploadEndpoint response.
Response
OK.
Available options:
DATASET_SOURCE_UPLOAD, DATASET_SOURCE_JOB_OUTPUT, DATASET_SOURCE_SPLIT Available options:
DATASET_STATE_CREATING, DATASET_STATE_UPLOADING, DATASET_STATE_VALIDATING, DATASET_STATE_READY, DATASET_STATE_FAILED, DATASET_STATE_DELETED Show child attributes
Show child attributes
Show child attributes
Show child attributes