External API: AI agent and semantic search
External API ›Agent & semantic search
April 7, 2026Updated: April 7, 20264 min read1 views
How to query the AI and search documents semantically via API
AI and semantic search via API
The external API offers two advanced endpoints to leverage artificial intelligence.
Semantic search
POST /api/v1/dam/external/assets/semantic-search/
{
"query": "contracts with penalties expiring in 2026",
"category": "contracts",
"limit": 10
}Search documents by meaning, not just keywords. Requires the tenant to have embeddings configured.
Agent query (RAG)
POST /api/v1/dam/external/agent/query/
{
"question": "Which contracts have penalties over 50,000 euros?",
"include_sources": true
}The AI reads relevant documents and generates a natural language answer with source citations. Ideal for:
- Business chatbots answering from documents
- AI agents analyzing contract portfolios
- Dashboards generating automatic summaries
AI on-demand
GET /api/v1/dam/external/assets/{id}/?ai_prompt=Summarize the penalty clauses
Ask the AI to analyze a specific document with a custom prompt. The response is added to the ai_response field in the response.
Requirement: all AI endpoints require a configured AI connector in the tenant.