Skip to main content
POST
Create AI Config variation

Authorizations

Authorization
string
header
required

Path Parameters

projectKey
string
required

The project key

configKey
string
required

The AI Config key

Body

application/json

AI Config variation object to create

key
string
required

A unique key for the variation

name
string
required

A human-readable name for the variation

classifiers
object[]

Classifier rules for a judge variation. When this array is non-empty, messages must be empty.

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[]

The prompt messages for this variation

model
object

Freeform JSON object. LaunchDarkly does not validate the keys. In a model config, params and customParams hold parameters that the provider's API accepts, for example {"temperature": 0.7, "maxTokens": 4096}.

modelConfigKey
string

The key that GET /api/v2/projects/{projectKey}/ai-configs/model-configs returns for the model config. Do not use a custom model config's ID, which is the provider model ID.

Example:

"OpenAI.gpt-4.1"

modelConfigVersion
integer

The exact model config version to set this variation to. Requires modelConfigKey to be set, and the version must exist for that model config. When omitted, the variation records the model config's current (latest) version.

Required range: x >= 1
outputFormat
object

JSON Schema defining the structured output format for the variation.

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.

skills
object[]

List of agent skills to attach to this variation.

judgeConfiguration
object
Example:

Response

AI Config variation created

key
string
required

The variation key

_id
string
required

The variation ID

model
object
required

Freeform JSON object. LaunchDarkly does not validate the keys. In a model config, params and customParams hold parameters that the provider's API accepts, for example {"temperature": 0.7, "maxTokens": 4096}.

name
string
required

The variation name

createdAt
integer<int64>
required
version
integer
required

The version number of this resource

Example:
color
string

The color used for this variation in the UI

classifiers
object[]

Classifier rules for a judge variation. When this array is non-empty, messages must be empty.

comment
string

A comment describing this version of the 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[]

The prompt messages for this variation

modelConfigKey
string

The key of the model config that this variation uses, not the provider model ID. Absent when the variation does not use a model config.

Example:

"OpenAI.gpt-4.1"

modelConfigVersion
integer

The version of the model config that this variation is pinned to, when it references a custom model config. Absent when the variation does not reference a model config, when the variation is not pinned to a specific version, or when custom model config versioning is not enabled for the project.

outputFormat
object

JSON Schema defining the structured output format for the variation.

state
enum<string>

The state of the variation.

  • archived: The variation is archived. To restore it, update the variation with state set to published.
  • published: The variation is active.
Available options:
archived,
published
Example:

"published"

_archivedAt
integer<int64>
_publishedAt
integer<int64>
tools
object[]

The tools this variation can use

skills
object[]

The agent skills this variation can use

judgeConfiguration
object
Example:
judgingConfigKeys
string[]

Keys of the judge AI Configs attached to this variation