Skip to main content
POST
Create an experiment

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

Body

application/json

Body containing experiment creation parameters

Experiment creation parameters with an initial set of runs.

An experiment belongs to a space and may optionally be associated with a dataset. Provide exactly one of:

  • dataset_id — associate the experiment with a dataset; it's created in that dataset's space, and its runs may reference the dataset's examples via example_id.
  • space_id — the space to create the experiment in, when it isn't associated with a dataset.

Providing both, or neither, is a validation error.

name
string
required

Name of the experiment. Must not contain double quotes (") or backslashes (\).

Minimum string length: 1
Pattern: ^[^"\\]*$
experiment_runs
object[]
required

Array of experiment run data

dataset_id
string | null

ID of the dataset to associate the experiment with. Provide space_id instead when the experiment isn't associated with a dataset.

space_id
string | null

ID of the space to create the experiment in. Provide instead of dataset_id.

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

space_id
string
required

Unique identifier for the space this experiment belongs to

created_at
string<date-time>
required

Timestamp for when the experiment was created

updated_at
string<date-time>
required

Timestamp for the last update of the experiment

dataset_id
string | null

Unique identifier for the dataset associated with this experiment. Null if the experiment isn't associated with a dataset.

dataset_version_id
string | null

Unique identifier for the dataset version associated with this experiment. Null if the experiment isn't associated with a dataset.

experiment_traces_project_id
string

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

integration_id
string | null

Identifier (base64) of the agent integration that backs this experiment, as returned by the integrations API. Null for non-agent experiments (for example, SDK or Playground experiments).