Split batch images
curl --request PUT \
--url https://acusight.io/api/data/batches/{id}/images/split \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"completed_only": true,
"force_reassignment": true,
"mark_all_complete": true,
"promote_to_dataset": true,
"target": "<string>",
"test_split": 123,
"train_split": 123,
"val_split": 123
}
'import requests
url = "https://acusight.io/api/data/batches/{id}/images/split"
payload = {
"completed_only": True,
"force_reassignment": True,
"mark_all_complete": True,
"promote_to_dataset": True,
"target": "<string>",
"test_split": 123,
"train_split": 123,
"val_split": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
completed_only: true,
force_reassignment: true,
mark_all_complete: true,
promote_to_dataset: true,
target: '<string>',
test_split: 123,
train_split: 123,
val_split: 123
})
};
fetch('https://acusight.io/api/data/batches/{id}/images/split', 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://acusight.io/api/data/batches/{id}/images/split",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'completed_only' => true,
'force_reassignment' => true,
'mark_all_complete' => true,
'promote_to_dataset' => true,
'target' => '<string>',
'test_split' => 123,
'train_split' => 123,
'val_split' => 123
]),
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://acusight.io/api/data/batches/{id}/images/split"
payload := strings.NewReader("{\n \"completed_only\": true,\n \"force_reassignment\": true,\n \"mark_all_complete\": true,\n \"promote_to_dataset\": true,\n \"target\": \"<string>\",\n \"test_split\": 123,\n \"train_split\": 123,\n \"val_split\": 123\n}")
req, _ := http.NewRequest("PUT", 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.put("https://acusight.io/api/data/batches/{id}/images/split")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"completed_only\": true,\n \"force_reassignment\": true,\n \"mark_all_complete\": true,\n \"promote_to_dataset\": true,\n \"target\": \"<string>\",\n \"test_split\": 123,\n \"train_split\": 123,\n \"val_split\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://acusight.io/api/data/batches/{id}/images/split")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"completed_only\": true,\n \"force_reassignment\": true,\n \"mark_all_complete\": true,\n \"promote_to_dataset\": true,\n \"target\": \"<string>\",\n \"test_split\": 123,\n \"train_split\": 123,\n \"val_split\": 123\n}"
response = http.request(request)
puts response.read_body{
"data": {
"batch_id": 123,
"class_distribution": {},
"class_targets": {},
"kept_count": 123,
"locked_count": 123,
"moved_count": 123,
"split_counts": {},
"test_count": 123,
"total": 123,
"train_count": 123,
"val_count": 123,
"warnings": [
"<string>"
]
},
"error": {
"code": "<string>",
"details": "<string>",
"message": "<string>"
},
"meta": {
"count": 123,
"limit": 123,
"offset": 123,
"total": 123
},
"success": true
}{
"data": "<unknown>",
"error": {
"code": "<string>",
"details": "<string>",
"message": "<string>"
},
"meta": {
"count": 123,
"limit": 123,
"offset": 123,
"total": 123
},
"success": true
}{
"data": "<unknown>",
"error": {
"code": "<string>",
"details": "<string>",
"message": "<string>"
},
"meta": {
"count": 123,
"limit": 123,
"offset": 123,
"total": 123
},
"success": true
}{
"data": "<unknown>",
"error": {
"code": "<string>",
"details": "<string>",
"message": "<string>"
},
"meta": {
"count": 123,
"limit": 123,
"offset": 123,
"total": 123
},
"success": true
}Datasets & data
Split batch images
Assigns train/val/test splits for images in the batch while respecting manual assignments. By default, batches are promoted to the dataset stage unless promote_to_dataset is set to false.
PUT
/
data
/
batches
/
{id}
/
images
/
split
Split batch images
curl --request PUT \
--url https://acusight.io/api/data/batches/{id}/images/split \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"completed_only": true,
"force_reassignment": true,
"mark_all_complete": true,
"promote_to_dataset": true,
"target": "<string>",
"test_split": 123,
"train_split": 123,
"val_split": 123
}
'import requests
url = "https://acusight.io/api/data/batches/{id}/images/split"
payload = {
"completed_only": True,
"force_reassignment": True,
"mark_all_complete": True,
"promote_to_dataset": True,
"target": "<string>",
"test_split": 123,
"train_split": 123,
"val_split": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
completed_only: true,
force_reassignment: true,
mark_all_complete: true,
promote_to_dataset: true,
target: '<string>',
test_split: 123,
train_split: 123,
val_split: 123
})
};
fetch('https://acusight.io/api/data/batches/{id}/images/split', 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://acusight.io/api/data/batches/{id}/images/split",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'completed_only' => true,
'force_reassignment' => true,
'mark_all_complete' => true,
'promote_to_dataset' => true,
'target' => '<string>',
'test_split' => 123,
'train_split' => 123,
'val_split' => 123
]),
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://acusight.io/api/data/batches/{id}/images/split"
payload := strings.NewReader("{\n \"completed_only\": true,\n \"force_reassignment\": true,\n \"mark_all_complete\": true,\n \"promote_to_dataset\": true,\n \"target\": \"<string>\",\n \"test_split\": 123,\n \"train_split\": 123,\n \"val_split\": 123\n}")
req, _ := http.NewRequest("PUT", 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.put("https://acusight.io/api/data/batches/{id}/images/split")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"completed_only\": true,\n \"force_reassignment\": true,\n \"mark_all_complete\": true,\n \"promote_to_dataset\": true,\n \"target\": \"<string>\",\n \"test_split\": 123,\n \"train_split\": 123,\n \"val_split\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://acusight.io/api/data/batches/{id}/images/split")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"completed_only\": true,\n \"force_reassignment\": true,\n \"mark_all_complete\": true,\n \"promote_to_dataset\": true,\n \"target\": \"<string>\",\n \"test_split\": 123,\n \"train_split\": 123,\n \"val_split\": 123\n}"
response = http.request(request)
puts response.read_body{
"data": {
"batch_id": 123,
"class_distribution": {},
"class_targets": {},
"kept_count": 123,
"locked_count": 123,
"moved_count": 123,
"split_counts": {},
"test_count": 123,
"total": 123,
"train_count": 123,
"val_count": 123,
"warnings": [
"<string>"
]
},
"error": {
"code": "<string>",
"details": "<string>",
"message": "<string>"
},
"meta": {
"count": 123,
"limit": 123,
"offset": 123,
"total": 123
},
"success": true
}{
"data": "<unknown>",
"error": {
"code": "<string>",
"details": "<string>",
"message": "<string>"
},
"meta": {
"count": 123,
"limit": 123,
"offset": 123,
"total": 123
},
"success": true
}{
"data": "<unknown>",
"error": {
"code": "<string>",
"details": "<string>",
"message": "<string>"
},
"meta": {
"count": 123,
"limit": 123,
"offset": 123,
"total": 123
},
"success": true
}{
"data": "<unknown>",
"error": {
"code": "<string>",
"details": "<string>",
"message": "<string>"
},
"meta": {
"count": 123,
"limit": 123,
"offset": 123,
"total": 123
},
"success": true
}Authorizations
JWT access token. Paste the token only; the Bearer prefix is added automatically.
Path Parameters
Batch ID
Body
application/json
Split configuration
Available options:
proportions, all, existing Optional: only split images with completed annotations (default true)
Optional: mark all images as completed before processing (default false)
"train" | "val" | "test" (when Mode = all)
Was this page helpful?