---
title: "GET /api/agent/groupBy"
method: GET
path: "/api/agent/groupBy"
tags: ["agent"]
---

# GET /api/agent/groupBy

`GET /api/agent/groupBy`

Group Agents by fields

## Response `200`

Successful operation

- object
  - `data` AgentGroupByOutputType[], required — The Prisma response data serialized with superjson
    - `id` string, required
    - `provider` string, required
    - `modelType` string, required
    - `numAgents` integer, required
    - `isActive` boolean, required
    - `anthropicApiKey` string, nullable
    - `awsAccessKeyId` string, nullable
    - `awsSecretAccessKey` string, nullable
    - `awsSessionToken` string, nullable
    - `awsRegion` string, nullable
    - `apiEndpoint` string, nullable
    - `apiKey` string, nullable
    - `organizationId` string, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `_count` AgentCountAggregateOutputType
      - `id` integer, required
      - `provider` integer, required
      - `modelType` integer, required
      - `numAgents` integer, required
      - `isActive` integer, required
      - `anthropicApiKey` integer, required
      - `awsAccessKeyId` integer, required
      - `awsSecretAccessKey` integer, required
      - `awsSessionToken` integer, required
      - `awsRegion` integer, required
      - `apiEndpoint` integer, required
      - `apiKey` integer, required
      - `organizationId` integer, required
      - `createdAt` integer, required
      - `updatedAt` integer, required
      - `_all` integer, required
    - `_avg` AgentAvgAggregateOutputType
      - `numAgents` number, nullable
    - `_sum` AgentSumAggregateOutputType
      - `numAgents` integer, nullable
    - `_min` AgentMinAggregateOutputType
      - `id` string, nullable
      - `provider` string, nullable
      - `modelType` string, nullable
      - `numAgents` integer, nullable
      - `isActive` boolean, nullable
      - `anthropicApiKey` string, nullable
      - `awsAccessKeyId` string, nullable
      - `awsSecretAccessKey` string, nullable
      - `awsSessionToken` string, nullable
      - `awsRegion` string, nullable
      - `apiEndpoint` string, nullable
      - `apiKey` string, nullable
      - `organizationId` string, nullable
      - `createdAt` string, date-time, nullable
      - `updatedAt` string, date-time, nullable
    - `_max` AgentMaxAggregateOutputType
      - `id` string, nullable
      - `provider` string, nullable
      - `modelType` string, nullable
      - `numAgents` integer, nullable
      - `isActive` boolean, nullable
      - `anthropicApiKey` string, nullable
      - `awsAccessKeyId` string, nullable
      - `awsSecretAccessKey` string, nullable
      - `awsSessionToken` string, nullable
      - `awsRegion` string, nullable
      - `apiEndpoint` string, nullable
      - `apiKey` string, nullable
      - `organizationId` string, nullable
      - `createdAt` string, date-time, nullable
      - `updatedAt` string, date-time, nullable
  - `meta` Meta — Meta information about the request or response
    - `serialization` unknown

## Other responses

- `400` — Invalid request
- `403` — Request is forbidden
- `422` — Request is unprocessable due to validation errors

---

[API](https://skmtc.dev/iris-networks/apis/my-awesome-api.md) · [All operations](https://skmtc.dev/iris-networks/apis/my-awesome-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/iris-networks/my-awesome-api/revisions/4cea49731f1e/schema)
