AI Configs
Create an AI model config
Create an AI model config. You can use this in any variation for any AI Config in your project.
post/api/v2/projects/{projectKey}/ai-configs/model-configs
Path parameters
projectKeystring required
Request body
Example request
{
"costPerOutputToken": 6.027456183070403,
"costPerInputToken": 0.8008281904610115,
"provider": "provider",
"customParams": "{}",
"name": "name",
"icon": "icon",
"id": "id",
"params": "{}",
"key": "key",
"tags": [
"tags",
"tags"
]
}Response
Successful response
Example response
{
"costPerOutputToken": 1.4658129805029452,
"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"
}
]
},
"provider": "provider",
"name": "name",
"id": "id",
"isRestricted": true,
"key": "key"
}