Skip to main content
POST
/
api
/
v2
/
projects
/
{projectKey}
/
ai-configs
/
{configKey}
/
variations
Create AI Config variation
curl --request POST \
  --url https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "judgeConfiguration": {
    "judges": [
      {
        "samplingRate": 0.7061401,
        "judgeConfigKey": "judgeConfigKey"
      },
      {
        "samplingRate": 0.7061401,
        "judgeConfigKey": "judgeConfigKey"
      }
    ]
  },
  "instructions": "instructions",
  "toolKeys": [
    "toolKeys",
    "toolKeys"
  ],
  "name": "name",
  "description": "description",
  "messages": [
    {
      "role": "role",
      "content": "content"
    },
    {
      "role": "role",
      "content": "content"
    }
  ],
  "comment": "comment",
  "model": "{}",
  "modelConfigKey": "modelConfigKey",
  "tools": [
    {
      "version": 0,
      "key": "key"
    },
    {
      "version": 0,
      "key": "key"
    }
  ],
  "key": "key"
}
'
{
  "judgeConfiguration": {
    "judges": [
      {
        "samplingRate": 0.7061401,
        "judgeConfigKey": "judgeConfigKey"
      },
      {
        "samplingRate": 0.7061401,
        "judgeConfigKey": "judgeConfigKey"
      }
    ]
  },
  "instructions": "instructions",
  "color": "color",
  "_links": {
    "parent": {
      "href": "href",
      "type": "type"
    }
  },
  "description": "description",
  "modelConfigKey": "modelConfigKey",
  "judgingConfigKeys": [
    "judgingConfigKeys",
    "judgingConfigKeys"
  ],
  "version": 1,
  "tools": [
    {
      "customParameters": {
        "key": ""
      },
      "version": 2,
      "key": "key"
    },
    {
      "customParameters": {
        "key": ""
      },
      "version": 2,
      "key": "key"
    }
  ],
  "createdAt": 6,
  "_publishedAt": 5,
  "_archivedAt": 5,
  "name": "name",
  "messages": [
    {
      "role": "role",
      "content": "content"
    },
    {
      "role": "role",
      "content": "content"
    }
  ],
  "comment": "comment",
  "model": "{}",
  "_id": "_id",
  "state": "state",
  "key": "key"
}

Documentation Index

Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Path Parameters

projectKey
string
required
configKey
string
required

Body

application/json

AI Config variation object to create

key
string
required
name
string
required
comment
string

Human-readable description of this variation

description
string

Returns the description for the agent. This is only returned for agent variations.

instructions
string

Returns the instructions for the agent. This is only returned for agent variations.

messages
object[]
model
object
modelConfigKey
string
tools
object[]

List of tools to use for this variation. The latest version of the tool will be used.

toolKeys
string[]

List of tool keys to use for this variation. The latest version of the tool will be used.

judgeConfiguration
object
Example:
{
"judges": [
{
"samplingRate": 0.7061401,
"judgeConfigKey": "judgeConfigKey"
},
{
"samplingRate": 0.7061401,
"judgeConfigKey": "judgeConfigKey"
}
]
}

Response

AI Config variation created

key
string
required
_id
string
required
model
object
required
name
string
required
createdAt
integer<int64>
required
version
integer
required
Example:
{
"parent": { "href": "href", "type": "type" }
}
color
string
comment
string
description
string

Returns the description for the agent. This is only returned for agent variations.

instructions
string

Returns the instructions for the agent. This is only returned for agent variations.

messages
object[]
modelConfigKey
string
state
string
_archivedAt
integer<int64>
_publishedAt
integer<int64>
tools
object[]
judgeConfiguration
object
Example:
{
"judges": [
{
"samplingRate": 0.7061401,
"judgeConfigKey": "judgeConfigKey"
},
{
"samplingRate": 0.7061401,
"judgeConfigKey": "judgeConfigKey"
}
]
}
judgingConfigKeys
string[]