v5

latestOpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2026-02-283466592.5 MB
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

namestring required

Human readable name of the model

keystring required

Unique key for the model

idstring required

Identifier for the model, for use with third party providers

iconstring

Icon for the model

providerstring

Provider for the model

paramsobject
customParamsobject
tagsstring[]
costPerInputTokennumber double

Cost per input token in USD

costPerOutputTokennumber double

Cost per output token in USD

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

namestring required

Human readable name of the model

keystring required

Unique key for the model

idstring required

Identifier for the model, for use with third party providers

iconstring

Icon for the model

providerstring

Provider for the model

globalboolean required

Whether the model is global

paramsobject
customParamsobject
tagsstring[] required
versioninteger required
costPerInputTokennumber double

Cost per input token in USD

costPerOutputTokennumber double

Cost per output token in USD

isRestrictedboolean required

Whether the model is restricted

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"
}