Skip to main content
POST
/
api
/
v2
/
rag
/
agent-response
Get agent response (v2)
curl --request POST \
  --url https://rest-api.captide.co/api/v2/rag/agent-response \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "query": "<string>",
  "documentIds": "<string>"
}
'
{
  "content": "Zscaler's net dollar retention rates for the last two quarters are as follows:\n\n- Q3 2025 (trailing 12 months ended April 30, 2025): **114%**  \n- Q2 2025 (trailing 12 months ended January 31, 2025): **115%**  \n\nThese figures reflect Zscaler's ability to retain and expand recurring revenue from existing customers over the respective periods [#eaf60040].",
  "sourceMap": {
    "#eaf60040": {
      "pageNumber": 41,
      "excerpt": "For the trailing 12 months ended January 31, 2025 and 2024, the dollar-based net retention rate was 115% and 117%, respectively.",
      "documentMetadata": {
        "id": "eaf63939-0da6-4fc7-ba06-adbd46e546a9",
        "title": "Zscaler Q2 2025 Form 10-Q",
        "documentCategory": "interim-financial-report",
        "date": "2025-03-10",
        "fiscalQuarter": 2,
        "fiscalYear": 2025,
        "companyName": "Zscaler, Inc.",
        "tickers": [
          "ZS"
        ]
      }
    }
  }
}

Authorizations

X-API-Key
string
header
required

Body

application/json

Request model for agent queries.

query
string
required

The natural language query

Minimum string length: 1
documentIds
string | null

Comma-separated string of document file IDs. If provided and non-empty, skips document and company selection and goes directly to retrieval.

Response

Agent response generated successfully

Response model for agent queries.

content
string
required

The agent's response in markdown format

sourceMap
Sourcemap · object
required

Mapping of citation reference IDs to chunk metadata. Empty when no relevant documents are found.