# List the AI models an agent step can use

> Source: https://elaichi.ai/docs/api-reference/workflows/automation/listautomationmodels/

`GET /automation/models`

Resource: **Workflow** · API: **Workflows**

## Query parameters

- **`q`** _(string)_
  Matches the model label, id or provider. LIKE wildcards are matched literally. Max 200 characters.

## Response body

- **`result`** _(array<object>)_
  - **`ref`** _(string)_
  - **`id`** _(string)_
  - **`label`** _(string)_
  - **`provider`** _(string)_
  - **`provider_label`** _(string)_
  - **`source`** _(string)_
    Allowed: `enabled`, `custom`
  - **`context_window`** _(integer)_
  - **`supports_tools`** _(boolean)_
  - **`default`** _(boolean)_
  - **`can_run`** _(boolean)_
  - **`blocked_reason`** _(string,null)_
    Allowed: `no_key`, `key_rejected`, `no_tools`, `null`
  - **`blocked_message`** _(string,null)_
- **`next_cursor`** _(string,null)_
- **`prev_cursor`** _(string,null)_
- **`default_model`** _(string)_
  The organization default's own model id, without its provider; '' when no model can run.
- **`default_model_ref`** _(string)_
  The organization default as a ref (`<provider>:<id>`); '' when no model can run.
- **`default_model_label`** _(string,null)_
- **`context_window`** _(integer)_
- **`can_manage`** _(boolean)_

## Code examples

### curl

```bash
curl -X GET 'https://api.elaichi.ai/automation/models' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
const response = await fetch('https://api.elaichi.ai/automation/models', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Python

```python
import os
import requests

url = "https://api.elaichi.ai/automation/models"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}

response = requests.get(url, headers=headers)
print(response.json())
```
