Add dataset items
curl --request POST \
--url https://api.sidenet.ai/v1/datasets/{id}/items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"input": "Can I get a refund on an order I placed yesterday?",
"groundTruth": "Yes — orders can be refunded within 14 days. Ask for the order number.",
"metadata": {
"category": "refunds"
}
},
{
"input": [
{
"role": "user",
"content": "I placed an order yesterday"
},
{
"role": "assistant",
"content": "Got it — what would you like to do with it?"
},
{
"role": "user",
"content": "Cancel it and refund me"
}
],
"groundTruth": "Confirms the cancellation window and asks for the order number."
}
]
}
'import requests
url = "https://api.sidenet.ai/v1/datasets/{id}/items"
payload = { "items": [
{
"input": "Can I get a refund on an order I placed yesterday?",
"groundTruth": "Yes — orders can be refunded within 14 days. Ask for the order number.",
"metadata": { "category": "refunds" }
},
{
"input": [
{
"role": "user",
"content": "I placed an order yesterday"
},
{
"role": "assistant",
"content": "Got it — what would you like to do with it?"
},
{
"role": "user",
"content": "Cancel it and refund me"
}
],
"groundTruth": "Confirms the cancellation window and asks for the order number."
}
] }
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({
items: [
{
input: 'Can I get a refund on an order I placed yesterday?',
groundTruth: 'Yes — orders can be refunded within 14 days. Ask for the order number.',
metadata: {category: 'refunds'}
},
{
input: [
{role: 'user', content: 'I placed an order yesterday'},
{role: 'assistant', content: 'Got it — what would you like to do with it?'},
{role: 'user', content: 'Cancel it and refund me'}
],
groundTruth: 'Confirms the cancellation window and asks for the order number.'
}
]
})
};
fetch('https://api.sidenet.ai/v1/datasets/{id}/items', 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://api.sidenet.ai/v1/datasets/{id}/items",
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([
'items' => [
[
'input' => 'Can I get a refund on an order I placed yesterday?',
'groundTruth' => 'Yes — orders can be refunded within 14 days. Ask for the order number.',
'metadata' => [
'category' => 'refunds'
]
],
[
'input' => [
[
'role' => 'user',
'content' => 'I placed an order yesterday'
],
[
'role' => 'assistant',
'content' => 'Got it — what would you like to do with it?'
],
[
'role' => 'user',
'content' => 'Cancel it and refund me'
]
],
'groundTruth' => 'Confirms the cancellation window and asks for the order number.'
]
]
]),
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://api.sidenet.ai/v1/datasets/{id}/items"
payload := strings.NewReader("{\n \"items\": [\n {\n \"input\": \"Can I get a refund on an order I placed yesterday?\",\n \"groundTruth\": \"Yes — orders can be refunded within 14 days. Ask for the order number.\",\n \"metadata\": {\n \"category\": \"refunds\"\n }\n },\n {\n \"input\": [\n {\n \"role\": \"user\",\n \"content\": \"I placed an order yesterday\"\n },\n {\n \"role\": \"assistant\",\n \"content\": \"Got it — what would you like to do with it?\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Cancel it and refund me\"\n }\n ],\n \"groundTruth\": \"Confirms the cancellation window and asks for the order number.\"\n }\n ]\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://api.sidenet.ai/v1/datasets/{id}/items")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"input\": \"Can I get a refund on an order I placed yesterday?\",\n \"groundTruth\": \"Yes — orders can be refunded within 14 days. Ask for the order number.\",\n \"metadata\": {\n \"category\": \"refunds\"\n }\n },\n {\n \"input\": [\n {\n \"role\": \"user\",\n \"content\": \"I placed an order yesterday\"\n },\n {\n \"role\": \"assistant\",\n \"content\": \"Got it — what would you like to do with it?\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Cancel it and refund me\"\n }\n ],\n \"groundTruth\": \"Confirms the cancellation window and asks for the order number.\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sidenet.ai/v1/datasets/{id}/items")
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 \"items\": [\n {\n \"input\": \"Can I get a refund on an order I placed yesterday?\",\n \"groundTruth\": \"Yes — orders can be refunded within 14 days. Ask for the order number.\",\n \"metadata\": {\n \"category\": \"refunds\"\n }\n },\n {\n \"input\": [\n {\n \"role\": \"user\",\n \"content\": \"I placed an order yesterday\"\n },\n {\n \"role\": \"assistant\",\n \"content\": \"Got it — what would you like to do with it?\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Cancel it and refund me\"\n }\n ],\n \"groundTruth\": \"Confirms the cancellation window and asks for the order number.\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "dsi_2c7e91b4",
"datasetId": "ds_orders_v3",
"version": 2,
"input": "Can I get a refund on an order I placed yesterday?",
"groundTruth": "Yes — orders can be refunded within 14 days. Ask for the order number.",
"requestContext": null,
"metadata": {
"category": "refunds"
},
"createdAt": "2026-08-04T10:31:48.006Z",
"updatedAt": "2026-08-04T10:31:48.006Z"
}
],
"version": 2
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}Datasets
Add dataset items
Appends up to 500 items. Each item is one prompt the agent will answer (input), with an optional expected answer (groundTruth) for the scorers that compare against one, optional per-item requestContext (a thread to pin the item to, prompt variables for that row) and free-form metadata. Adding bumps the dataset version.
POST
/
v1
/
datasets
/
{id}
/
items
Add dataset items
curl --request POST \
--url https://api.sidenet.ai/v1/datasets/{id}/items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"input": "Can I get a refund on an order I placed yesterday?",
"groundTruth": "Yes — orders can be refunded within 14 days. Ask for the order number.",
"metadata": {
"category": "refunds"
}
},
{
"input": [
{
"role": "user",
"content": "I placed an order yesterday"
},
{
"role": "assistant",
"content": "Got it — what would you like to do with it?"
},
{
"role": "user",
"content": "Cancel it and refund me"
}
],
"groundTruth": "Confirms the cancellation window and asks for the order number."
}
]
}
'import requests
url = "https://api.sidenet.ai/v1/datasets/{id}/items"
payload = { "items": [
{
"input": "Can I get a refund on an order I placed yesterday?",
"groundTruth": "Yes — orders can be refunded within 14 days. Ask for the order number.",
"metadata": { "category": "refunds" }
},
{
"input": [
{
"role": "user",
"content": "I placed an order yesterday"
},
{
"role": "assistant",
"content": "Got it — what would you like to do with it?"
},
{
"role": "user",
"content": "Cancel it and refund me"
}
],
"groundTruth": "Confirms the cancellation window and asks for the order number."
}
] }
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({
items: [
{
input: 'Can I get a refund on an order I placed yesterday?',
groundTruth: 'Yes — orders can be refunded within 14 days. Ask for the order number.',
metadata: {category: 'refunds'}
},
{
input: [
{role: 'user', content: 'I placed an order yesterday'},
{role: 'assistant', content: 'Got it — what would you like to do with it?'},
{role: 'user', content: 'Cancel it and refund me'}
],
groundTruth: 'Confirms the cancellation window and asks for the order number.'
}
]
})
};
fetch('https://api.sidenet.ai/v1/datasets/{id}/items', 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://api.sidenet.ai/v1/datasets/{id}/items",
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([
'items' => [
[
'input' => 'Can I get a refund on an order I placed yesterday?',
'groundTruth' => 'Yes — orders can be refunded within 14 days. Ask for the order number.',
'metadata' => [
'category' => 'refunds'
]
],
[
'input' => [
[
'role' => 'user',
'content' => 'I placed an order yesterday'
],
[
'role' => 'assistant',
'content' => 'Got it — what would you like to do with it?'
],
[
'role' => 'user',
'content' => 'Cancel it and refund me'
]
],
'groundTruth' => 'Confirms the cancellation window and asks for the order number.'
]
]
]),
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://api.sidenet.ai/v1/datasets/{id}/items"
payload := strings.NewReader("{\n \"items\": [\n {\n \"input\": \"Can I get a refund on an order I placed yesterday?\",\n \"groundTruth\": \"Yes — orders can be refunded within 14 days. Ask for the order number.\",\n \"metadata\": {\n \"category\": \"refunds\"\n }\n },\n {\n \"input\": [\n {\n \"role\": \"user\",\n \"content\": \"I placed an order yesterday\"\n },\n {\n \"role\": \"assistant\",\n \"content\": \"Got it — what would you like to do with it?\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Cancel it and refund me\"\n }\n ],\n \"groundTruth\": \"Confirms the cancellation window and asks for the order number.\"\n }\n ]\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://api.sidenet.ai/v1/datasets/{id}/items")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"input\": \"Can I get a refund on an order I placed yesterday?\",\n \"groundTruth\": \"Yes — orders can be refunded within 14 days. Ask for the order number.\",\n \"metadata\": {\n \"category\": \"refunds\"\n }\n },\n {\n \"input\": [\n {\n \"role\": \"user\",\n \"content\": \"I placed an order yesterday\"\n },\n {\n \"role\": \"assistant\",\n \"content\": \"Got it — what would you like to do with it?\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Cancel it and refund me\"\n }\n ],\n \"groundTruth\": \"Confirms the cancellation window and asks for the order number.\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sidenet.ai/v1/datasets/{id}/items")
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 \"items\": [\n {\n \"input\": \"Can I get a refund on an order I placed yesterday?\",\n \"groundTruth\": \"Yes — orders can be refunded within 14 days. Ask for the order number.\",\n \"metadata\": {\n \"category\": \"refunds\"\n }\n },\n {\n \"input\": [\n {\n \"role\": \"user\",\n \"content\": \"I placed an order yesterday\"\n },\n {\n \"role\": \"assistant\",\n \"content\": \"Got it — what would you like to do with it?\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Cancel it and refund me\"\n }\n ],\n \"groundTruth\": \"Confirms the cancellation window and asks for the order number.\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "dsi_2c7e91b4",
"datasetId": "ds_orders_v3",
"version": 2,
"input": "Can I get a refund on an order I placed yesterday?",
"groundTruth": "Yes — orders can be refunded within 14 days. Ask for the order number.",
"requestContext": null,
"metadata": {
"category": "refunds"
},
"createdAt": "2026-08-04T10:31:48.006Z",
"updatedAt": "2026-08-04T10:31:48.006Z"
}
],
"version": 2
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}Authorizations
Organization API key, generated in studio.sidenet.ai. Backend only — never in a browser.
Path Parameters
Dataset id.
Example:
"ds_orders_v3"
Body
application/json
Show child attributes
Show child attributes
Example:
[
{
"input": "Can I get a refund on an order I placed yesterday?",
"groundTruth": "Yes — orders can be refunded within 14 days. Ask for the order number.",
"metadata": { "category": "refunds" }
},
{
"input": [
{
"role": "user",
"content": "I placed an order yesterday"
},
{
"role": "assistant",
"content": "Got it — what would you like to do with it?"
},
{
"role": "user",
"content": "Cancel it and refund me"
}
],
"groundTruth": "Confirms the cancellation window and asks for the order number."
}
]