---
title: "Create a experiment"
method: POST
path: "/v4/experiments"
tags: ["Experiments"]
---

# Create a experiment

`POST /v4/experiments`

Create a new experiment

## Request body

- CreateExperiment — Creates a new experiment with the given pipeline ID
  - `name` string — Friendly experiment name
  - `pipelineId` string, uuid, required — The ID of the pipeline to create the experiment for
  - `metadata` object — Optional metadata for the experiment

## Response `200`

Successful response

- Experiment
  - `id` string, uuid, required — Experiment UUID
  - `createdAt` string, required — Creation timestamp (ISO 8601)
  - `updatedAt` string, required — Last update timestamp (ISO 8601)
  - `name` string, nullable, required — Friendly experiment name
  - `pipelineId` string, required — Pipeline UUID
  - `metadata` object, nullable, required — Metadata

## Other responses

- `400` — Client provided an invalid request for the experiment. Please check the request format and parameters.
- `401` — No valid API key provided.
- `404` — The experiment resource does not exist.
- `500` — Something went wrong on Gentrace's end.

## Changes

- **2025-04-28** `76bde656b16e` — 5 breaking, 2 warning
  - the `createdAt` response's property format changed from `date-time` to no format for status `200`
  - the `updatedAt` response's property format changed from `date-time` to no format for status `200`
  - removed the required property `branch` from the response with the `200` status
  - removed the required property `commit` from the response with the `200` status
  - …3 more
- **2025-04-22** `610091298e37` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/gentrace/apis/gentrace-api/changes/v4/experiments/post.md)

---

[API](https://skmtc.dev/gentrace/apis/gentrace-api.md) · [All operations](https://skmtc.dev/gentrace/apis/gentrace-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gentrace/gentrace-api/revisions/76bde656b16e/schema)
