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.36160767,
"judgeConfigKey": "judgeConfigKey"
},
{
"samplingRate": 0.36160767,
"judgeConfigKey": "judgeConfigKey"
}
]
},
"instructions": "instructions",
"description": "description",
"modelConfigKey": "OpenAI.gpt-4.1",
"tools": [
{
"version": 6,
"key": "key"
},
{
"version": 6,
"key": "key"
}
],
"skills": [
{
"version": 1,
"key": "key"
},
{
"version": 1,
"key": "key"
}
],
"toolKeys": [
"toolKeys",
"toolKeys"
],
"classifiers": [
{
"instructions": "instructions",
"criteria": "",
"type": "bool",
"key": "key"
},
{
"instructions": "instructions",
"criteria": "",
"type": "bool",
"key": "key"
}
],
"name": "name",
"messages": [
{
"role": "role",
"content": "content"
},
{
"role": "role",
"content": "content"
}
],
"comment": "comment",
"model": "{}",
"outputFormat": {
"key": ""
},
"key": "key",
"modelConfigVersion": 1
}
'import requests
url = "https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations"
payload = {
"judgeConfiguration": { "judges": [
{
"samplingRate": 0.36160767,
"judgeConfigKey": "judgeConfigKey"
},
{
"samplingRate": 0.36160767,
"judgeConfigKey": "judgeConfigKey"
}
] },
"instructions": "instructions",
"description": "description",
"modelConfigKey": "OpenAI.gpt-4.1",
"tools": [
{
"version": 6,
"key": "key"
},
{
"version": 6,
"key": "key"
}
],
"skills": [
{
"version": 1,
"key": "key"
},
{
"version": 1,
"key": "key"
}
],
"toolKeys": ["toolKeys", "toolKeys"],
"classifiers": [
{
"instructions": "instructions",
"criteria": "",
"type": "bool",
"key": "key"
},
{
"instructions": "instructions",
"criteria": "",
"type": "bool",
"key": "key"
}
],
"name": "name",
"messages": [
{
"role": "role",
"content": "content"
},
{
"role": "role",
"content": "content"
}
],
"comment": "comment",
"model": "{}",
"outputFormat": { "key": "" },
"key": "key",
"modelConfigVersion": 1
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
judgeConfiguration: {
judges: [
{samplingRate: 0.36160767, judgeConfigKey: 'judgeConfigKey'},
{samplingRate: 0.36160767, judgeConfigKey: 'judgeConfigKey'}
]
},
instructions: 'instructions',
description: 'description',
modelConfigKey: 'OpenAI.gpt-4.1',
tools: [{version: 6, key: 'key'}, {version: 6, key: 'key'}],
skills: [{version: 1, key: 'key'}, {version: 1, key: 'key'}],
toolKeys: ['toolKeys', 'toolKeys'],
classifiers: [
{instructions: 'instructions', criteria: '', type: 'bool', key: 'key'},
{instructions: 'instructions', criteria: '', type: 'bool', key: 'key'}
],
name: 'name',
messages: [{role: 'role', content: 'content'}, {role: 'role', content: 'content'}],
comment: 'comment',
model: '{}',
outputFormat: {key: ''},
key: 'key',
modelConfigVersion: 1
})
};
fetch('https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'judgeConfiguration' => [
'judges' => [
[
'samplingRate' => 0.36160767,
'judgeConfigKey' => 'judgeConfigKey'
],
[
'samplingRate' => 0.36160767,
'judgeConfigKey' => 'judgeConfigKey'
]
]
],
'instructions' => 'instructions',
'description' => 'description',
'modelConfigKey' => 'OpenAI.gpt-4.1',
'tools' => [
[
'version' => 6,
'key' => 'key'
],
[
'version' => 6,
'key' => 'key'
]
],
'skills' => [
[
'version' => 1,
'key' => 'key'
],
[
'version' => 1,
'key' => 'key'
]
],
'toolKeys' => [
'toolKeys',
'toolKeys'
],
'classifiers' => [
[
'instructions' => 'instructions',
'criteria' => '',
'type' => 'bool',
'key' => 'key'
],
[
'instructions' => 'instructions',
'criteria' => '',
'type' => 'bool',
'key' => 'key'
]
],
'name' => 'name',
'messages' => [
[
'role' => 'role',
'content' => 'content'
],
[
'role' => 'role',
'content' => 'content'
]
],
'comment' => 'comment',
'model' => '{}',
'outputFormat' => [
'key' => ''
],
'key' => 'key',
'modelConfigVersion' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations"
payload := strings.NewReader("{\n \"judgeConfiguration\": {\n \"judges\": [\n {\n \"samplingRate\": 0.36160767,\n \"judgeConfigKey\": \"judgeConfigKey\"\n },\n {\n \"samplingRate\": 0.36160767,\n \"judgeConfigKey\": \"judgeConfigKey\"\n }\n ]\n },\n \"instructions\": \"instructions\",\n \"description\": \"description\",\n \"modelConfigKey\": \"OpenAI.gpt-4.1\",\n \"tools\": [\n {\n \"version\": 6,\n \"key\": \"key\"\n },\n {\n \"version\": 6,\n \"key\": \"key\"\n }\n ],\n \"skills\": [\n {\n \"version\": 1,\n \"key\": \"key\"\n },\n {\n \"version\": 1,\n \"key\": \"key\"\n }\n ],\n \"toolKeys\": [\n \"toolKeys\",\n \"toolKeys\"\n ],\n \"classifiers\": [\n {\n \"instructions\": \"instructions\",\n \"criteria\": \"\",\n \"type\": \"bool\",\n \"key\": \"key\"\n },\n {\n \"instructions\": \"instructions\",\n \"criteria\": \"\",\n \"type\": \"bool\",\n \"key\": \"key\"\n }\n ],\n \"name\": \"name\",\n \"messages\": [\n {\n \"role\": \"role\",\n \"content\": \"content\"\n },\n {\n \"role\": \"role\",\n \"content\": \"content\"\n }\n ],\n \"comment\": \"comment\",\n \"model\": \"{}\",\n \"outputFormat\": {\n \"key\": \"\"\n },\n \"key\": \"key\",\n \"modelConfigVersion\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"judgeConfiguration\": {\n \"judges\": [\n {\n \"samplingRate\": 0.36160767,\n \"judgeConfigKey\": \"judgeConfigKey\"\n },\n {\n \"samplingRate\": 0.36160767,\n \"judgeConfigKey\": \"judgeConfigKey\"\n }\n ]\n },\n \"instructions\": \"instructions\",\n \"description\": \"description\",\n \"modelConfigKey\": \"OpenAI.gpt-4.1\",\n \"tools\": [\n {\n \"version\": 6,\n \"key\": \"key\"\n },\n {\n \"version\": 6,\n \"key\": \"key\"\n }\n ],\n \"skills\": [\n {\n \"version\": 1,\n \"key\": \"key\"\n },\n {\n \"version\": 1,\n \"key\": \"key\"\n }\n ],\n \"toolKeys\": [\n \"toolKeys\",\n \"toolKeys\"\n ],\n \"classifiers\": [\n {\n \"instructions\": \"instructions\",\n \"criteria\": \"\",\n \"type\": \"bool\",\n \"key\": \"key\"\n },\n {\n \"instructions\": \"instructions\",\n \"criteria\": \"\",\n \"type\": \"bool\",\n \"key\": \"key\"\n }\n ],\n \"name\": \"name\",\n \"messages\": [\n {\n \"role\": \"role\",\n \"content\": \"content\"\n },\n {\n \"role\": \"role\",\n \"content\": \"content\"\n }\n ],\n \"comment\": \"comment\",\n \"model\": \"{}\",\n \"outputFormat\": {\n \"key\": \"\"\n },\n \"key\": \"key\",\n \"modelConfigVersion\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"judgeConfiguration\": {\n \"judges\": [\n {\n \"samplingRate\": 0.36160767,\n \"judgeConfigKey\": \"judgeConfigKey\"\n },\n {\n \"samplingRate\": 0.36160767,\n \"judgeConfigKey\": \"judgeConfigKey\"\n }\n ]\n },\n \"instructions\": \"instructions\",\n \"description\": \"description\",\n \"modelConfigKey\": \"OpenAI.gpt-4.1\",\n \"tools\": [\n {\n \"version\": 6,\n \"key\": \"key\"\n },\n {\n \"version\": 6,\n \"key\": \"key\"\n }\n ],\n \"skills\": [\n {\n \"version\": 1,\n \"key\": \"key\"\n },\n {\n \"version\": 1,\n \"key\": \"key\"\n }\n ],\n \"toolKeys\": [\n \"toolKeys\",\n \"toolKeys\"\n ],\n \"classifiers\": [\n {\n \"instructions\": \"instructions\",\n \"criteria\": \"\",\n \"type\": \"bool\",\n \"key\": \"key\"\n },\n {\n \"instructions\": \"instructions\",\n \"criteria\": \"\",\n \"type\": \"bool\",\n \"key\": \"key\"\n }\n ],\n \"name\": \"name\",\n \"messages\": [\n {\n \"role\": \"role\",\n \"content\": \"content\"\n },\n {\n \"role\": \"role\",\n \"content\": \"content\"\n }\n ],\n \"comment\": \"comment\",\n \"model\": \"{}\",\n \"outputFormat\": {\n \"key\": \"\"\n },\n \"key\": \"key\",\n \"modelConfigVersion\": 1\n}"
response = http.request(request)
puts response.read_body{
"judgeConfiguration": {
"judges": [
{
"samplingRate": 0.36160767,
"judgeConfigKey": "judgeConfigKey"
},
{
"samplingRate": 0.36160767,
"judgeConfigKey": "judgeConfigKey"
}
]
},
"instructions": "instructions",
"color": "color",
"_links": {
"parent": {
"href": "href",
"type": "type"
}
},
"description": "description",
"modelConfigKey": "OpenAI.gpt-4.1",
"judgingConfigKeys": [
"judgingConfigKeys",
"judgingConfigKeys"
],
"version": 5,
"tools": [
{
"customParameters": {
"key": ""
},
"version": 7,
"key": "key"
},
{
"customParameters": {
"key": ""
},
"version": 7,
"key": "key"
}
],
"skills": [
{
"version": 9,
"key": "key"
},
{
"version": 9,
"key": "key"
}
],
"createdAt": 1,
"_publishedAt": 2,
"_archivedAt": 5,
"classifiers": [
{
"instructions": "instructions",
"criteria": "",
"type": "bool",
"key": "key"
},
{
"instructions": "instructions",
"criteria": "",
"type": "bool",
"key": "key"
}
],
"name": "name",
"messages": [
{
"role": "role",
"content": "content"
},
{
"role": "role",
"content": "content"
}
],
"comment": "comment",
"model": "{}",
"_id": "_id",
"state": "published",
"outputFormat": {
"key": ""
},
"key": "key",
"modelConfigVersion": 6
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}Create AI Config variation
Create a new variation for a given AI Config.
The model in the request body requires a modelName and parameters, for example:
"model": {
"modelName": "claude-3-opus-20240229",
"parameters": {
"max_tokens": 1024
}
}
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.36160767,
"judgeConfigKey": "judgeConfigKey"
},
{
"samplingRate": 0.36160767,
"judgeConfigKey": "judgeConfigKey"
}
]
},
"instructions": "instructions",
"description": "description",
"modelConfigKey": "OpenAI.gpt-4.1",
"tools": [
{
"version": 6,
"key": "key"
},
{
"version": 6,
"key": "key"
}
],
"skills": [
{
"version": 1,
"key": "key"
},
{
"version": 1,
"key": "key"
}
],
"toolKeys": [
"toolKeys",
"toolKeys"
],
"classifiers": [
{
"instructions": "instructions",
"criteria": "",
"type": "bool",
"key": "key"
},
{
"instructions": "instructions",
"criteria": "",
"type": "bool",
"key": "key"
}
],
"name": "name",
"messages": [
{
"role": "role",
"content": "content"
},
{
"role": "role",
"content": "content"
}
],
"comment": "comment",
"model": "{}",
"outputFormat": {
"key": ""
},
"key": "key",
"modelConfigVersion": 1
}
'import requests
url = "https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations"
payload = {
"judgeConfiguration": { "judges": [
{
"samplingRate": 0.36160767,
"judgeConfigKey": "judgeConfigKey"
},
{
"samplingRate": 0.36160767,
"judgeConfigKey": "judgeConfigKey"
}
] },
"instructions": "instructions",
"description": "description",
"modelConfigKey": "OpenAI.gpt-4.1",
"tools": [
{
"version": 6,
"key": "key"
},
{
"version": 6,
"key": "key"
}
],
"skills": [
{
"version": 1,
"key": "key"
},
{
"version": 1,
"key": "key"
}
],
"toolKeys": ["toolKeys", "toolKeys"],
"classifiers": [
{
"instructions": "instructions",
"criteria": "",
"type": "bool",
"key": "key"
},
{
"instructions": "instructions",
"criteria": "",
"type": "bool",
"key": "key"
}
],
"name": "name",
"messages": [
{
"role": "role",
"content": "content"
},
{
"role": "role",
"content": "content"
}
],
"comment": "comment",
"model": "{}",
"outputFormat": { "key": "" },
"key": "key",
"modelConfigVersion": 1
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
judgeConfiguration: {
judges: [
{samplingRate: 0.36160767, judgeConfigKey: 'judgeConfigKey'},
{samplingRate: 0.36160767, judgeConfigKey: 'judgeConfigKey'}
]
},
instructions: 'instructions',
description: 'description',
modelConfigKey: 'OpenAI.gpt-4.1',
tools: [{version: 6, key: 'key'}, {version: 6, key: 'key'}],
skills: [{version: 1, key: 'key'}, {version: 1, key: 'key'}],
toolKeys: ['toolKeys', 'toolKeys'],
classifiers: [
{instructions: 'instructions', criteria: '', type: 'bool', key: 'key'},
{instructions: 'instructions', criteria: '', type: 'bool', key: 'key'}
],
name: 'name',
messages: [{role: 'role', content: 'content'}, {role: 'role', content: 'content'}],
comment: 'comment',
model: '{}',
outputFormat: {key: ''},
key: 'key',
modelConfigVersion: 1
})
};
fetch('https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'judgeConfiguration' => [
'judges' => [
[
'samplingRate' => 0.36160767,
'judgeConfigKey' => 'judgeConfigKey'
],
[
'samplingRate' => 0.36160767,
'judgeConfigKey' => 'judgeConfigKey'
]
]
],
'instructions' => 'instructions',
'description' => 'description',
'modelConfigKey' => 'OpenAI.gpt-4.1',
'tools' => [
[
'version' => 6,
'key' => 'key'
],
[
'version' => 6,
'key' => 'key'
]
],
'skills' => [
[
'version' => 1,
'key' => 'key'
],
[
'version' => 1,
'key' => 'key'
]
],
'toolKeys' => [
'toolKeys',
'toolKeys'
],
'classifiers' => [
[
'instructions' => 'instructions',
'criteria' => '',
'type' => 'bool',
'key' => 'key'
],
[
'instructions' => 'instructions',
'criteria' => '',
'type' => 'bool',
'key' => 'key'
]
],
'name' => 'name',
'messages' => [
[
'role' => 'role',
'content' => 'content'
],
[
'role' => 'role',
'content' => 'content'
]
],
'comment' => 'comment',
'model' => '{}',
'outputFormat' => [
'key' => ''
],
'key' => 'key',
'modelConfigVersion' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations"
payload := strings.NewReader("{\n \"judgeConfiguration\": {\n \"judges\": [\n {\n \"samplingRate\": 0.36160767,\n \"judgeConfigKey\": \"judgeConfigKey\"\n },\n {\n \"samplingRate\": 0.36160767,\n \"judgeConfigKey\": \"judgeConfigKey\"\n }\n ]\n },\n \"instructions\": \"instructions\",\n \"description\": \"description\",\n \"modelConfigKey\": \"OpenAI.gpt-4.1\",\n \"tools\": [\n {\n \"version\": 6,\n \"key\": \"key\"\n },\n {\n \"version\": 6,\n \"key\": \"key\"\n }\n ],\n \"skills\": [\n {\n \"version\": 1,\n \"key\": \"key\"\n },\n {\n \"version\": 1,\n \"key\": \"key\"\n }\n ],\n \"toolKeys\": [\n \"toolKeys\",\n \"toolKeys\"\n ],\n \"classifiers\": [\n {\n \"instructions\": \"instructions\",\n \"criteria\": \"\",\n \"type\": \"bool\",\n \"key\": \"key\"\n },\n {\n \"instructions\": \"instructions\",\n \"criteria\": \"\",\n \"type\": \"bool\",\n \"key\": \"key\"\n }\n ],\n \"name\": \"name\",\n \"messages\": [\n {\n \"role\": \"role\",\n \"content\": \"content\"\n },\n {\n \"role\": \"role\",\n \"content\": \"content\"\n }\n ],\n \"comment\": \"comment\",\n \"model\": \"{}\",\n \"outputFormat\": {\n \"key\": \"\"\n },\n \"key\": \"key\",\n \"modelConfigVersion\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"judgeConfiguration\": {\n \"judges\": [\n {\n \"samplingRate\": 0.36160767,\n \"judgeConfigKey\": \"judgeConfigKey\"\n },\n {\n \"samplingRate\": 0.36160767,\n \"judgeConfigKey\": \"judgeConfigKey\"\n }\n ]\n },\n \"instructions\": \"instructions\",\n \"description\": \"description\",\n \"modelConfigKey\": \"OpenAI.gpt-4.1\",\n \"tools\": [\n {\n \"version\": 6,\n \"key\": \"key\"\n },\n {\n \"version\": 6,\n \"key\": \"key\"\n }\n ],\n \"skills\": [\n {\n \"version\": 1,\n \"key\": \"key\"\n },\n {\n \"version\": 1,\n \"key\": \"key\"\n }\n ],\n \"toolKeys\": [\n \"toolKeys\",\n \"toolKeys\"\n ],\n \"classifiers\": [\n {\n \"instructions\": \"instructions\",\n \"criteria\": \"\",\n \"type\": \"bool\",\n \"key\": \"key\"\n },\n {\n \"instructions\": \"instructions\",\n \"criteria\": \"\",\n \"type\": \"bool\",\n \"key\": \"key\"\n }\n ],\n \"name\": \"name\",\n \"messages\": [\n {\n \"role\": \"role\",\n \"content\": \"content\"\n },\n {\n \"role\": \"role\",\n \"content\": \"content\"\n }\n ],\n \"comment\": \"comment\",\n \"model\": \"{}\",\n \"outputFormat\": {\n \"key\": \"\"\n },\n \"key\": \"key\",\n \"modelConfigVersion\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"judgeConfiguration\": {\n \"judges\": [\n {\n \"samplingRate\": 0.36160767,\n \"judgeConfigKey\": \"judgeConfigKey\"\n },\n {\n \"samplingRate\": 0.36160767,\n \"judgeConfigKey\": \"judgeConfigKey\"\n }\n ]\n },\n \"instructions\": \"instructions\",\n \"description\": \"description\",\n \"modelConfigKey\": \"OpenAI.gpt-4.1\",\n \"tools\": [\n {\n \"version\": 6,\n \"key\": \"key\"\n },\n {\n \"version\": 6,\n \"key\": \"key\"\n }\n ],\n \"skills\": [\n {\n \"version\": 1,\n \"key\": \"key\"\n },\n {\n \"version\": 1,\n \"key\": \"key\"\n }\n ],\n \"toolKeys\": [\n \"toolKeys\",\n \"toolKeys\"\n ],\n \"classifiers\": [\n {\n \"instructions\": \"instructions\",\n \"criteria\": \"\",\n \"type\": \"bool\",\n \"key\": \"key\"\n },\n {\n \"instructions\": \"instructions\",\n \"criteria\": \"\",\n \"type\": \"bool\",\n \"key\": \"key\"\n }\n ],\n \"name\": \"name\",\n \"messages\": [\n {\n \"role\": \"role\",\n \"content\": \"content\"\n },\n {\n \"role\": \"role\",\n \"content\": \"content\"\n }\n ],\n \"comment\": \"comment\",\n \"model\": \"{}\",\n \"outputFormat\": {\n \"key\": \"\"\n },\n \"key\": \"key\",\n \"modelConfigVersion\": 1\n}"
response = http.request(request)
puts response.read_body{
"judgeConfiguration": {
"judges": [
{
"samplingRate": 0.36160767,
"judgeConfigKey": "judgeConfigKey"
},
{
"samplingRate": 0.36160767,
"judgeConfigKey": "judgeConfigKey"
}
]
},
"instructions": "instructions",
"color": "color",
"_links": {
"parent": {
"href": "href",
"type": "type"
}
},
"description": "description",
"modelConfigKey": "OpenAI.gpt-4.1",
"judgingConfigKeys": [
"judgingConfigKeys",
"judgingConfigKeys"
],
"version": 5,
"tools": [
{
"customParameters": {
"key": ""
},
"version": 7,
"key": "key"
},
{
"customParameters": {
"key": ""
},
"version": 7,
"key": "key"
}
],
"skills": [
{
"version": 9,
"key": "key"
},
{
"version": 9,
"key": "key"
}
],
"createdAt": 1,
"_publishedAt": 2,
"_archivedAt": 5,
"classifiers": [
{
"instructions": "instructions",
"criteria": "",
"type": "bool",
"key": "key"
},
{
"instructions": "instructions",
"criteria": "",
"type": "bool",
"key": "key"
}
],
"name": "name",
"messages": [
{
"role": "role",
"content": "content"
},
{
"role": "role",
"content": "content"
}
],
"comment": "comment",
"model": "{}",
"_id": "_id",
"state": "published",
"outputFormat": {
"key": ""
},
"key": "key",
"modelConfigVersion": 6
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}Authorizations
Body
AI Config variation object to create
A unique key for the variation
A human-readable name for the variation
Classifier rules for a judge variation. When this array is non-empty, messages must be empty.
Show child attributes
Show child attributes
Human-readable description of this variation
Returns the description for the agent. This is only returned for agent variations.
Returns the instructions for the agent. This is only returned for agent variations.
The prompt messages for this variation
Show child attributes
Show child attributes
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}.
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.
"OpenAI.gpt-4.1"
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.
x >= 1JSON Schema defining the structured output format for the variation.
List of tools to use for this variation. The latest version of the tool will be used.
Show child attributes
Show child attributes
List of tool keys to use for this variation. The latest version of the tool will be used.
List of agent skills to attach to this variation.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
{
"judges": [
{
"samplingRate": 0.36160767,
"judgeConfigKey": "judgeConfigKey"
},
{
"samplingRate": 0.36160767,
"judgeConfigKey": "judgeConfigKey"
}
]
}
Response
AI Config variation created
The variation key
The variation ID
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}.
The variation name
The version number of this resource
Show child attributes
Show child attributes
{
"parent": { "href": "href", "type": "type" }
}
The color used for this variation in the UI
Classifier rules for a judge variation. When this array is non-empty, messages must be empty.
Show child attributes
Show child attributes
A comment describing this version of the variation
Returns the description for the agent. This is only returned for agent variations.
Returns the instructions for the agent. This is only returned for agent variations.
The prompt messages for this variation
Show child attributes
Show child attributes
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.
"OpenAI.gpt-4.1"
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.
JSON Schema defining the structured output format for the variation.
The state of the variation.
archived: The variation is archived. To restore it, update the variation withstateset topublished.published: The variation is active.
archived, published "published"
The tools this variation can use
Show child attributes
Show child attributes
The agent skills this variation can use
Show child attributes
Show child attributes
Show child attributes
Show child attributes
{
"judges": [
{
"samplingRate": 0.36160767,
"judgeConfigKey": "judgeConfigKey"
},
{
"samplingRate": 0.36160767,
"judgeConfigKey": "judgeConfigKey"
}
]
}
Keys of the judge AI Configs attached to this variation