> ## Documentation Index
> Fetch the complete documentation index at: https://arize-ax.mintlify.site/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Project and model mutations

> Manage models and projects: baselines, tags, mappings, metrics, costs, filters. Arguments, return types and a validated example for each of the 18 mutations.

Manage models and projects: baselines, tags, mappings, metrics, costs, filters.

For task-oriented walkthroughs of these operations, see the [Project and model guide](/docs/ax/graphql-reference/guides/projects-and-models). Every mutation below is sent as a `POST` to `https://app.arize.com/graphql` with an `x-api-key` header; see [Forming calls](/docs/ax/graphql-reference/overview/how-to-use-graphql/forming-calls).

## Mutations in this page

* [`deleteModel`](#deletemodel): Delete model.
* [`deleteData`](#deletedata): Delete data for a specific time period.
* [`setModelBaseline`](#setmodelbaseline): Sets the primary baseline for a model
* [`setModelAutoBaselineConfig`](#setmodelautobaselineconfig): Set model auto baseline config.
* [`addTagsToModel`](#addtagstomodel): Add tags to model.
* [`removeTagsFromModel`](#removetagsfrommodel): Remove tags from model.
* [`updateModelColumnMappingConfig`](#updatemodelcolumnmappingconfig): Update column mapping configuration for a model
* [`updateProjectSourceMappingConfig`](#updateprojectsourcemappingconfig): Update source mapping configuration for a project.
* [`updateDimensionConfig`](#updatedimensionconfig): Updates an existing dimension config or creates a new one.
* [`createTraceFilter`](#createtracefilter): Create a trace filter
* [`updateTraceFilter`](#updatetracefilter): Updates a trace filter
* [`deleteTraceFilter`](#deletetracefilter): Deletes a traceFilter
* [`createCustomMetric`](#createcustommetric): Creates a new custom metric scoped to a space.
* [`updateCustomMetric`](#updatecustommetric): Updates an existing custom metric.
* [`deleteCustomMetric`](#deletecustommetric): Deletes a custom metric.
* [`createCostConfig`](#createcostconfig): Create a cost config
* [`updateCostConfig`](#updatecostconfig): Update a cost config
* [`deleteCostConfig`](#deletecostconfig): Deletes a cost config

## Reference

### deleteModel

`deleteModel(input: DeleteModelMutationInput!): DeleteModelMutationPayload`

#### Arguments

**input** `DeleteModelMutationInput!` *required*

**DeleteModelMutationInput fields**

**modelId** `ID!` *required*

**clientMutationId** `String`

#### Returns

**model** `Model`

**Model fields**

Scalar fields: `id`, `name`, `uri`, `createdAt`, `isDemoModel`, `isRestricted`, `modelType`, `modelEnvironmentNames`, `averagePerformanceMetric`, `totalTraffic`, `taskVariables`, `annotationsEnabled`, `isAgentExperimentTraceProject`, `projectType`, `annotationsDisabled`, `defaultAnnotationConfigIds`.

Object fields (select subfields): `projectRoleBindings`, `space`, `volumeGateVisibility`, `modelVersions`, `modelBatches`, `modelPredictionVolume`, `modelEnvironments`, `dimension`, `dimensionValues`, `tracingSchema`, `modelSchema`, `modelPrimaryBaseline`, `modelReferenceDataset`, `modelDashboards`, `monitors`, `signalStatus`, `signalIssues`, `signalIssueActivityBounds`, `signalIssueCountsByEntity`, `signalIssueTimeSeries`, `monitorAggregations`, `driftConfigs`, `performanceConfigs`, `dataQualityConfigs`, `modelColumnMappingConfigs`, `projectSourceMappingConfigs`, `performanceMetrics`, `performanceStatus`, `performanceMetricOverTime`, `customMetrics`, `driftStatus`, `dataQualityStatus`, `UMAPPoints`, `spanRecordsPublic`, `costOverTime`, `tokensOverTime`, `costByModel`, `llmTracingStats`, `network`, `tags`, `_access`.

**space** `Space`

**Space fields**

Scalar fields: `id`, `name`, `description`, `uuid`, `createdAt`, `liveEnabled`, `isLLMOnlySpace`, `playgroundTracingModelId`, `evalTracingModelId`, `sandboxTracingModelId`, `mlModelsEnabled`, `private`, `gradientStartColor`, `gradientEndColor`, `hasDashboardsCreated`.

Object fields (select subfields): `organization`, `models`, `monitors`, `dashboards`, `spaceUsers`, `byobConnectors`, `importJobs`, `tableJobs`, `sandboxJobs`, `signalInsightSummary`, `signalEnabledProjectSummary`, `signalIssues`, `agentIssues`, `automations`, `datasets`, `experiments`, `customMetrics`, `onlineTasks`, `prompts`, `tags`, `evaluators`, `annotationQueues`, `playgroundViews`, `annotationConfigs`, `traceFilters`, `llmIntegrations`, `defaultLlmIntegration`, `defaultAgentRuntime`, `gates`, `_access`.

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
mutation DeleteModel($input: DeleteModelMutationInput!) {
  deleteModel(input: $input) {
    model { id name }
    space { id name }
  }
}
```

```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "input": {
    "modelId": "<ID>"
  }
}
```

### deleteData

Delete data for a specific time period. Note that the deletion process may take up to an hour to complete.

`deleteData(input: DeleteDataMutationInput!): DeleteDataMutationPayload`

#### Arguments

**input** `DeleteDataMutationInput!` *required*

**DeleteDataMutationInput fields**

**modelId** `ID!` *required*

**startDate** `Date!` *required*

UTC date for the start of the period to delete. Note that this date is inclusive

**endDate** `Date!` *required*

UTC date for the end of the period to delete. Note that this date is exclusive

**deleteType** `ModelDeleteDataType!` *required*

PRODUCTION will delete predictions, joined actuals, and shap data for ML models; spans for generative models. PREPRODUCTION will delete training and validation data. One of: `PRODUCTION`, `PREPRODUCTION`.

**clientMutationId** `String`

#### Returns

**model** `Model`

**Model fields**

Scalar fields: `id`, `name`, `uri`, `createdAt`, `isDemoModel`, `isRestricted`, `modelType`, `modelEnvironmentNames`, `averagePerformanceMetric`, `totalTraffic`, `taskVariables`, `annotationsEnabled`, `isAgentExperimentTraceProject`, `projectType`, `annotationsDisabled`, `defaultAnnotationConfigIds`.

Object fields (select subfields): `projectRoleBindings`, `space`, `volumeGateVisibility`, `modelVersions`, `modelBatches`, `modelPredictionVolume`, `modelEnvironments`, `dimension`, `dimensionValues`, `tracingSchema`, `modelSchema`, `modelPrimaryBaseline`, `modelReferenceDataset`, `modelDashboards`, `monitors`, `signalStatus`, `signalIssues`, `signalIssueActivityBounds`, `signalIssueCountsByEntity`, `signalIssueTimeSeries`, `monitorAggregations`, `driftConfigs`, `performanceConfigs`, `dataQualityConfigs`, `modelColumnMappingConfigs`, `projectSourceMappingConfigs`, `performanceMetrics`, `performanceStatus`, `performanceMetricOverTime`, `customMetrics`, `driftStatus`, `dataQualityStatus`, `UMAPPoints`, `spanRecordsPublic`, `costOverTime`, `tokensOverTime`, `costByModel`, `llmTracingStats`, `network`, `tags`, `_access`.

**space** `Space`

**Space fields**

Scalar fields: `id`, `name`, `description`, `uuid`, `createdAt`, `liveEnabled`, `isLLMOnlySpace`, `playgroundTracingModelId`, `evalTracingModelId`, `sandboxTracingModelId`, `mlModelsEnabled`, `private`, `gradientStartColor`, `gradientEndColor`, `hasDashboardsCreated`.

Object fields (select subfields): `organization`, `models`, `monitors`, `dashboards`, `spaceUsers`, `byobConnectors`, `importJobs`, `tableJobs`, `sandboxJobs`, `signalInsightSummary`, `signalEnabledProjectSummary`, `signalIssues`, `agentIssues`, `automations`, `datasets`, `experiments`, `customMetrics`, `onlineTasks`, `prompts`, `tags`, `evaluators`, `annotationQueues`, `playgroundViews`, `annotationConfigs`, `traceFilters`, `llmIntegrations`, `defaultLlmIntegration`, `defaultAgentRuntime`, `gates`, `_access`.

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
mutation DeleteData($input: DeleteDataMutationInput!) {
  deleteData(input: $input) {
    model { id name }
    space { id name }
  }
}
```

```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "input": {
    "modelId": "<ID>",
    "startDate": "2026-01-01",
    "endDate": "2026-01-01",
    "deleteType": "PRODUCTION"
  }
}
```

### setModelBaseline

Sets the primary baseline for a model

`setModelBaseline(input: SetModelBaselineMutationInput!): SetModelBaselineMutationPayload`

#### Arguments

**input** `SetModelBaselineMutationInput!` *required*

**SetModelBaselineMutationInput fields**

**modelId** `ID!` *required*

The modelId for which you are configuring the baseline

**referenceType** `BaselineReferenceType!` *required*

The reference type of model baseline. Values describe how a baseline is referenced(e.g. via a formal model\_version\_environment dataset, or via a set of filters) One of: `model_version_environment_metadata`, `filtered`.

**filteredBaseline** `SetModelFilteredBaselineInput`

**SetModelFilteredBaselineInput fields**

**modelEnvironmentName** `ModelEnvironmentName`

The model environment on the plot, ex. production, training, validation. Defaulted to production. One of: `production`, `validation`, `training`, `tracing`.

**filteredMovingWindowSeconds** `Float`

The evaluation window length of the moving window.

**filteredMovingWindowDelaySeconds** `Float`

The evaluation window delay length of the moving window.

**filteredStartDate** `DateTime`

The start bookend of the baseline's time range. If set, this time should be used for the baseline

**filteredEndDate** `DateTime`

The end bookend of the baseline's time range. If set, this time should be used for the baseline

**batchId** `ID`

The batchId that you are tagging as the baseline

**datasetBaseline** `SetModelDataSetBaselineInput`

**SetModelDataSetBaselineInput fields**

**batchId** `ID!` *required*

The batchId that you are tagging as the baseline

**startDateOverride** `DateTime`

The override start bookend of the baseline's time range.

**endDateOverride** `DateTime`

The override end bookend of the baseline's time range

**clientMutationId** `String`

#### Returns

**modelBaseline** `ModelBaseline`

**ModelBaseline fields**

Scalar fields: `id`, `referenceType`, `baselineType`, `startDateOverride`, `endDateOverride`, `userId`.

Object fields (select subfields): `filteredBaseline`, `modelVersionEnvironmentBatch`, `trafficOverTime`.

**model** `Model`

**Model fields**

Scalar fields: `id`, `name`, `uri`, `createdAt`, `isDemoModel`, `isRestricted`, `modelType`, `modelEnvironmentNames`, `averagePerformanceMetric`, `totalTraffic`, `taskVariables`, `annotationsEnabled`, `isAgentExperimentTraceProject`, `projectType`, `annotationsDisabled`, `defaultAnnotationConfigIds`.

Object fields (select subfields): `projectRoleBindings`, `space`, `volumeGateVisibility`, `modelVersions`, `modelBatches`, `modelPredictionVolume`, `modelEnvironments`, `dimension`, `dimensionValues`, `tracingSchema`, `modelSchema`, `modelPrimaryBaseline`, `modelReferenceDataset`, `modelDashboards`, `monitors`, `signalStatus`, `signalIssues`, `signalIssueActivityBounds`, `signalIssueCountsByEntity`, `signalIssueTimeSeries`, `monitorAggregations`, `driftConfigs`, `performanceConfigs`, `dataQualityConfigs`, `modelColumnMappingConfigs`, `projectSourceMappingConfigs`, `performanceMetrics`, `performanceStatus`, `performanceMetricOverTime`, `customMetrics`, `driftStatus`, `dataQualityStatus`, `UMAPPoints`, `spanRecordsPublic`, `costOverTime`, `tokensOverTime`, `costByModel`, `llmTracingStats`, `network`, `tags`, `_access`.

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
mutation SetModelBaseline($input: SetModelBaselineMutationInput!) {
  setModelBaseline(input: $input) {
    modelBaseline { id }
    model { id name }
  }
}
```

```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "input": {
    "modelId": "<ID>",
    "referenceType": "model_version_environment_metadata"
  }
}
```

### setModelAutoBaselineConfig

`setModelAutoBaselineConfig(input: SetAutoBaselineConfigMutationInput!): SetAutoBaselineConfigMutationPayload`

#### Arguments

**input** `SetAutoBaselineConfigMutationInput!` *required*

**SetAutoBaselineConfigMutationInput fields**

**modelId** `ID!` *required*

**environmentName** `ModelPreProductionEnvironmentName!` *required*

One of: `validation`, `training`.

**clientMutationId** `String`

#### Returns

**modelAutoBaselineConfig** `ModelAutoBaselineConfig!`

**ModelAutoBaselineConfig fields**

Scalar fields: `id`, `modelId`, `environmentName`.

**model** `Model!`

**Model fields**

Scalar fields: `id`, `name`, `uri`, `createdAt`, `isDemoModel`, `isRestricted`, `modelType`, `modelEnvironmentNames`, `averagePerformanceMetric`, `totalTraffic`, `taskVariables`, `annotationsEnabled`, `isAgentExperimentTraceProject`, `projectType`, `annotationsDisabled`, `defaultAnnotationConfigIds`.

Object fields (select subfields): `projectRoleBindings`, `space`, `volumeGateVisibility`, `modelVersions`, `modelBatches`, `modelPredictionVolume`, `modelEnvironments`, `dimension`, `dimensionValues`, `tracingSchema`, `modelSchema`, `modelPrimaryBaseline`, `modelReferenceDataset`, `modelDashboards`, `monitors`, `signalStatus`, `signalIssues`, `signalIssueActivityBounds`, `signalIssueCountsByEntity`, `signalIssueTimeSeries`, `monitorAggregations`, `driftConfigs`, `performanceConfigs`, `dataQualityConfigs`, `modelColumnMappingConfigs`, `projectSourceMappingConfigs`, `performanceMetrics`, `performanceStatus`, `performanceMetricOverTime`, `customMetrics`, `driftStatus`, `dataQualityStatus`, `UMAPPoints`, `spanRecordsPublic`, `costOverTime`, `tokensOverTime`, `costByModel`, `llmTracingStats`, `network`, `tags`, `_access`.

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
mutation SetModelAutoBaselineConfig($input: SetAutoBaselineConfigMutationInput!) {
  setModelAutoBaselineConfig(input: $input) {
    modelAutoBaselineConfig { id }
    model { id name }
  }
}
```

```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "input": {
    "modelId": "<ID>",
    "environmentName": "validation"
  }
}
```

### addTagsToModel

`addTagsToModel(input: AddTagsToModelInput!): AddTagsToModelPayload`

#### Arguments

**input** `AddTagsToModelInput!` *required*

**AddTagsToModelInput fields**

**modelId** `ID!` *required*

**tagIds** `[ID!]!` *required*

**clientMutationId** `String`

#### Returns

**result** `AddTagsToModelResult!`

Union of `TagAssociationSuccess`, `TagAssociationError`. Use inline fragments (`... on TypeName`).

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
mutation AddTagsToModel($input: AddTagsToModelInput!) {
  addTagsToModel(input: $input) {
    result { __typename }
  }
}
```

```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "input": {
    "modelId": "<ID>",
    "tagIds": [
      "<ID>"
    ]
  }
}
```

### removeTagsFromModel

`removeTagsFromModel(input: RemoveTagsFromModelInput!): RemoveTagsFromModelPayload`

#### Arguments

**input** `RemoveTagsFromModelInput!` *required*

**RemoveTagsFromModelInput fields**

**modelId** `ID!` *required*

**tagIds** `[ID!]!` *required*

**clientMutationId** `String`

#### Returns

**result** `RemoveTagsFromModelResult!`

Union of `TagAssociationSuccess`, `TagAssociationError`. Use inline fragments (`... on TypeName`).

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
mutation RemoveTagsFromModel($input: RemoveTagsFromModelInput!) {
  removeTagsFromModel(input: $input) {
    result { __typename }
  }
}
```

```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "input": {
    "modelId": "<ID>",
    "tagIds": [
      "<ID>"
    ]
  }
}
```

### updateModelColumnMappingConfig

Update column mapping configuration for a model

`updateModelColumnMappingConfig(input: UpdateModelColumnMappingConfigInput!): UpdateModelColumnMappingConfigPayload`

#### Arguments

**input** `UpdateModelColumnMappingConfigInput!` *required*

**UpdateModelColumnMappingConfigInput fields**

**modelId** `ID!` *required*

The model ID of the model to be updated

**columnMapping** `JSON!` *required*

The column mapping configuration as a JSON object with shortcut keys mapped to column paths

**clientMutationId** `String`

#### Returns

**model** `Model`

**Model fields**

Scalar fields: `id`, `name`, `uri`, `createdAt`, `isDemoModel`, `isRestricted`, `modelType`, `modelEnvironmentNames`, `averagePerformanceMetric`, `totalTraffic`, `taskVariables`, `annotationsEnabled`, `isAgentExperimentTraceProject`, `projectType`, `annotationsDisabled`, `defaultAnnotationConfigIds`.

Object fields (select subfields): `projectRoleBindings`, `space`, `volumeGateVisibility`, `modelVersions`, `modelBatches`, `modelPredictionVolume`, `modelEnvironments`, `dimension`, `dimensionValues`, `tracingSchema`, `modelSchema`, `modelPrimaryBaseline`, `modelReferenceDataset`, `modelDashboards`, `monitors`, `signalStatus`, `signalIssues`, `signalIssueActivityBounds`, `signalIssueCountsByEntity`, `signalIssueTimeSeries`, `monitorAggregations`, `driftConfigs`, `performanceConfigs`, `dataQualityConfigs`, `modelColumnMappingConfigs`, `projectSourceMappingConfigs`, `performanceMetrics`, `performanceStatus`, `performanceMetricOverTime`, `customMetrics`, `driftStatus`, `dataQualityStatus`, `UMAPPoints`, `spanRecordsPublic`, `costOverTime`, `tokensOverTime`, `costByModel`, `llmTracingStats`, `network`, `tags`, `_access`.

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
mutation UpdateModelColumnMappingConfig($input: UpdateModelColumnMappingConfigInput!) {
  updateModelColumnMappingConfig(input: $input) {
    model { id name }
  }
}
```

```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "input": {
    "modelId": "<ID>",
    "columnMapping": {}
  }
}
```

### updateProjectSourceMappingConfig

Update source mapping configuration for a project. Maps target columns (input/output) to dot-notation attribute paths.

`updateProjectSourceMappingConfig(input: UpdateProjectSourceMappingConfigInput!): UpdateProjectSourceMappingConfigPayload`

#### Arguments

**input** `UpdateProjectSourceMappingConfigInput!` *required*

**UpdateProjectSourceMappingConfigInput fields**

**modelId** `ID!` *required*

The model/project ID to update

**sourceMappings** `JSON!` *required*

Source mapping configuration as a JSON object. Keys must be "input" or "output", values are dot-notation attribute paths (e.g. \{"input": "input.value.actions.-1"})

**clientMutationId** `String`

#### Returns

**model** `Model`

**Model fields**

Scalar fields: `id`, `name`, `uri`, `createdAt`, `isDemoModel`, `isRestricted`, `modelType`, `modelEnvironmentNames`, `averagePerformanceMetric`, `totalTraffic`, `taskVariables`, `annotationsEnabled`, `isAgentExperimentTraceProject`, `projectType`, `annotationsDisabled`, `defaultAnnotationConfigIds`.

Object fields (select subfields): `projectRoleBindings`, `space`, `volumeGateVisibility`, `modelVersions`, `modelBatches`, `modelPredictionVolume`, `modelEnvironments`, `dimension`, `dimensionValues`, `tracingSchema`, `modelSchema`, `modelPrimaryBaseline`, `modelReferenceDataset`, `modelDashboards`, `monitors`, `signalStatus`, `signalIssues`, `signalIssueActivityBounds`, `signalIssueCountsByEntity`, `signalIssueTimeSeries`, `monitorAggregations`, `driftConfigs`, `performanceConfigs`, `dataQualityConfigs`, `modelColumnMappingConfigs`, `projectSourceMappingConfigs`, `performanceMetrics`, `performanceStatus`, `performanceMetricOverTime`, `customMetrics`, `driftStatus`, `dataQualityStatus`, `UMAPPoints`, `spanRecordsPublic`, `costOverTime`, `tokensOverTime`, `costByModel`, `llmTracingStats`, `network`, `tags`, `_access`.

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
mutation UpdateProjectSourceMappingConfig($input: UpdateProjectSourceMappingConfigInput!) {
  updateProjectSourceMappingConfig(input: $input) {
    model { id name }
  }
}
```

```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "input": {
    "modelId": "<ID>",
    "sourceMappings": {}
  }
}
```

### updateDimensionConfig

Updates an existing dimension config or creates a new one.

`updateDimensionConfig(input: UpdateDimensionConfigMutationInput!): UpdateDimensionConfigMutationPayload`

#### Arguments

**input** `UpdateDimensionConfigMutationInput!` *required*

**UpdateDimensionConfigMutationInput fields**

**modelId** `ID!` *required*

The ID of the model the dimension config belongs to

**dimensionName** `String!` *required*

**dimensionCategory** `DimensionCategory!` *required*

One of: `featureLabel`, `prediction`, `actuals`, `actualScore`, `actualClass`, `predictionClass`, `predictionScore`, `tag`, `spanProperty`, `llmEval`, `annotation`, `userAnnotation`, `modelVersion`, `batchId`.

**binOption** `DimensionBinOption!` *required*

One of: `equalWidth`, `custom`, `medianCentered`, `discrete`, `decile`, `quantiles`, `discreteTopN`.

**numBins** `Int`

A positive integer representing the number of bins to return. Compatible with the equalWidth binOption.

**customBins** `[Float!]`

An array of thresholds that represent the cut points E.x. \[1, 20, 50, 90]. Compatible with the custom binOption.

**quantiles** `[Float!]`

An array of thresholds that represent the custom quantiles E.x. \[0 (min), 0.3 (30th percentile), 0.5 (50th percentile), 1 (max)]. Compatible with the quantiles binOption.

**clientMutationId** `String`

#### Returns

**dimensionConfig** `DimensionConfig`

**DimensionConfig fields**

Scalar fields: `id`, `modelId`, `dimensionName`, `dimensionCategory`, `binOption`, `numBins`, `bins`.

**model** `Model!`

The model on which the dimension config was created.

**Model fields**

Scalar fields: `id`, `name`, `uri`, `createdAt`, `isDemoModel`, `isRestricted`, `modelType`, `modelEnvironmentNames`, `averagePerformanceMetric`, `totalTraffic`, `taskVariables`, `annotationsEnabled`, `isAgentExperimentTraceProject`, `projectType`, `annotationsDisabled`, `defaultAnnotationConfigIds`.

Object fields (select subfields): `projectRoleBindings`, `space`, `volumeGateVisibility`, `modelVersions`, `modelBatches`, `modelPredictionVolume`, `modelEnvironments`, `dimension`, `dimensionValues`, `tracingSchema`, `modelSchema`, `modelPrimaryBaseline`, `modelReferenceDataset`, `modelDashboards`, `monitors`, `signalStatus`, `signalIssues`, `signalIssueActivityBounds`, `signalIssueCountsByEntity`, `signalIssueTimeSeries`, `monitorAggregations`, `driftConfigs`, `performanceConfigs`, `dataQualityConfigs`, `modelColumnMappingConfigs`, `projectSourceMappingConfigs`, `performanceMetrics`, `performanceStatus`, `performanceMetricOverTime`, `customMetrics`, `driftStatus`, `dataQualityStatus`, `UMAPPoints`, `spanRecordsPublic`, `costOverTime`, `tokensOverTime`, `costByModel`, `llmTracingStats`, `network`, `tags`, `_access`.

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
mutation UpdateDimensionConfig($input: UpdateDimensionConfigMutationInput!) {
  updateDimensionConfig(input: $input) {
    dimensionConfig { id }
    model { id name }
  }
}
```

```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "input": {
    "modelId": "<ID>",
    "dimensionName": "<string>",
    "dimensionCategory": "featureLabel",
    "binOption": "equalWidth"
  }
}
```

### createTraceFilter

Create a trace filter

`createTraceFilter(input: CreateTraceFilterInput!): CreateTraceFilterPayload`

#### Arguments

**input** `CreateTraceFilterInput!` *required*

**CreateTraceFilterInput fields**

**name** `String!` *required*

The name of the trace filter

**description** `String`

The description of the trace filter

**expression** `String!` *required*

The expression of the trace filter

**subqueries** `[SpanFilterInput!]!` *required*

The span queries of the trace filter

**SpanFilterInput fields**

**name** `String!` *required*

The name of the span filter

**description** `String`

The description of the span filter

**query** `String!` *required*

The query of the span filter

**spaceId** `ID!` *required*

The space id of the trace filter

**clientMutationId** `String`

#### Returns

**traceFilter** `TraceFilter!`

The created trace filter

**TraceFilter fields**

Scalar fields: `id`, `name`, `description`, `expression`, `spaceId`, `createdAt`, `updatedAt`.

Object fields (select subfields): `subqueries`, `user`.

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
mutation CreateTraceFilter($input: CreateTraceFilterInput!) {
  createTraceFilter(input: $input) {
    traceFilter { id name }
  }
}
```

```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "input": {
    "name": "<string>",
    "expression": "<string>",
    "subqueries": [
      {
        "name": "<string>",
        "query": "<string>"
      }
    ],
    "spaceId": "<ID>"
  }
}
```

### updateTraceFilter

Updates a trace filter

`updateTraceFilter(input: UpdateTraceFilterInput!): UpdateTraceFilterPayload`

#### Arguments

**input** `UpdateTraceFilterInput!` *required*

**UpdateTraceFilterInput fields**

**id** `ID!` *required*

The id of the trace filter to update

**spaceId** `ID!` *required*

The space id of the trace filter

**name** `String`

The name of the trace filter

**description** `String`

The description of the trace filter

**expression** `String`

The expression of the trace filter

**subqueries** `[SpanFilterInput!]`

The span queries of the trace filter

**SpanFilterInput fields**

**name** `String!` *required*

The name of the span filter

**description** `String`

The description of the span filter

**query** `String!` *required*

The query of the span filter

**clientMutationId** `String`

#### Returns

**traceFilter** `TraceFilter!`

The updated trace filter

**TraceFilter fields**

Scalar fields: `id`, `name`, `description`, `expression`, `spaceId`, `createdAt`, `updatedAt`.

Object fields (select subfields): `subqueries`, `user`.

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
mutation UpdateTraceFilter($input: UpdateTraceFilterInput!) {
  updateTraceFilter(input: $input) {
    traceFilter { id name }
  }
}
```

```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "input": {
    "id": "<ID>",
    "spaceId": "<ID>"
  }
}
```

### deleteTraceFilter

Deletes a traceFilter

`deleteTraceFilter(input: DeleteTraceFilterInput!): DeleteTraceFilterPayload`

#### Arguments

**input** `DeleteTraceFilterInput!` *required*

**DeleteTraceFilterInput fields**

**id** `ID!` *required*

**spaceId** `ID!` *required*

The space id

**clientMutationId** `String`

#### Returns

**success** `Boolean!`

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
mutation DeleteTraceFilter($input: DeleteTraceFilterInput!) {
  deleteTraceFilter(input: $input) {
    success
  }
}
```

```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "input": {
    "id": "<ID>",
    "spaceId": "<ID>"
  }
}
```

### createCustomMetric

Creates a new custom metric scoped to a space.

`createCustomMetric(input: CreateCustomMetricMutationInput!): CreateCustomMetricMutationPayload`

#### Arguments

**input** `CreateCustomMetricMutationInput!` *required*

**CreateCustomMetricMutationInput fields**

**spaceId** `ID!` *required*

The id of the space to create the custom metric in.

**modelId** `ID`

Optional model id used to validate the SQL against a specific model schema.

**name** `String!` *required*

A name that describes the custom metric

**description** `String!` *required*

The description of the custom metric

**metric** `String!` *required*

The custom metric query. E.x. select AVG(scorePredictionLabel) from model

**modelEnvironmentName** `ModelEnvironmentName`

Model environment used to validate the metric. Defaults to production when modelId is provided. One of: `production`, `validation`, `training`, `tracing`.

**includeStartDate** `String`

Optional ISO start time to widen model schema discovery to match the active dataset window

**includeEndDate** `String`

Optional ISO end time to widen model schema discovery to match the active dataset window

**clientMutationId** `String`

#### Returns

**customMetric** `CustomMetric!`

The newly created custom metric.

**CustomMetric fields**

Scalar fields: `id`, `createdAt`, `name`, `description`, `metric`, `requiresPositiveClass`, `spaceId`, `modelName`, `modelId`, `modelType`.

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
mutation CreateCustomMetric($input: CreateCustomMetricMutationInput!) {
  createCustomMetric(input: $input) {
    customMetric { id name }
  }
}
```

```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "input": {
    "spaceId": "<ID>",
    "name": "<string>",
    "description": "<string>",
    "metric": "<string>"
  }
}
```

### updateCustomMetric

Updates an existing custom metric.

`updateCustomMetric(input: UpdateCustomMetricMutationInput!): UpdateCustomMetricMutationPayload`

#### Arguments

**input** `UpdateCustomMetricMutationInput!` *required*

**UpdateCustomMetricMutationInput fields**

**customMetricId** `ID!` *required*

The id of the custom metric to update.

**modelId** `ID`

Optional model id used to validate the SQL against a specific model schema.

**name** `String!` *required*

A name that describes the custom metric

**description** `String!` *required*

The description of the custom metric

**customMetric** `String!` *required*

The custom metric query. E.x. select AVG(scorePredictionLabel) from model

**modelEnvironmentName** `ModelEnvironmentName`

Model environment used to validate the metric. Defaults to production when modelId is provided. One of: `production`, `validation`, `training`, `tracing`.

**includeStartDate** `String`

Optional ISO start time to widen model schema discovery to match the active dataset window

**includeEndDate** `String`

Optional ISO end time to widen model schema discovery to match the active dataset window

**clientMutationId** `String`

#### Returns

**customMetric** `CustomMetric!`

The updated custom metric.

**CustomMetric fields**

Scalar fields: `id`, `createdAt`, `name`, `description`, `metric`, `requiresPositiveClass`, `spaceId`, `modelName`, `modelId`, `modelType`.

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
mutation UpdateCustomMetric($input: UpdateCustomMetricMutationInput!) {
  updateCustomMetric(input: $input) {
    customMetric { id name }
  }
}
```

```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "input": {
    "customMetricId": "<ID>",
    "name": "<string>",
    "description": "<string>",
    "customMetric": "<string>"
  }
}
```

### deleteCustomMetric

Deletes a custom metric.

`deleteCustomMetric(input: DeleteCustomMetricMutationInput!): DeleteCustomMetricMutationPayload`

#### Arguments

**input** `DeleteCustomMetricMutationInput!` *required*

**DeleteCustomMetricMutationInput fields**

**spaceId** `ID!` *required*

The id of the space the custom metric belongs to.

**modelId** `ID`

Deprecated: formerly required model id. No longer used. **Deprecated:** Custom metrics are now space-scoped.

**customMetricId** `ID!` *required*

The id of the custom metric to delete.

**clientMutationId** `String`

#### Returns

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
mutation DeleteCustomMetric($input: DeleteCustomMetricMutationInput!) {
  deleteCustomMetric(input: $input) {
    clientMutationId
  }
}
```

```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "input": {
    "spaceId": "<ID>",
    "customMetricId": "<ID>"
  }
}
```

### createCostConfig

Create a cost config

`createCostConfig(input: CreateCostConfigInput!): CreateCostConfigPayload`

#### Arguments

**input** `CreateCostConfigInput!` *required*

**CreateCostConfigInput fields**

**modelName** `String!` *required*

The name of the LLM model to create a cost config for

**modelRegex** `String`

The regex of the LLM model to create a cost config for

**llmProvider** `String`

The provider of the LLM model

**accountOrganizationId** `ID`

Legacy org anchor for the flag-off surface. Optional: the account-level surface omits it and the server derives the legacy column from the scopings or the account's org.

**scopings** `[CostConfigScopingInput!]`

Scopes this cost config applies to (account-wide/org/space). Defaults to the account organization when omitted.

**CostConfigScopingInput fields**

**accountOrganizationId** `ID`

The account organization this scope applies to

**spaceId** `ID`

The space this scope applies to

**tokenConfigs** `[InputTokenConfig]!` *required*

The token configs for the cost config

**InputTokenConfig fields**

**tokenName** `String!` *required*

**tokenCostDollars** `Float!` *required*

**tokenAppliesTo** `TokenAppliesTo!` *required*

Whether the token applies to the prompt or completion One of: `prompt`, `completion`.

**pricingStartsAtTokenCount** `Int`

Token count threshold at which this pricing tier applies (default 0)

**clientMutationId** `String`

#### Returns

**success** `Boolean!`

Whether or not the cost config was successfully created or updated.

**costConfig** `CostConfig!`

The created cost config

**CostConfig fields**

Scalar fields: `id`, `createdAt`, `accountOrganizationId`, `updatedAt`, `modelName`, `modelRegex`, `llmProvider`, `isDefault`, `hasUnauthorizedScopings`.

Object fields (select subfields): `user`, `tokenConfigs`, `scopings`.

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
mutation CreateCostConfig($input: CreateCostConfigInput!) {
  createCostConfig(input: $input) {
    success
    costConfig { id }
  }
}
```

```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "input": {
    "modelName": "<string>",
    "tokenConfigs": [
      {
        "tokenName": "<string>",
        "tokenCostDollars": 1,
        "tokenAppliesTo": "prompt"
      }
    ]
  }
}
```

### updateCostConfig

Update a cost config

`updateCostConfig(input: UpdateCostConfigInput!): UpdateCostConfigPayload`

#### Arguments

**input** `UpdateCostConfigInput!` *required*

**UpdateCostConfigInput fields**

**costConfigId** `ID!` *required*

The id of the cost config to update

**accountOrganizationId** `ID`

Unused by the resolver (auth derives from the config's own scopings); kept optional for the legacy flag-off surface.

**modelName** `String`

The name of the updated

**modelRegex** `String`

The regex of the model to update the cost config for

**llmProvider** `String`

The provider of the LLM model

**scopings** `[CostConfigScopingInput!]`

When provided, replaces the scopes this cost config applies to (account-wide/org/space). Omit to leave scopes unchanged.

**CostConfigScopingInput fields**

**accountOrganizationId** `ID`

The account organization this scope applies to

**spaceId** `ID`

The space this scope applies to

**tokenConfigs** `[InputTokenConfig]!` *required*

The token configs for the cost config

**InputTokenConfig fields**

**tokenName** `String!` *required*

**tokenCostDollars** `Float!` *required*

**tokenAppliesTo** `TokenAppliesTo!` *required*

Whether the token applies to the prompt or completion One of: `prompt`, `completion`.

**pricingStartsAtTokenCount** `Int`

Token count threshold at which this pricing tier applies (default 0)

**clientMutationId** `String`

#### Returns

**costConfig** `CostConfig!`

The updated cost config

**CostConfig fields**

Scalar fields: `id`, `createdAt`, `accountOrganizationId`, `updatedAt`, `modelName`, `modelRegex`, `llmProvider`, `isDefault`, `hasUnauthorizedScopings`.

Object fields (select subfields): `user`, `tokenConfigs`, `scopings`.

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
mutation UpdateCostConfig($input: UpdateCostConfigInput!) {
  updateCostConfig(input: $input) {
    costConfig { id }
  }
}
```

```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "input": {
    "costConfigId": "<ID>",
    "tokenConfigs": [
      {
        "tokenName": "<string>",
        "tokenCostDollars": 1,
        "tokenAppliesTo": "prompt"
      }
    ]
  }
}
```

### deleteCostConfig

Deletes a cost config

`deleteCostConfig(input: DeleteCostConfigInput!): DeleteCostConfigPayload`

#### Arguments

**input** `DeleteCostConfigInput!` *required*

**DeleteCostConfigInput fields**

**id** `ID!` *required*

**accountOrganizationId** `ID`

Unused by the resolver (lookup + auth are by config id); kept optional for the legacy flag-off surface.

**clientMutationId** `String`

#### Returns

**success** `Boolean!`

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
mutation DeleteCostConfig($input: DeleteCostConfigInput!) {
  deleteCostConfig(input: $input) {
    success
  }
}
```

```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "input": {
    "id": "<ID>"
  }
}
```
