Skip to main content
POST
/
v2
/
datasets
/
{datasetId}
/
examples
Add new examples to a dataset
curl --request POST \
  --url https://api.arize.com/v2/datasets/{datasetId}/examples \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "examples": [
    {
      "question": "What is 2 + 2?",
      "answer": "4",
      "topic": "arithmetic"
    },
    {
      "question": "What is the square root of 16?",
      "answer": "4",
      "topic": "geometry"
    },
    {
      "question": "If 3x = 12, what is x?",
      "answer": "4",
      "topic": "algebra"
    }
  ]
}
'
{
  "id": "<string>",
  "name": "<string>",
  "spaceId": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "versions": [
    {
      "id": "<string>",
      "name": "<string>",
      "datasetId": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

Most Arize AI endpoints require authentication. For those endpoints that require authentication, include your API key in the request header using the format

Authorization: Bearer <api-key>

Path Parameters

datasetId
string
required

The unique identifier of the dataset A universally unique identifier

Query Parameters

datasetVersionId
string

The unique identifier of the dataset version A universally unique identifier

Body

application/json

Body containing dataset examples for insert (append) operation with auto-generated IDs

examples
object[]
required

Array of examples to append to the dataset version

Response

A dataset object

A dataset is a structured collection of examples used to test and evaluate LLM applications. Datasets allow you to test models consistently across any real-world scenarios and edge cases, quickly identify regressions, and track measurable improvements.

id
string
required

Unique identifier for the dataset

name
string
required

Name of the dataset

spaceId
string
required

Unique identifier for the space this dataset belongs to

createdAt
string<date-time>
required

Timestamp for when the dataset was created

updatedAt
string<date-time>
required

Timestamp for the last update of the dataset

versions
object[]

List of versions associated with this dataset