Agent Control

Update an AI model config

PATCH
/api/v2/projects/{projectKey}/ai-configs/model-configs/{modelConfigKey}

Update an AI model config.

Authorization

ApiKey read, write
Authorization<token>

In: header

Scope: read, write

Path Parameters

projectKey*string
modelConfigKey*string

Request Body

application/json

AI model config object to update

id?string

Immutable provider model identifier. To use a different model identifier, create a new model config.

provider?string

Immutable model provider. To use a different provider, create a new model config.

name?string

Human-readable name of the model

costPerInputToken?number

Cost per input token in USD

Formatdouble
costPerOutputToken?number

Cost per output token in USD

Formatdouble
costPerCachedInputToken?number

Cost per cached input token in USD

Formatdouble
params?
customParams?
tags?array<string>
maintainerId?string
maintainerTeamKey?string

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/api/v2/projects/default/ai-configs/model-configs/string" \  -H "Content-Type: application/json" \  -d '{    "costPerOutputToken": 6.027456183070403,    "maintainerId": "507f1f77bcf86cd799439011",    "costPerInputToken": 0.8008281904610115,    "provider": "provider",    "customParams": "{}",    "name": "name",    "maintainerTeamKey": "example-team-key",    "id": "id",    "params": "{}",    "costPerCachedInputToken": 1.4658129805029452,    "tags": [      "tags",      "tags"    ]  }'
{  "costPerOutputToken": 1.4658129805029452,  "_maintainer": {    "kind": "kind"  },  "costPerInputToken": 6.027456183070403,  "customParams": "{}",  "icon": "icon",  "global": true,  "params": "{}",  "version": 0,  "tags": [    "tags",    "tags"  ],  "_access": {    "allowed": [      {        "reason": {          "role_name": "role_name",          "notActions": [            null,            null          ],          "notResources": [            "notResources",            "notResources"          ],          "effect": "allow",          "resources": [            "proj/*:env/*;qa_*:/flag/*"          ],          "actions": [            "*"          ]        },        "action": "action"      },      {        "reason": {          "role_name": "role_name",          "notActions": [            null,            null          ],          "notResources": [            "notResources",            "notResources"          ],          "effect": "allow",          "resources": [            "proj/*:env/*;qa_*:/flag/*"          ],          "actions": [            "*"          ]        },        "action": "action"      }    ],    "denied": [      {        "reason": {          "role_name": "role_name",          "notActions": [            null,            null          ],          "notResources": [            "notResources",            "notResources"          ],          "effect": "allow",          "resources": [            "proj/*:env/*;qa_*:/flag/*"          ],          "actions": [            "*"          ]        },        "action": "action"      },      {        "reason": {          "role_name": "role_name",          "notActions": [            null,            null          ],          "notResources": [            "notResources",            "notResources"          ],          "effect": "allow",          "resources": [            "proj/*:env/*;qa_*:/flag/*"          ],          "actions": [            "*"          ]        },        "action": "action"      }    ]  },  "usedInCount": 5,  "provider": "provider",  "name": "name",  "id": "id",  "isRestricted": true,  "key": "key",  "costPerCachedInputToken": 5.962133916683182}