Agent Control

Get AI model config

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

Get an AI model config by key. Specify a version to retrieve a historical custom model config version. Global model configs accept version 0 or 1 and return their current representation.

Authorization

ApiKey read, write
Authorization<token>

In: header

Scope: read, write

Path Parameters

projectKey*string
modelConfigKey*string

Query Parameters

version?integer

Specific model config version to return. Omit to return the latest version.

Range0 <= value

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v2/projects/default/ai-configs/model-configs/default"
{  "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}