# Create experiment

Launch stage: GA

`POST /api/2.0/mlflow/experiments/create`

`POST /api/2.0/preview/mlflow/experiments/create`

Creates an experiment with a name. Returns the ID of the newly created experiment.
 Validates that another experiment with the same name does not already exist and fails
 if another experiment with the same name already exists.


 Throws `RESOURCE_ALREADY_EXISTS` if an experiment with the given name exists.
 Note: In some contexts, this error may be remapped to `ALREADY_EXISTS`.
 To be safe, clients should check for both error codes.

API scopes: mlflow

## Request body

- `name` (string, required)
  Name of the experiment, as an absolute path in the workspace. Experiments cannot be created
   under `/Repos`.
  Example: `/Users/jane.doe@example.com/churn-prediction`
- `artifact_location` (string, optional)
  URI of the location where the artifacts of the experiment's runs are stored, such as a Unity
   Catalog volume path of the form `dbfs:/Volumes/<catalog>/<schema>/<volume>/<path>`. The URI
   must have a scheme other than `file` and must not point under the MLflow-managed prefix
   `dbfs:/databricks/mlflow-tracking`. If omitted, artifacts are stored in MLflow-managed
   storage. See https://docs.databricks.com/aws/en/mlflow/experiments for the supported
   locations.
- `tags` (array of object, optional)
  Tags to set on the new experiment, as key-value pairs. A request can include at most 100
   tags.
  - `key` (string, optional)
    The tag key. Keys are at most 255 characters long.
  - `value` (string, optional)
    The tag value. Values are at most 65535 characters long.

## Returns

- `experiment_id` (string, optional)
  Unique identifier for the experiment.

## Request

```json
{
  "name": "/Users/jane.doe@example.com/churn-prediction",
  "artifact_location": "dbfs:/Volumes/main/ml/experiment_artifacts/churn-prediction",
  "tags": [
    {
      "key": "team",
      "value": "growth"
    }
  ]
}
```

## Response

```json
{
  "experiment_id": "4150739527164012"
}
```

