# Query Templates

Source: https://agenta.ai/docs/reference/api/query-agent-templates

`POST /agent-templates/query`

Base URL: `https://us.cloud.agenta.ai/api` (US cloud), `https://eu.cloud.agenta.ai/api` (EU cloud) or `$AGENTA_HOST/api` (self-hosted). Authentication: `Authorization: ApiKey YOUR_API_KEY`.

Query Templates

## Request body schema

Content type: `application/json`

- `search` (string, nullable)
- `category` (string, nullable)
- `author_id` (string, nullable)

## Response schemas

### 200: Successful Response

- `count` (integer, required)
- `templates` (array of object, required)
  - `key` (string, required)
  - `source` (object, required)
    - `kind` (string) Default: `"internal"`.
    - `key` (string, required)
  - `version` (string, required)
  - `latest` (string, required)
  - `versions` (array of string, required)
  - `digest` (string, required)
  - `name` (string, required)
  - `summary` (string, required)
  - `description` (string, required)
  - `category` (string, required)
  - `tags` (array of string, required)
  - `author` (object, required)
    - `schema_version` (integer, required)
    - `id` (string, required)
    - `name` (string, required)
    - `bio` (string, required)
    - `avatar_url` (string, nullable)
    - `links` (array of object)
  - `initials` (string, required)
  - `color` (string, required)
  - `instructions_summary` (string, required)
  - `trigger` (string, required)
  - `trigger_description` (string, required)
  - `seed_message` (string, required)
  - `builder_message` (string, required)
  - `model` (string, required)
  - `tools_summary` (string, required)
  - `connections` (array of object, required)
    - `key` (string, required)
    - `role` (string, required)
    - `required` (boolean, required)
    - `primary` (object, required)
    - `alternatives` (array of string)
  - `example` (object, nullable)
    - `prompt` (string, required)
    - `steps` (array of string, required)
    - `reply` (string, required)
    - `artifacts` (array of string, nullable)
    - `status` (string, nullable)
  - `media` (array of object)
    - `kind` (string, one of: "image", "video", required)
    - `url` (string, required)
    - `alt` (string, required)
    - `caption` (string, nullable)
    - `poster_url` (string, nullable)
- … more fields: see the OpenAPI specification.

### 422: Validation Error

- `detail` (array of object)
  - `loc` (array of string | integer, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (Context)
