All URIs are relative to https://app.launchdarkly.com
Method | HTTP request | Description |
---|---|---|
deleteAIConfig | DELETE /api/v2/projects/{projectKey}/ai-configs/{configKey} | Delete AI Config |
deleteAIConfigVariation | DELETE /api/v2/projects/{projectKey}/ai-configs/{configKey}/variations/{variationKey} | Delete AI Config variation |
deleteModelConfig | DELETE /api/v2/projects/{projectKey}/ai-configs/model-configs/{modelConfigKey} | Delete an AI model config |
getAIConfig | GET /api/v2/projects/{projectKey}/ai-configs/{configKey} | Get AI Config |
getAIConfigMetrics | GET /api/v2/projects/{projectKey}/ai-configs/{configKey}/metrics | Get AI Config metrics |
getAIConfigMetricsByVariation | GET /api/v2/projects/{projectKey}/ai-configs/{configKey}/metrics-by-variation | Get AI Config metrics by variation |
getAIConfigVariation | GET /api/v2/projects/{projectKey}/ai-configs/{configKey}/variations/{variationKey} | Get AI Config variation |
getAIConfigs | GET /api/v2/projects/{projectKey}/ai-configs | List AI Configs |
getModelConfig | GET /api/v2/projects/{projectKey}/ai-configs/model-configs/{modelConfigKey} | Get AI model config |
listModelConfigs | GET /api/v2/projects/{projectKey}/ai-configs/model-configs | List AI model configs |
patchAIConfig | PATCH /api/v2/projects/{projectKey}/ai-configs/{configKey} | Update AI Config |
patchAIConfigVariation | PATCH /api/v2/projects/{projectKey}/ai-configs/{configKey}/variations/{variationKey} | Update AI Config variation |
postAIConfig | POST /api/v2/projects/{projectKey}/ai-configs | Create new AI Config |
postAIConfigVariation | POST /api/v2/projects/{projectKey}/ai-configs/{configKey}/variations | Create AI Config variation |
postModelConfig | POST /api/v2/projects/{projectKey}/ai-configs/model-configs | Create an AI model config |
deleteAIConfig(lDAPIVersion, projectKey, configKey)
Delete AI Config
Delete an existing AI Config.
import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';
let apiInstance = new LaunchDarklyApi.AIConfigsBetaApi();
let lDAPIVersion = "lDAPIVersion_example"; // String | Version of the endpoint.
let projectKey = default; // String |
let configKey = "configKey_example"; // String |
apiInstance.deleteAIConfig(lDAPIVersion, projectKey, configKey, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
});
Name | Type | Description | Notes |
---|---|---|---|
lDAPIVersion | String | Version of the endpoint. | |
projectKey | String | ||
configKey | String |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
deleteAIConfigVariation(lDAPIVersion, projectKey, configKey, variationKey)
Delete AI Config variation
Delete a specific variation of an AI Config by config key and variation key.
import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';
let apiInstance = new LaunchDarklyApi.AIConfigsBetaApi();
let lDAPIVersion = "lDAPIVersion_example"; // String | Version of the endpoint.
let projectKey = "projectKey_example"; // String |
let configKey = "configKey_example"; // String |
let variationKey = "variationKey_example"; // String |
apiInstance.deleteAIConfigVariation(lDAPIVersion, projectKey, configKey, variationKey, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
});
Name | Type | Description | Notes |
---|---|---|---|
lDAPIVersion | String | Version of the endpoint. | |
projectKey | String | ||
configKey | String | ||
variationKey | String |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
deleteModelConfig(lDAPIVersion, projectKey, modelConfigKey)
Delete an AI model config
Delete an AI model config.
import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';
let apiInstance = new LaunchDarklyApi.AIConfigsBetaApi();
let lDAPIVersion = "lDAPIVersion_example"; // String | Version of the endpoint.
let projectKey = default; // String |
let modelConfigKey = "modelConfigKey_example"; // String |
apiInstance.deleteModelConfig(lDAPIVersion, projectKey, modelConfigKey, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
});
Name | Type | Description | Notes |
---|---|---|---|
lDAPIVersion | String | Version of the endpoint. | |
projectKey | String | ||
modelConfigKey | String |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
AIConfig getAIConfig(lDAPIVersion, projectKey, configKey)
Get AI Config
Retrieve a specific AI Config by its key.
import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';
let apiInstance = new LaunchDarklyApi.AIConfigsBetaApi();
let lDAPIVersion = "lDAPIVersion_example"; // String | Version of the endpoint.
let projectKey = "projectKey_example"; // String |
let configKey = "configKey_example"; // String |
apiInstance.getAIConfig(lDAPIVersion, projectKey, configKey, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
lDAPIVersion | String | Version of the endpoint. | |
projectKey | String | ||
configKey | String |
- Content-Type: Not defined
- Accept: application/json
Metrics getAIConfigMetrics(lDAPIVersion, projectKey, configKey, from, to, env)
Get AI Config metrics
Retrieve usage metrics for an AI Config by config key.
import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';
let apiInstance = new LaunchDarklyApi.AIConfigsBetaApi();
let lDAPIVersion = "lDAPIVersion_example"; // String | Version of the endpoint.
let projectKey = "projectKey_example"; // String |
let configKey = "configKey_example"; // String |
let from = 56; // Number | The starting time, as milliseconds since epoch (inclusive).
let to = 56; // Number | The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after `from`.
let env = "env_example"; // String | An environment key. Only metrics from this environment will be included.
apiInstance.getAIConfigMetrics(lDAPIVersion, projectKey, configKey, from, to, env, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
lDAPIVersion | String | Version of the endpoint. | |
projectKey | String | ||
configKey | String | ||
from | Number | The starting time, as milliseconds since epoch (inclusive). | |
to | Number | The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after `from`. | |
env | String | An environment key. Only metrics from this environment will be included. |
- Content-Type: Not defined
- Accept: application/json
[MetricByVariation] getAIConfigMetricsByVariation(lDAPIVersion, projectKey, configKey, from, to, env)
Get AI Config metrics by variation
Retrieve usage metrics for an AI Config by config key, with results split by variation.
import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';
let apiInstance = new LaunchDarklyApi.AIConfigsBetaApi();
let lDAPIVersion = "lDAPIVersion_example"; // String | Version of the endpoint.
let projectKey = "projectKey_example"; // String |
let configKey = "configKey_example"; // String |
let from = 56; // Number | The starting time, as milliseconds since epoch (inclusive).
let to = 56; // Number | The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after `from`.
let env = "env_example"; // String | An environment key. Only metrics from this environment will be included.
apiInstance.getAIConfigMetricsByVariation(lDAPIVersion, projectKey, configKey, from, to, env, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
lDAPIVersion | String | Version of the endpoint. | |
projectKey | String | ||
configKey | String | ||
from | Number | The starting time, as milliseconds since epoch (inclusive). | |
to | Number | The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after `from`. | |
env | String | An environment key. Only metrics from this environment will be included. |
- Content-Type: Not defined
- Accept: application/json
AIConfigVariationsResponse getAIConfigVariation(lDAPIVersion, projectKey, configKey, variationKey)
Get AI Config variation
Get an AI Config variation by key. The response includes all variation versions for the given variation key.
import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';
let apiInstance = new LaunchDarklyApi.AIConfigsBetaApi();
let lDAPIVersion = "lDAPIVersion_example"; // String | Version of the endpoint.
let projectKey = default; // String |
let configKey = default; // String |
let variationKey = default; // String |
apiInstance.getAIConfigVariation(lDAPIVersion, projectKey, configKey, variationKey, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
lDAPIVersion | String | Version of the endpoint. | |
projectKey | String | ||
configKey | String | ||
variationKey | String |
- Content-Type: Not defined
- Accept: application/json
AIConfigs getAIConfigs(lDAPIVersion, projectKey, opts)
List AI Configs
Get a list of all AI Configs in the given project.
import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';
let apiInstance = new LaunchDarklyApi.AIConfigsBetaApi();
let lDAPIVersion = "lDAPIVersion_example"; // String | Version of the endpoint.
let projectKey = default; // String |
let opts = {
'sort': "sort_example", // String | A sort to apply to the list of AI Configs.
'limit': 56, // Number | The number of AI Configs to return.
'offset': 56, // Number | Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`.
'filter': "filter_example" // String | A filter to apply to the list of AI Configs.
};
apiInstance.getAIConfigs(lDAPIVersion, projectKey, opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
lDAPIVersion | String | Version of the endpoint. | |
projectKey | String | ||
sort | String | A sort to apply to the list of AI Configs. | [optional] |
limit | Number | The number of AI Configs to return. | [optional] |
offset | Number | Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. | [optional] |
filter | String | A filter to apply to the list of AI Configs. | [optional] |
- Content-Type: Not defined
- Accept: application/json
ModelConfig getModelConfig(lDAPIVersion, projectKey, modelConfigKey)
Get AI model config
Get an AI model config by key.
import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';
let apiInstance = new LaunchDarklyApi.AIConfigsBetaApi();
let lDAPIVersion = "lDAPIVersion_example"; // String | Version of the endpoint.
let projectKey = default; // String |
let modelConfigKey = default; // String |
apiInstance.getModelConfig(lDAPIVersion, projectKey, modelConfigKey, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
lDAPIVersion | String | Version of the endpoint. | |
projectKey | String | ||
modelConfigKey | String |
- Content-Type: Not defined
- Accept: application/json
[ModelConfig] listModelConfigs(lDAPIVersion, projectKey)
List AI model configs
Get all AI model configs for a project.
import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';
let apiInstance = new LaunchDarklyApi.AIConfigsBetaApi();
let lDAPIVersion = "lDAPIVersion_example"; // String | Version of the endpoint.
let projectKey = default; // String |
apiInstance.listModelConfigs(lDAPIVersion, projectKey, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
lDAPIVersion | String | Version of the endpoint. | |
projectKey | String |
- Content-Type: Not defined
- Accept: application/json
AIConfig patchAIConfig(lDAPIVersion, projectKey, configKey, opts)
Update AI Config
Edit an existing AI Config. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. Here's an example: ``` { "description": "Example updated description", "tags": ["new-tag"] } ```
import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';
let apiInstance = new LaunchDarklyApi.AIConfigsBetaApi();
let lDAPIVersion = "lDAPIVersion_example"; // String | Version of the endpoint.
let projectKey = "projectKey_example"; // String |
let configKey = "configKey_example"; // String |
let opts = {
'aIConfigPatch': new LaunchDarklyApi.AIConfigPatch() // AIConfigPatch | AI Config object to update
};
apiInstance.patchAIConfig(lDAPIVersion, projectKey, configKey, opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
lDAPIVersion | String | Version of the endpoint. | |
projectKey | String | ||
configKey | String | ||
aIConfigPatch | AIConfigPatch | AI Config object to update | [optional] |
- Content-Type: application/json
- Accept: application/json
AIConfigVariation patchAIConfigVariation(lDAPIVersion, projectKey, configKey, variationKey, opts)
Update AI Config variation
Edit an existing variation of an AI Config. This creates a new version of the variation. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. Here's an example: ``` { "messages": [ { "role": "system", "content": "The new message" } ] } ```
import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';
let apiInstance = new LaunchDarklyApi.AIConfigsBetaApi();
let lDAPIVersion = "lDAPIVersion_example"; // String | Version of the endpoint.
let projectKey = "projectKey_example"; // String |
let configKey = "configKey_example"; // String |
let variationKey = "variationKey_example"; // String |
let opts = {
'aIConfigVariationPatch': new LaunchDarklyApi.AIConfigVariationPatch() // AIConfigVariationPatch | AI Config variation object to update
};
apiInstance.patchAIConfigVariation(lDAPIVersion, projectKey, configKey, variationKey, opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
lDAPIVersion | String | Version of the endpoint. | |
projectKey | String | ||
configKey | String | ||
variationKey | String | ||
aIConfigVariationPatch | AIConfigVariationPatch | AI Config variation object to update | [optional] |
- Content-Type: application/json
- Accept: application/json
AIConfig postAIConfig(lDAPIVersion, projectKey, aIConfigPost)
Create new AI Config
Create a new AI Config within the given project.
import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';
let apiInstance = new LaunchDarklyApi.AIConfigsBetaApi();
let lDAPIVersion = "lDAPIVersion_example"; // String | Version of the endpoint.
let projectKey = "projectKey_example"; // String |
let aIConfigPost = new LaunchDarklyApi.AIConfigPost(); // AIConfigPost | AI Config object to create
apiInstance.postAIConfig(lDAPIVersion, projectKey, aIConfigPost, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
lDAPIVersion | String | Version of the endpoint. | |
projectKey | String | ||
aIConfigPost | AIConfigPost | AI Config object to create |
- Content-Type: application/json
- Accept: application/json
AIConfigVariation postAIConfigVariation(lDAPIVersion, projectKey, configKey, aIConfigVariationPost)
Create AI Config variation
Create a new variation for a given AI Config. The <code>model</code> in the request body requires a <code>modelName</code> and <code>parameters</code>, for example: ``` "model": { "modelName": "claude-3-opus-20240229", "parameters": { "max_tokens": 1024 } } ```
import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';
let apiInstance = new LaunchDarklyApi.AIConfigsBetaApi();
let lDAPIVersion = "lDAPIVersion_example"; // String | Version of the endpoint.
let projectKey = "projectKey_example"; // String |
let configKey = "configKey_example"; // String |
let aIConfigVariationPost = new LaunchDarklyApi.AIConfigVariationPost(); // AIConfigVariationPost | AI Config variation object to create
apiInstance.postAIConfigVariation(lDAPIVersion, projectKey, configKey, aIConfigVariationPost, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
lDAPIVersion | String | Version of the endpoint. | |
projectKey | String | ||
configKey | String | ||
aIConfigVariationPost | AIConfigVariationPost | AI Config variation object to create |
- Content-Type: application/json
- Accept: application/json
ModelConfig postModelConfig(lDAPIVersion, projectKey, modelConfigPost)
Create an AI model config
Create an AI model config. You can use this in any variation for any AI Config in your project.
import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';
let apiInstance = new LaunchDarklyApi.AIConfigsBetaApi();
let lDAPIVersion = "lDAPIVersion_example"; // String | Version of the endpoint.
let projectKey = default; // String |
let modelConfigPost = new LaunchDarklyApi.ModelConfigPost(); // ModelConfigPost | AI model config object to create
apiInstance.postModelConfig(lDAPIVersion, projectKey, modelConfigPost, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
lDAPIVersion | String | Version of the endpoint. | |
projectKey | String | ||
modelConfigPost | ModelConfigPost | AI model config object to create |
- Content-Type: application/json
- Accept: application/json