For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inTry it free
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
  • REST API overview
    • Access Tokens
    • Account Members
    • Account Usage Beta
    • AI Configs
      • POSTAdd AI models to the restricted list
      • POSTCreate a prompt snippet
      • POSTCreate agent optimization
      • POSTCreate agent optimization result
      • POSTCreate AI Config variation
      • POSTCreate an AI model config
      • POSTCreate an AI tool
      • POSTCreate new agent graph
      • POSTCreate new AI Config
      • DELDelete a prompt snippet
      • DELDelete agent graph
      • DELDelete AI Config
      • DELDelete AI Config variation
      • DELDelete AI tool
      • DELDelete an agent optimization
      • DELDelete an AI model config
      • GETGet a prompt snippet
      • GETGet agent graph
      • GETGet AI Config
      • GETGet AI Config metrics
      • GETGet AI Config metrics by variation
      • GETGet AI Config quick stats
      • GETGet AI Config variation
      • GETGet AI model config
      • GETGet AI tool
      • GETGet an agent optimization
      • GETList agent graphs
      • GETList agent optimization results for a run
      • GETList agent optimization runs
      • GETList agent optimization runs
      • GETList agent optimizations
      • GETList AI Configs
      • GETList AI model configs
      • GETList AI tool references
      • GETList AI tool versions
      • GETList AI tools
      • GETList all agent optimization results across versions
      • GETList prompt snippet references
      • GETList prompt snippet versions
      • GETList prompt snippets
      • DELRemove AI models from the restricted list
      • GETShow an AI Config's targeting
      • PATCHUpdate a prompt snippet
      • PATCHUpdate agent graph
      • PATCHUpdate AI Config
      • PATCHUpdate AI Config targeting
      • PATCHUpdate AI Config variation
      • PATCHUpdate AI tool
      • PATCHUpdate an agent optimization
      • PATCHUpdate an agent optimization result
    • Announcements
    • Applications Beta
    • Approvals
    • Approvals Beta
    • Audit Log
    • Code References
    • Contexts
    • Context Settings
    • Custom Roles
    • Data Export Destinations
    • Environments
    • Experiments
    • Feature Flags
    • Feature Flags Beta
    • Flag Import Configurations Beta
    • Flag Links Beta
    • Flag Triggers
    • Follow Flags
    • Holdouts Beta
    • Insights Charts Beta
    • Insights Deployments Beta
    • Insights Flag Events Beta
    • Insights Pull Requests Beta
    • Insights Repositories Beta
    • Insights Scores Beta
    • Integration Audit Log Subscriptions
    • Integration Delivery Configurations Beta
    • Integrations Beta
    • Layers
    • Metrics
    • Metrics Beta
    • OAuth2 Clients
    • Persistent Store Integrations Beta
    • Projects
    • Relay Proxy Configurations
    • Release Pipelines Beta
    • Releases Beta
    • Scheduled Changes
    • Segments
    • Tags
    • Teams
    • Teams Beta
    • Users
    • Users Beta
    • User Settings
    • Views Beta
    • Webhooks
    • Workflows
    • Workflow Templates
    • Other
Sign inTry it free
LogoLogo
REST API overviewAI Configs

Update AI Config

