Get AI Config variation
Get an AI Config variation by key. The response includes all variation versions for the given variation key.
Authorization
ApiKey read, writeIn: header
Scope: read, write
Path Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v2/projects/default/ai-configs/default/variations/default"{ "totalCount": 0, "items": [ { "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": "modelConfigKey", "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, "name": "name", "messages": [ { "role": "role", "content": "content" }, { "role": "role", "content": "content" } ], "comment": "comment", "model": "{}", "_id": "_id", "state": "state", "outputFormat": { "key": "" }, "key": "key", "modelConfigVersion": 6 }, { "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": "modelConfigKey", "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, "name": "name", "messages": [ { "role": "role", "content": "content" }, { "role": "role", "content": "content" } ], "comment": "comment", "model": "{}", "_id": "_id", "state": "state", "outputFormat": { "key": "" }, "key": "key", "modelConfigVersion": 6 } ]}Create AI Config variation POST
Create a new variation for a given AI Config. The <code>model</code> in the request body requires a <code>modelName</code> and <code>parameters</code>, for example: ``` "model": { "modelName": "claude-3-opus-20240229", "parameters": { "max_tokens": 1024 } } ```
Update AI Config variation PATCH
Edit an existing variation of an AI Config. This creates a new version of the variation. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. If the variation is in use in a project environment where approval settings require review for this AI Config, this endpoint returns 403 and the change must be submitted through an approval request. Here's an example: ``` { "messages": [ { "role": "system", "content": "The new message" } ] } ```