---
title: "Get Retrieval Info"
method: GET
path: "/agents/{agent_id}/query/{message_id}/retrieval/info"
tags: ["/agents/{id}/query"]
---

# Get Retrieval Info

`GET /agents/{agent_id}/query/{message_id}/retrieval/info`

Return metadata of the contents used to generate the response for a given message.

## Path parameters

- `agent_id` string, uuid, required — ID of the agent which sent the provided message.
- `message_id` string, uuid, required — ID of the message for which the content metadata needs to be retrieved.

## Query parameters

- `content_ids` string[], required — List of content ids for which to get the metadata.

## Response `200`

Successful Response

- RetrievalInfoQueryResponse
  - `content_metadatas` union[] — List of content metadatas.
    - union — Content type
      - UnstructuredContentMetadata
        - `x0` number, required — X coordinate of the top left corner on the bounding box.
        - `y0` number, required — Y coordinate of the top left corner on the bounding box.
        - `x1` number, required — X coordinate of the bottom right corner on the bounding box.
        - `y1` number, required — Y coordinate of the bottom right corner on the bounding box.
        - `page` integer, required — Page number of the content.
        - `page_img` string, required — Image of the page on which the content occurs.
        - `width` number, required — Width of the image.
        - `height` number, required — Height of the image.
        - `content_id` string, uuid, required — Id of the content.
        - `document_id` string, uuid, required — Id of the document which the content belongs to.
        - `content_type` 'unstructured'
        - `content_text` string, required — Text of the content.
      - StructuredContentMetadata
        - `content_id` string, required — Id of the content.
        - `content_type` 'structured'
        - `content_text` unknown, required
      - FileAnalysisContentMetadata
        - `gcp_location` string, required — GCP location of the file.
        - `file_format` string, required — Format of the file.
        - `content_id` string, uuid, required — Id of the content.
        - `content_type` 'file_analysis'

## Other responses

- `422` — Validation Error

## Changes

- **2025-10-28** `c8152db45500` — 1 breaking, 1 info
  - added `#/components/schemas/FileAnalysisContentMetadata` to the `content_metadatas/items/` response property `oneOf` list for the response status `200`
  - added `file_analysis` discriminator mapping keys to the `content_metadatas/items/` response property for the response status `200`
- **2025-08-26** `db7245c74772` — 1 info
  - added the required property `content_metadatas/items/oneOf[subschema #1: UnstructuredContentMetadata]/document_id` to the response with the `200` status
- **2025-05-08** `17bdb8a33fb4` — 12 breaking, 1 info
  - added `#/components/schemas/UnstructuredContentMetadata, #/components/schemas/StructuredContentMetadata` to the `content_metadatas/items/` response property `oneOf` list for the response status `200`
  - the `content_metadatas/items/` response's property type/format changed from `object`/`` to ``/`` for status `200`
  - removed the required property `content_metadatas/items/content_id` from the response with the `200` status
  - removed the required property `content_metadatas/items/content_text` from the response with the `200` status
  - …9 more
- **2025-02-26** `5298551c424b` — 1 info
  - added the required property `content_metadatas/items/page` to the response with the `200` status
- **2025-02-08** `d79ccb778953` — 1 info
  - added the required property `content_metadatas/items/content_text` to the response with the `200` status

[Full history](https://skmtc.dev/contextualai/apis/endpoints/changes/agents/:agent_id/query/:message_id/retrieval/info/get.md)

---

[API](https://skmtc.dev/contextualai/apis/endpoints.md) · [All operations](https://skmtc.dev/contextualai/apis/endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/contextualai/endpoints/revisions/ca7f807eec8b/schema)
