Create a dataset
Create a new dataset
curl --request POST \
--url https://gentrace.ai/api/v4/datasets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Dataset - negative user feedback - 2025-04-01",
"description": "Negative user feedback collected from our production environment",
"isGolden": false,
"pipelineSlug": "email-summarizer",
"pipelineId": "123e4567-e89b-12d3-a456-426614174000"
}
'import requests
url = "https://gentrace.ai/api/v4/datasets"
payload = {
"name": "Dataset - negative user feedback - 2025-04-01",
"description": "Negative user feedback collected from our production environment",
"isGolden": False,
"pipelineSlug": "email-summarizer",
"pipelineId": "123e4567-e89b-12d3-a456-426614174000"
}
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({
name: 'Dataset - negative user feedback - 2025-04-01',
description: 'Negative user feedback collected from our production environment',
isGolden: false,
pipelineSlug: 'email-summarizer',
pipelineId: '123e4567-e89b-12d3-a456-426614174000'
})
};
fetch('https://gentrace.ai/api/v4/datasets', 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://gentrace.ai/api/v4/datasets",
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([
'name' => 'Dataset - negative user feedback - 2025-04-01',
'description' => 'Negative user feedback collected from our production environment',
'isGolden' => false,
'pipelineSlug' => 'email-summarizer',
'pipelineId' => '123e4567-e89b-12d3-a456-426614174000'
]),
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://gentrace.ai/api/v4/datasets"
payload := strings.NewReader("{\n \"name\": \"Dataset - negative user feedback - 2025-04-01\",\n \"description\": \"Negative user feedback collected from our production environment\",\n \"isGolden\": false,\n \"pipelineSlug\": \"email-summarizer\",\n \"pipelineId\": \"123e4567-e89b-12d3-a456-426614174000\"\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://gentrace.ai/api/v4/datasets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Dataset - negative user feedback - 2025-04-01\",\n \"description\": \"Negative user feedback collected from our production environment\",\n \"isGolden\": false,\n \"pipelineSlug\": \"email-summarizer\",\n \"pipelineId\": \"123e4567-e89b-12d3-a456-426614174000\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gentrace.ai/api/v4/datasets")
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 \"name\": \"Dataset - negative user feedback - 2025-04-01\",\n \"description\": \"Negative user feedback collected from our production environment\",\n \"isGolden\": false,\n \"pipelineSlug\": \"email-summarizer\",\n \"pipelineId\": \"123e4567-e89b-12d3-a456-426614174000\"\n}"
response = http.request(request)
puts response.read_body{
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-04-01T00:00:00.000Z",
"updatedAt": "2025-04-01T00:00:00.000Z",
"name": "Dataset - negative user feedback - 2025-04-01",
"description": "Negative user feedback collected from our production environment",
"archivedAt": "2025-04-01T00:00:00.000Z",
"pipelineId": "123e4567-e89b-12d3-a456-426614174000"
}{
"message": "Invalid parameters: 'name' field is required"
}{
"message": "Invalid or expired API key"
}{
"message": "Resource with ID '123e4567-e89b-12d3-a456-426614174000' not found"
}{
"message": "Internal server error occurred while processing the request"
}Authorizations
Enter Gentrace API key (Format: Authorization: Bearer )
Body
Dataset name
"Dataset - negative user feedback - 2025-04-01"
Dataset description
"Negative user feedback collected from our production environment"
Whether the dataset is golden
false
Pipeline slug (mutually exclusive with pipelineId)
"email-summarizer"
Pipeline ID (mutually exclusive with pipelineSlug)
"123e4567-e89b-12d3-a456-426614174000"
Response
Successful response
Dataset UUID
"123e4567-e89b-12d3-a456-426614174000"
Creation timestamp (ISO 8601)
"2025-04-01T00:00:00.000Z"
Last update timestamp (ISO 8601)
"2025-04-01T00:00:00.000Z"
Dataset name
"Dataset - negative user feedback - 2025-04-01"
Dataset description
"Negative user feedback collected from our production environment"
Archive timestamp (ISO 8601)
"2025-04-01T00:00:00.000Z"
Pipeline UUID
"123e4567-e89b-12d3-a456-426614174000"
curl --request POST \
--url https://gentrace.ai/api/v4/datasets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Dataset - negative user feedback - 2025-04-01",
"description": "Negative user feedback collected from our production environment",
"isGolden": false,
"pipelineSlug": "email-summarizer",
"pipelineId": "123e4567-e89b-12d3-a456-426614174000"
}
'import requests
url = "https://gentrace.ai/api/v4/datasets"
payload = {
"name": "Dataset - negative user feedback - 2025-04-01",
"description": "Negative user feedback collected from our production environment",
"isGolden": False,
"pipelineSlug": "email-summarizer",
"pipelineId": "123e4567-e89b-12d3-a456-426614174000"
}
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({
name: 'Dataset - negative user feedback - 2025-04-01',
description: 'Negative user feedback collected from our production environment',
isGolden: false,
pipelineSlug: 'email-summarizer',
pipelineId: '123e4567-e89b-12d3-a456-426614174000'
})
};
fetch('https://gentrace.ai/api/v4/datasets', 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://gentrace.ai/api/v4/datasets",
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([
'name' => 'Dataset - negative user feedback - 2025-04-01',
'description' => 'Negative user feedback collected from our production environment',
'isGolden' => false,
'pipelineSlug' => 'email-summarizer',
'pipelineId' => '123e4567-e89b-12d3-a456-426614174000'
]),
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://gentrace.ai/api/v4/datasets"
payload := strings.NewReader("{\n \"name\": \"Dataset - negative user feedback - 2025-04-01\",\n \"description\": \"Negative user feedback collected from our production environment\",\n \"isGolden\": false,\n \"pipelineSlug\": \"email-summarizer\",\n \"pipelineId\": \"123e4567-e89b-12d3-a456-426614174000\"\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://gentrace.ai/api/v4/datasets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Dataset - negative user feedback - 2025-04-01\",\n \"description\": \"Negative user feedback collected from our production environment\",\n \"isGolden\": false,\n \"pipelineSlug\": \"email-summarizer\",\n \"pipelineId\": \"123e4567-e89b-12d3-a456-426614174000\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gentrace.ai/api/v4/datasets")
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 \"name\": \"Dataset - negative user feedback - 2025-04-01\",\n \"description\": \"Negative user feedback collected from our production environment\",\n \"isGolden\": false,\n \"pipelineSlug\": \"email-summarizer\",\n \"pipelineId\": \"123e4567-e89b-12d3-a456-426614174000\"\n}"
response = http.request(request)
puts response.read_body{
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-04-01T00:00:00.000Z",
"updatedAt": "2025-04-01T00:00:00.000Z",
"name": "Dataset - negative user feedback - 2025-04-01",
"description": "Negative user feedback collected from our production environment",
"archivedAt": "2025-04-01T00:00:00.000Z",
"pipelineId": "123e4567-e89b-12d3-a456-426614174000"
}{
"message": "Invalid parameters: 'name' field is required"
}{
"message": "Invalid or expired API key"
}{
"message": "Resource with ID '123e4567-e89b-12d3-a456-426614174000' not found"
}{
"message": "Internal server error occurred while processing the request"
}