List the AI models an agent step can use
/automation/models
Requires `automation:create` or `automation:manage`. Every model the organization stored, on every provider, the same rows the AI models settings list: `ref` (`<provider>:<id>`) is what an agent step's `model` takes, and `can_run` with `blocked_reason` (`no_key`, `key_rejected`, `no_tools`) and `blocked_message` says whether it can run now. Leave `model` out of a step to follow the organization default (`default_model_ref`, a ref, or '' when there is none; `default_model` is its bare id). Filtered by `q` on the server. `can_manage` says whether the caller may change the models in settings.
Query Parameters
Matches the model label, id or provider. LIKE wildcards are matched literally. Max 200 characters.
Response Body
The organization default's own model id, without its provider; '' when no model can run.
The organization default as a ref (<provider>:<id>); '' when no model can run.
no_keykey_rejectedno_toolsnull
enabledcustom
curl -X GET 'https://api.elaichi.ai/automation/models' \
-H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
-H 'Content-Type: application/json'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);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())