Skip to main content
PUT
/
v0
/
experiments
/
{id}
/
variants
/
{variantId}
Update experiment variant
curl --request PUT \
  --url https://api.avidoai.com/v0/experiments/{id}/variants/{variantId} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-application-id: <api-key>' \
  --data '
{
  "title": "Improved Variant",
  "description": "Tweaked temperature and top_p",
  "status": "REJECTED",
  "configPatch": {
    "llm": {
      "temperature": 0.5
    }
  }
}
'
{
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "experimentId": "123e4567-e89b-12d3-a456-426614174000",
    "createdAt": "2024-01-05T12:34:56.789Z",
    "modifiedAt": "2024-01-05T12:34:56.789Z",
    "title": "Credit Card Block",
    "description": "Wants to block their credit card",
    "status": "DRAFT",
    "configPatch": {
      "llm": {
        "temperature": 0.5
      }
    },
    "config": {
      "llm": {
        "temperature": 0.5
      }
    },
    "parentId": "123e4567-e89b-12d3-a456-426614174000",
    "result": {
      "passed": 4503599627370495,
      "failed": 4503599627370495,
      "total": 4503599627370495,
      "passRate": 50,
      "averageScore": 0.5,
      "evals": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "name": "<string>",
          "type": "NATURALNESS",
          "passed": 4503599627370495,
          "failed": 4503599627370495,
          "total": 4503599627370495,
          "passRate": 50,
          "averageScore": 0.5
        }
      ]
    }
  }
}

Authorizations

x-api-key
string
header
required

Your unique Avido API key

x-application-id
string
header
required

Your unique Avido Application ID

Path Parameters

id
string<uuid>
required

The unique identifier of the experiment

Example:

"123e4567-e89b-12d3-a456-426614174000"

variantId
string<uuid>
required

The unique identifier of the variant

Example:

"321e4567-e89b-12d3-a456-426614174000"

Body

application/json

Request body for updating an experiment variant

title
string

Updated title of the variant

Example:

"Improved Variant"

description
string

Updated description of the variant

Example:

"Tweaked temperature and top_p"

status
enum<string>
Available options:
REJECTED
configPatch
object

The config patch to apply to the system, entire config if baseline

Example:
{ "llm": { "temperature": 0.5 } }

Response

Successfully updated experiment variant

Response containing a single experiment variant

data
object
required