Skip to main content
POST
/
api
/
v2
/
projects
/
{projectKey}
/
ai-configs
/
model-configs
Create an AI model config
curl --request POST \
  --url https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/model-configs \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "costPerOutputToken": 6.027456183070403,
  "costPerInputToken": 0.8008281904610115,
  "provider": "provider",
  "customParams": "{}",
  "name": "name",
  "icon": "icon",
  "id": "id",
  "params": "{}",
  "key": "key",
  "tags": [
    "tags",
    "tags"
  ]
}
'
{
  "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"
}

Documentation Index

Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Path Parameters

projectKey
string
required

Body

application/json

AI model config object to create

name
string
required

Human readable name of the model

key
string
required

Unique key for the model

id
string
required

Identifier for the model, for use with third party providers

icon
string

Icon for the model

provider
string

Provider for the model

params
object
customParams
object
tags
string[]
costPerInputToken
number<double>

Cost per input token in USD

costPerOutputToken
number<double>

Cost per output token in USD

Response

Successful response

name
string
required

Human readable name of the model

key
string
required

Unique key for the model

id
string
required

Identifier for the model, for use with third party providers

global
boolean
required

Whether the model is global

tags
string[]
required
version
integer
required
isRestricted
boolean
required

Whether the model is restricted

_access
object
Example:
{
"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"
}
]
}
icon
string

Icon for the model

provider
string

Provider for the model

params
object
customParams
object
costPerInputToken
number<double>

Cost per input token in USD

costPerOutputToken
number<double>

Cost per output token in USD