Listing your agents through the API: type=agent, base_model and status

All in One AIAgents Through the API·· 8 views· 3 min read

The API model list, GET /v1/models, also includes your agents, before the models. With type=agent, it returns only the agents. You need a key with ai:read, and listing spends no credits.

The request

On Linux and macOS:

curl "https://api.mozout.com/v1/models?type=agent" -H "Authorization: Bearer $MOZOUT_API_KEY"

In Windows PowerShell:

curl.exe "https://api.mozout.com/v1/models?type=agent" -H "Authorization: Bearer $env:MOZOUT_API_KEY"

The list follows the OpenAI format, so the SDK's client.models.list() works too. In Python, with the filter:

import os
from openai import OpenAI

client = OpenAI(base_url="https://api.mozout.com/v1", api_key=os.environ["MOZOUT_API_KEY"])

for m in client.models.list(extra_query={"type": "agent"}):
print(m.id, getattr(m, "status", None), getattr(m, "base_model", None))

What comes with each agent

{
"id": "agent/7c1e9a42-b35d8f06-a2c4e719-5d0b3f8e",
"object": "model",
"owned_by": "user",
"type": "agent",
"category": "agent",
"name": "Support assistant",
"description": "Answers customer questions about our plans.",
"base_model": "deepseek-ai/deepseek-v4-flash",
"status": "active",
"tools": ["web_fetch", "current_datetime"],
"pricing": { "unit": "1M tokens", "input": 56.0, "output": 112.0, "cached_input": 11.2 }
}

Field What it says
id The value to put in model in chat requests: agent/ and the agent id.
type Always agent.
name and description The name and description you gave the agent in All in One AI.
base_model The text model the agent uses.
pricing That model's price, in credits per 1 million tokens. The agent has no price of its own.
tools The tools turned on: web_fetch, web_search and current_datetime.
status active or paused.

Each account only sees its own agents. The list is the same with a sandbox_ key and with a prod_ key.

What it is for

1 Checking the right id before you put it in a program.
2 Seeing whether an agent is paused before you open the website chat.
3 Showing your agents in an app of your own, so someone can pick one.
4 Knowing the price per token, from the pricing of the agent's model.
On the MCP server, the list_models tool also accepts the agent type. See talking to your agent through MCP.

Want to use your agents in your own programs? See All in One AI.

See All in One AI

SEE ALSO

Using your AI agent through the API: agent/ in the model field

Pausing, turning back on or deleting an agent, and the agent_paused error

Agent errors through the API: agent_paused and model_not_found

Choosing a text model: price, context window and what each one is for

All in One AI

RECOMMENDED PRODUCT

Web hosting with cPanel

Domain and SSL included, daily backups and the panel you already know. from $6.60/mo (3-year plan, with coupon)

See plans
Was this answer helpful? Your answer helps us improve this article.