Agent Control

Create an AI model config

POST
/api/v2/projects/{projectKey}/ai-configs/model-configs

Create an AI model config. You can use this in any variation for any config in your project.

Authorization

ApiKey read, write
Authorization<token>

In: header

Scope: read, write

Path Parameters

projectKey*string

Request Body

application/json

AI model config object to create

name*string

Human readable name of the model

key*string

Unique key for the model

id*string

Identifier for the model, for use with third party providers

maintainerId?string
maintainerTeamKey?string
icon?string

Icon for the model

provider?string

Provider for the model

params?
customParams?
tags?array<string>
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

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v2/projects/default/ai-configs/model-configs" \  -H "Content-Type: application/json" \  -d '{    "costPerOutputToken": 6.027456183070403,    "costPerInputToken": 0.8008281904610115,    "customParams": "{}",    "maintainerTeamKey": "example-team-key",    "icon": "icon",    "params": "{}",    "tags": [      "tags",      "tags"    ],    "maintainerId": "507f1f77bcf86cd799439011",    "provider": "provider",    "name": "name",    "id": "id",    "key": "key",    "costPerCachedInputToken": 1.4658129805029452  }'
{  "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}