---
title: "Clone a sealed Experiment into a new pending definition with isolated evidence, applying any pin the request overrides."
method: POST
path: "/api/{org_id}/experiments/{experiment_id}/clone"
tags: ["Experiments"]
---

# Clone a sealed Experiment into a new pending definition with isolated evidence, applying any pin the request overrides.

`POST /api/{org_id}/experiments/{experiment_id}/clone`

## Request

- Base URL: `https://api.openobserve.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openobserve.ai/api/{org_id}/experiments/{experiment_id}/clone`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/openobserve/apis/openobserve-api-http/docs/api/:org_id/experiments/:experiment_id/clone/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `org_id` string, required
- `experiment_id` string, required

## Request body

- object: Every pin a clone may change, in the same shape the create body uses. A clone inherits its source's definition, so every field is optional: an absent one keeps what the source pinned, and an empty body is still a verbatim copy. `description`, `datasetFilter` and `metadata` are nullable on an Experiment, so an explicit `null` clears them rather than meaning "absent".
  - `confirmCostEstimate` boolean: Acknowledges a cost estimate above the organization's warning threshold. Without it, such a request is refused with `412`.
  - `datasetFilter` DatasetSnapshotFilterBody
    - `logicalIds` string[]
    - `metadata` object
    - `sources` DatasetItemSourceBody[]
    - `tags` string[]
  - `datasetId` string, nullable
  - `datasetVersion` integer, nullable
  - `description` string, nullable
  - `idempotencyKey` string, nullable: Makes a retried clone replay its first result instead of running the Experiment a second time.
  - `metadata` unknown
  - `name` string, nullable: Defaults to `<source name> (copy)`.
  - `scorers` ExperimentScorerRefBody[], nullable
    - `id` string, required
    - `version` integer, nullable
  - `task` union
    - object
      - `messages` PromptMessageBody[], required
        - `content` string, required
        - `role` string, required
      - `model` string, nullable
      - `params` unknown
      - `provider_id` string, required
      - `type` 'inline_prompt', required
    - object
      - `id` string, required
      - `params_overrides` PromptRefOverridesBody
        - `model` string, nullable
        - `params` unknown
        - `responseFormat` unknown
        - `tools` unknown
      - `provider_id` string, required
      - `type` 'prompt_ref', required
      - `version` integer, required
    - object
      - `overrides` RemoteTaskOverridesBody: The two runtime overrides an Experiment may set on a registered Remote Task.
        - `maxConcurrency` integer, nullable
        - `timeoutMs` integer, nullable
      - `task_ref` string, required: Pinned `name@version` of a published Remote Task. Never latest.
      - `type` 'remote', required
    - object
      - `config` unknown
      - `task_fingerprint` string, required: Immutable identity of the customer code under evaluation. Every execution record reported for this Experiment must repeat it.
      - `type` 'sdk', required
  - `trialCount` integer, nullable: Trials per Dataset Case, between 1 and the configured maximum.

## Response `200`

Pending clone created

- ExperimentResponseBody
  - `createdAt` integer, required
  - `createdBy` string, required
  - `datasetFilter` DatasetSnapshotFilterBody
    - `logicalIds` string[]
    - `metadata` object
    - `sources` DatasetItemSourceBody[]
    - `tags` string[]
  - `datasetId` string, required
  - `datasetName` string, nullable: Resolved from the Dataset the experiment pinned, so callers do not have to fetch the Dataset list just to label a run. None when it was deleted.
  - `datasetVersion` integer, required: The pinned `global_version`: the row cut every Slot reads.
  - `datasetWriteVersion` integer, required: The Dataset version to display for that pin: one per write request.
  - `deadlineAt` integer, required
  - `description` string, nullable
  - `executionCompletedAt` integer, nullable
  - `executionStatus` 'pending' | 'running' | 'completed' | 'failed' | 'cancelled', required
  - `executionStatusReason` string, nullable
  - `id` string, required
  - `idempotencyKey` string, nullable
  - `isBaseline` boolean, required: The organization's Baseline for this Dataset. At most one Experiment per organization and Dataset carries it.
  - `lifecycleVersion` integer, required
  - `metadata` unknown
  - `name` string, required
  - `orgId` string, required
  - `promptContentHash` string, nullable
  - `promptId` string, nullable
  - `promptName` string, nullable
  - `promptVersion` integer, nullable
  - `retryCount` integer, required
  - `scorers` PinnedExperimentScorerBody[], required
    - `id` string, required
    - `version` integer, required
  - `task` union, required
    - object
      - `messages` PromptMessageBody[], required
        - `content` string, required
        - `role` string, required
      - `model` string, nullable
      - `params` unknown
      - `provider_id` string, required
      - `type` 'inline_prompt', required
    - object
      - `id` string, required
      - `params_overrides` PromptRefOverridesBody
        - `model` string, nullable
        - `params` unknown
        - `responseFormat` unknown
        - `tools` unknown
      - `provider_id` string, required
      - `type` 'prompt_ref', required
      - `version` integer, required
    - object
      - `overrides` RemoteTaskOverridesBody: The two runtime overrides an Experiment may set on a registered Remote Task.
        - `maxConcurrency` integer, nullable
        - `timeoutMs` integer, nullable
      - `task_ref` string, required: Pinned `name@version` of a published Remote Task. Never latest.
      - `type` 'remote', required
    - object
      - `config` unknown
      - `task_fingerprint` string, required: Immutable identity of the customer code under evaluation. Every execution record reported for this Experiment must repeat it.
      - `type` 'sdk', required
  - `trialCount` integer, required

## Other responses

- `400`: Invalid Experiment definition after overrides
- `403`: A referenced Dataset, Scorer, Prompt, Provider or Remote Task is not accessible
- `404`: Experiment, Dataset or scorer not found
- `409`: Only sealed Experiments can be cloned, or the idempotency key describes a different clone
- `412`: Cost estimate is above the warning threshold and was not confirmed

---

[API](https://skmtc.dev/openobserve/apis/openobserve-api-http.md) - [All operations](https://skmtc.dev/openobserve/apis/openobserve-api-http/llms.txt) - [OpenAPI document](https://skmtc.dev/openobserve/apis/openobserve-api-http/revisions/0529b8a10252?raw)
