---
title: "Update a V2 experiment with diff-based selective re-run."
method: PUT
path: "/model-hub/experiments/v2/{experiment_id}/"
tags: ["model-hub"]
---

# Update a V2 experiment with diff-based selective re-run.

`PUT /model-hub/experiments/v2/{experiment_id}/`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/model-hub/experiments/v2/{experiment_id}/`
- Auth: one of:
  - API key in header `X-Api-Key`
  - API key in header `X-Secret-Key`

Editable fields: column_id, prompt_config, user_eval_metrics.
Re-run triggers (determined by fingerprint diffs, not field presence):
- prompt_config has new/modified entries → re-run those configs + ALL dependent evals
- user_eval_metrics has new/modified entries → re-run only those evals
- column_id changed → delete old base eval columns, re-run base evals
- If FE sends unchanged data, diffs return empty → no re-run

## Request body

- ExperimentUpdateV2
  - `column_id` string, uuid, nullable
  - `prompt_config` PromptConfigEntry[]
    - `id` string, uuid, nullable
    - `name` string
    - `prompt_id` string, uuid, nullable
    - `prompt_version` string, uuid, nullable
    - `agent_id` string, uuid, nullable
    - `agent_version` string, uuid, nullable
    - `model` object: String or JSON object.
    - `model_params` PromptModelParams
      - `temperature` number
      - `max_tokens` integer
      - `top_p` number
      - `frequency_penalty` number
      - `presence_penalty` number
      - `response_format` object: String or JSON object.
    - `configuration` PromptConfiguration
      - `tool_choice` string
      - `template_format` string
      - `tools` object[]
      - `output_format` string
      - `model_type` string
      - `model_detail` object: Any valid JSON value.
      - `voice_id` string
    - `output_format` string
    - `messages` MessageItem[]
      - `role` string, required
      - `content` object, required: Plain text string or array of content-part objects.
      - `name` string
      - `tool_calls` object: Any valid JSON value.
      - `tool_call_id` string
      - `id` string
    - `voice_input_column_id` string, uuid, nullable
  - `user_eval_metrics` EvalMetricEntry[]
    - `id` string, uuid, nullable
    - `template_id` string, uuid, required
    - `name` string, required
    - `config` object, required
    - `model` string
    - `error_localizer` boolean
    - `kb_id` string, uuid, nullable
    - `composite_weight_overrides` object, nullable

## Response `200`

OK

- ExperimentV2DetailResponse
  - `status` boolean, required
  - `result` ExperimentDetailV2, required
    - `id` string, uuid
    - `name` string, required
    - `dataset_id` string, uuid
    - `column_id` string, uuid, nullable
    - `experiment_type` 'llm' | 'tts' | 'stt' | 'image': Determines how the experiment executes: llm, tts, stt, or image.
    - `status` 'NotStarted' | 'Queued' | 'Running' | 'Completed' | 'Editing' | 'Inactive' | 'Failed' | 'PartialRun' | 'ExperimentEvaluation' | 'Uploading' | 'PartialExtracted' | 'Processing' | 'Deleting' | 'PartialCompleted' | 'OptimizationEvaluation' | 'Error' | 'Cancelled'
    - `snapshot_dataset_id` string, uuid, nullable
    - `prompt_configs` string
    - `agent_configs` string
    - `user_eval_metrics` string
    - `created_at` string, date-time

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `500`: Internal Server Error
- `default`: Default error response

---

[API](https://skmtc.dev/futureagi/apis/future-agi-management-api.md) · [All operations](https://skmtc.dev/futureagi/apis/future-agi-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/futureagi/apis/future-agi-management-api/revisions/c8684118e142?raw)
