---
type: api
title: Get machine learning information
description: Get defaults and limits used by machine learning.
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/v9/operation/operation-ml-info
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/v9/operation/operation-ml-info
products:
  - Elasticsearch
---

# Get machine learning information

Availability: Generally available since 6.3

## Paths

- `GET` `/_ml/info`

## Description

Get defaults and limits used by machine learning.
This endpoint is designed to be used by a user interface that needs to fully
understand machine learning configurations where some options are not
specified, meaning that the defaults should be used. This endpoint may be
used to find out what those defaults are. It also provides information about
the maximum size of machine learning jobs that could run in the current
cluster configuration.

## Required authorization

- Cluster privileges: `monitor_ml`

## Authentication

- Api key: `Authorization: <value>`
  Elasticsearch APIs support key-based authentication.
  You must create an API key and use the encoded value in the request header.
  For example:
  
  
  ```
  curl -X GET "${ES_URL}/_cat/indices?v=true" \
    -H "Authorization: ApiKey ${API_KEY}"
  ```
  
  To get API keys, use the `/_security/api_key` APIs.
- Basic: `Authorization: Basic <credentials>`
- Bearer: `Authorization: Bearer <token>`
  Elasticsearch APIs support the use of bearer tokens in the `Authorization` HTTP header to authenticate with the API.
  For examples, refer to [Token-based authentication services](https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/token-based-authentication-services)

## Response

`application/json`

- `defaults` (object)
  - `anomaly_detectors` (object)
    - `categorization_analyzer` (union)
    - `categorization_examples_limit` (number)
    - `model_memory_limit` (string)
    - `model_snapshot_retention_days` (number)
    - `daily_model_snapshot_retention_after_days` (number)
  - `datafeeds` (object)
    - `scroll_size` (number)
  - `model_platform_variant` (enum)
    Returns `linux-x86_64` when all ML nodes are x86, or when no ML nodes exist but the cluster is in Elastic Cloud.
Returns `platform_agnostic` otherwise.
    Values: `linux-x86_64`, `platform_agnostic`
- `limits` (object)
  - `max_single_ml_node_processors` (number)
  - `total_ml_processors` (number)
  - `max_model_memory_limit` (number | string)
  - `effective_max_model_memory_limit` (number | string)
  - `total_ml_memory` (number | string)
- `upgrade_mode` (boolean)
- `native_code` (object)
  - `build_hash` (string)
  - `version` (string)
## Code examples

#### Console

```console
GET _ml/info
```

#### JavaScript

```javascript
const response = await client.ml.info();
```

#### Python

```python
resp = client.ml.info()
```

#### curl

```curl
curl -X GET "$ELASTICSEARCH_URL/_ml/info" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.ml().info();
```

#### C#

```c#
var response = await client.MachineLearning.InfoAsync();
```

#### PHP

```php
$resp = $client->ml()->info();
```

#### Ruby

```ruby
response = client.ml.info
```

