Skip to main content
POST
/
v2
/
experiments
Create a new experiment
curl --request POST \
  --url https://api.arize.com/v2/experiments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "My Experiment Name",
  "datasetId": "dataset_12345",
  "experimentRuns": [
    {
      "example_id": "example_001",
      "output": "4",
      "model": "gpt-4o-mini",
      "temperature": 0.2,
      "latency_ms": 118,
      "prompt": "Answer the math question briefly."
    },
    {
      "example_id": "example_002",
      "output": "4",
      "model": "gpt-4o-mini",
      "temperature": 0.2,
      "latency_ms": 132
    },
    {
      "example_id": "example_003",
      "output": "4",
      "model": "gpt-4o-mini",
      "temperature": 0.2,
      "latency_ms": 125
    }
  ]
}
'
{
  "id": "<string>",
  "name": "<string>",
  "datasetId": "<string>",
  "datasetVersionId": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "experimentTracesProjectId": "<string>"
}

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>

Body

application/json

Body containing experiment creation parameters

name
string
required

Name of the experiment

datasetId
string
required

ID of the dataset to create the experiment for

experimentRuns
object[]
required

Array of experiment run data

Response

An experiment object

Experiments combine a dataset (example inputs/expected outputs), a task (the function that produces model outputs), and one or more evaluators (code or LLM judges) to measure performance. Each run is stored independently so you can compare runs, track progress, and validate improvements over time. See the full definition on the Experiments page.

Use an experiment to run tasks on a dataset, attach evaluators to score outputs, and compare runs to confirm improvements.

id
string
required

Unique identifier for the experiment

name
string
required

Name of the experiment

datasetId
string
required

Unique identifier for the dataset this experiment belongs to

datasetVersionId
string
required

Unique identifier for the dataset version this experiment belongs to

createdAt
string<date-time>
required

Timestamp for when the experiment was created

updatedAt
string<date-time>
required

Timestamp for the last update of the experiment

experimentTracesProjectId
string

Unique identifier for the experiment traces project this experiment belongs to (if it exists)