PATCH
/api/v2/projects/:projectKey/ai-configs/:configKey
PATCH
/api/v2/projects/:projectKey/ai-configs/:configKey
$curl -X PATCH https://app.launchdarkly.com/api/v2/projects/projectKey/ai-configs/configKey \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "description": "description",
> "maintainerId": "507f1f77bcf86cd799439011",
> "maintainerTeamKey": "example-team-key",
> "name": "name",
> "tags": [
> "tags",
> "tags"
> ],
> "evaluationMetricKey": "evaluationMetricKey",
> "isInverted": true
>}'
1{
2 "description": "description",
3 "key": "key",
4 "name": "name",
5 "tags": [
6 "tags",
7 "tags"
8 ],
9 "version": 0,
10 "variations": [
11 {
12 "key": "key",
13 "_id": "_id",
14 "model": "{}",
15 "name": "name",
16 "createdAt": 6,
17 "version": 1,
18 "_links": {
19 "parent": {
20 "href": "href",
21 "type": "type"
22 }
23 },
24 "color": "color",
25 "comment": "comment",
26 "description": "description",
27 "instructions": "instructions",
28 "messages": [
29 {
30 "content": "content",
31 "role": "role"
32 },
33 {
34 "content": "content",
35 "role": "role"
36 }
37 ],
38 "modelConfigKey": "modelConfigKey",
39 "state": "state",
40 "_archivedAt": 5,
41 "_publishedAt": 5,
42 "tools": [
43 {
44 "key": "key",
45 "version": 2,
46 "customParameters": {
47 "key": ""
48 }
49 },
50 {
51 "key": "key",
52 "version": 2,
53 "customParameters": {
54 "key": ""
55 }
56 }
57 ],
58 "judgeConfiguration": {
59 "judges": [
60 {
61 "judgeConfigKey": "judgeConfigKey",
62 "samplingRate": 0.7061401
63 },
64 {
65 "judgeConfigKey": "judgeConfigKey",
66 "samplingRate": 0.7061401
67 }
68 ]
69 },
70 "judgingConfigKeys": [
71 "judgingConfigKeys",
72 "judgingConfigKeys"
73 ]
74 },
75 {
76 "key": "key",
77 "_id": "_id",
78 "model": "{}",
79 "name": "name",
80 "createdAt": 6,
81 "version": 1,
82 "_links": {
83 "parent": {
84 "href": "href",
85 "type": "type"
86 }
87 },
88 "color": "color",
89 "comment": "comment",
90 "description": "description",
91 "instructions": "instructions",
92 "messages": [
93 {
94 "content": "content",
95 "role": "role"
96 },
97 {
98 "content": "content",
99 "role": "role"
100 }
101 ],
102 "modelConfigKey": "modelConfigKey",
103 "state": "state",
104 "_archivedAt": 5,
105 "_publishedAt": 5,
106 "tools": [
107 {
108 "key": "key",
109 "version": 2,
110 "customParameters": {
111 "key": ""
112 }
113 },
114 {
115 "key": "key",
116 "version": 2,
117 "customParameters": {
118 "key": ""
119 }
120 }
121 ],
122 "judgeConfiguration": {
123 "judges": [
124 {
125 "judgeConfigKey": "judgeConfigKey",
126 "samplingRate": 0.7061401
127 },
128 {
129 "judgeConfigKey": "judgeConfigKey",
130 "samplingRate": 0.7061401
131 }
132 ]
133 },
134 "judgingConfigKeys": [
135 "judgingConfigKeys",
136 "judgingConfigKeys"
137 ]
138 }
139 ],
140 "createdAt": 9,
141 "updatedAt": 3,
142 "_access": {
143 "denied": [
144 {
145 "action": "action",
146 "reason": {
147 "effect": "allow",
148 "resources": [
149 "proj/*:env/*;qa_*:/flag/*"
150 ],
151 "notResources": [
152 "notResources",
153 "notResources"
154 ],
155 "actions": [
156 "*"
157 ],
158 "notActions": [
159 "string",
160 "string"
161 ],
162 "role_name": "role_name"
163 }
164 },
165 {
166 "action": "action",
167 "reason": {
168 "effect": "allow",
169 "resources": [
170 "proj/*:env/*;qa_*:/flag/*"
171 ],
172 "notResources": [
173 "notResources",
174 "notResources"
175 ],
176 "actions": [
177 "*"
178 ],
179 "notActions": [
180 "string",
181 "string"
182 ],
183 "role_name": "role_name"
184 }
185 }
186 ],
187 "allowed": [
188 {
189 "action": "action",
190 "reason": {
191 "effect": "allow",
192 "resources": [
193 "proj/*:env/*;qa_*:/flag/*"
194 ],
195 "notResources": [
196 "notResources",
197 "notResources"
198 ],
199 "actions": [
200 "*"
201 ],
202 "notActions": [
203 "string",
204 "string"
205 ],
206 "role_name": "role_name"
207 }
208 },
209 {
210 "action": "action",
211 "reason": {
212 "effect": "allow",
213 "resources": [
214 "proj/*:env/*;qa_*:/flag/*"
215 ],
216 "notResources": [
217 "notResources",
218 "notResources"
219 ],
220 "actions": [
221 "*"
222 ],
223 "notActions": [
224 "string",
225 "string"
226 ],
227 "role_name": "role_name"
228 }
229 }
230 ]
231 },
232 "_links": {
233 "self": {
234 "href": "href",
235 "type": "type"
236 },
237 "parent": {
238 "href": "href",
239 "type": "type"
240 }
241 },
242 "_maintainer": {
243 "_id": "string",
244 "email": "string",
245 "role": "string",
246 "kind": "kind"
247 },
248 "mode": "completion",
249 "evaluationMetricKey": "evaluationMetricKey",
250 "isInverted": true,
251 "dependencies": [
252 {
253 "type": "agent-graph",
254 "key": "key"
255 },
256 {
257 "type": "agent-graph",
258 "key": "key"
259 }
260 ],
261 "evaluationMetricKeys": [
262 "evaluationMetricKeys",
263 "evaluationMetricKeys"
264 ]
265}
Edit an existing AI Config. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. Here's an example: ``` { "description": "Example updated description", "tags": ["new-tag"] } ```
Was this page helpful?
Previous

Update AI Config targeting

Next
Built with

Edit an existing AI Config.

The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields.

Here’s an example:

{
"description": "Example updated description",
"tags": ["new-tag"]
}

Authentication

Authorizationstring
API Key authentication via header

Path parameters

projectKeystringRequired
configKeystringRequired

Request

AI Config object to update
descriptionstringOptional
maintainerIdstringOptional
maintainerTeamKeystringOptional
namestringOptional
tagslist of stringsOptional
evaluationMetricKeystringOptional
Evaluation metric key for this AI Config
isInvertedbooleanOptional
Whether the evaluation metric is inverted, meaning a lower value is better if set as true

Response

AI Config updated
descriptionstring
keystring
namestring
tagslist of strings
versioninteger
variationslist of objects
createdAtlong
updatedAtlong
_accessobject
_linksobject
The location and content type of related resources
_maintainerobject
modeenumDefaults to completion
Allowed values:
evaluationMetricKeystring
Evaluation metric key for this AI Config
isInvertedboolean
Whether the evaluation metric is inverted, meaning a lower value is better if set as true
dependencieslist of objects
Resources that depend on this AI Config, grouped by type
evaluationMetricKeyslist of stringsDeprecated
List of evaluation metric keys for this AI Config

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error