Update AI Config variation

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. Here's an example: ``` { "messages": [ { "role": "system", "content": "The new message" } ] } ```

Authentication

Authorizationstring
API Key authentication via header

Path parameters

projectKeystringRequired
configKeystringRequired
variationKeystringRequired

Request

AI Config variation object to update
commentstringOptional

Human-readable description of what this patch changes

descriptionstringOptional
Description for agent when the config is in agent mode.
instructionsstringOptional
Instructions for agent when the config is in agent mode.
messageslist of objectsOptional
modelobjectOptional
modelConfigKeystringOptional
modelConfigVersionintegerOptional>=1

The exact model config version to set this variation to. Requires modelConfigKey to be set (either in this patch or already on the variation), and the version must exist for that model config. When omitted, the variation keeps the version it is currently set to, unless the patch changes modelConfigKey, in which case the variation records the new model config’s current (latest) version.

namestringOptional
outputFormatmap from strings to anyOptional
JSON Schema defining the structured output format for the variation.
publishedbooleanOptional
statestringOptional
One of 'archived', 'published'
toolslist of objectsOptional
List of tools to use for this variation. The latest version of the tool will be used.
toolKeyslist of stringsOptional
List of tool keys to use for this variation. The latest version of the tool will be used.
skillslist of objectsOptional
List of agent skills to attach to this variation. Replaces the current attachments.
judgeConfigurationobjectOptional

Response

AI Config variation updated
keystring
_idstring
modelobject
namestring
createdAtlong
versioninteger
colorstringOptional
commentstringOptional
descriptionstringOptional
Returns the description for the agent. This is only returned for agent variations.
instructionsstringOptional
Returns the instructions for the agent. This is only returned for agent variations.
messageslist of objectsOptional
modelConfigKeystringOptional
modelConfigVersionintegerOptional
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.
outputFormatmap from strings to anyOptional
JSON Schema defining the structured output format for the variation.
statestringOptional
_archivedAtlongOptional
_publishedAtlongOptional
toolslist of objectsOptional
skillslist of objectsOptional
judgeConfigurationobjectOptional
judgingConfigKeyslist of stringsOptional

Errors

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