# Create and execute experiment

**POST** `/v1/private/experiments/execute`

Creates experiments for each prompt variant and asynchronously processes all dataset items

Base URL: `https://www.comet.com/opik/api`

Tags: `Experiments`

## Authorization

This operation requires no authorization.

## Request body

Required. Media type: `application/json`

### Example request body

```json
{
  "dataset_id": "00000000-0000-0000-0000-000000000000",
  "dataset_name": "string",
  "dataset_version_id": "00000000-0000-0000-0000-000000000000",
  "project_name": "string",
  "prompt_versions": [
    {
      "id": "00000000-0000-0000-0000-000000000000"
    }
  ],
  "prompts": [
    {
      "configs": {
        "additionalProp1": {}
      },
      "experiment_name": "string",
      "messages": [
        {
          "content": {},
          "role": "string"
        }
      ],
      "model": "string",
      "prompt_versions": [
        {
          "id": "00000000-0000-0000-0000-000000000000"
        }
      ]
    }
  ],
  "version_hash": "string"
}
```

## Responses

| Status | Description | Media type |
| --- | --- | --- |
| `202` | Experiments created and processing started | `application/json` |

### Example response: 202 — Experiments created and processing started

```json
{
  "experiments": [
    {
      "experiment_id": "00000000-0000-0000-0000-000000000000",
      "prompt_index": 0
    }
  ],
  "total_items": 0
}
```

## Related pages

- [Activate a pairing session](./activatepairingsession.md)
- [Add blueprint to existing config](./updateagentconfig.md)
- [Add items to annotation queue](./additemstoannotationqueue.md)
- [Add span comment](./addspancomment.md)
- [Add span feedback score](./addspanfeedbackscore.md)
- [Add thread comment](./addthreadcomment.md)
- [Add trace comment](./addtracecomment.md)
- [Add trace feedback score](./addtracefeedbackscore.md)
- [Agent Configs](./tags/agent-configs.md)
- [Agent Insights](./tags/agent-insights.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
