Skip to main content

GenAI RAG

GenAI RAG is Nexla's conversational AI for querying your data. It uses an AI agent to search across one or more nexsets, reason over the retrieved data, and generate natural language answers with inline citations. The agent dynamically decides which nexsets to query, what search terms to use, and how to combine results.

You can use GenAI RAG through the web UI or the API.

Web UI

The web interface at genai.nexla.com provides a chat-based experience with real-time streaming, citation exploration, and filter management — no code required.

GuideDescription
Getting StartedSet up authentication, select credentials and nexsets, ask your first question
Chat & QueryingFull guide to the chat interface, streaming, citations, and message actions
Canvas PanelExplore citations, sources, tool calls, and the agent's reasoning trace
SettingsAuthentication, response tuning, filter management, and sidebar configuration
Keyboard ShortcutsKeyboard shortcuts for common actions

API

The GenAI RAG API provides programmatic access at api-genai.nexla.io. All requests require an Authorization header.

Base URL: https://api-genai.nexla.io

Authentication:

Authorization: Basic <your_service_key>
Authorization: Bearer <your_service_key_or_jwt>

The server detects the credential type automatically. A Bearer-prefixed value with three dot-separated segments is treated as a JWT; anything else is treated as a Nexla service key. When a JWT is supplied, its user_id claim takes precedence over user_context.user_id in the request body, and an org_id claim is required (otherwise the request is rejected with 401).

A missing or invalid credential returns 401 Unauthorized.

You can create a service key from https://dataops.nexla.io/settings/authentication.

Endpoint GroupBase PathDescription
Agentic RAG Query/v2/agentic-ragQuery nexsets with AI agent, streaming, citations, multi-turn conversations, and cache management
Filter Registration/v2/nexsets/{id}/filtersRegister and manage per-nexset filter schemas for access control and pre-retrieval filtering
Available Models/list_modelsList available LLM and embedding models by provider

Quick Start (API)

Send a query to the Agentic RAG endpoint:

curl -X POST https://api-genai.nexla.io/v2/agentic-rag \
-H "Content-Type: application/json" \
-H "Authorization: Basic YOUR_API_KEY" \
-d '{
"user_prompt": "What are the latest sales figures for Q2?",
"nexsets": ["10000", "10001"],
"user_context": {
"user_id": "user-123"
},
"llm_config": {
"credential_id": "cred-456"
}
}'

The response contains the generated answer with inline citation markers and full source metadata:

{
"answer": "The Q2 sales figures show a 12% increase over Q1, reaching $4.2M in total revenue [1].",
"citations": [
{
"index": 1,
"nexset_id": "10000",
"nexset_name": "Sales Reports",
"document_id": "doc-q2-2025",
"title": "Q2 2025 Revenue Summary",
"page_numbers": [3],
"relevance_score": 0.94
}
],
"usage": {
"requests": 3,
"tool_calls": 2,
"input_tokens": 1250,
"output_tokens": 340,
"total_tokens": 1590
},
"model": "gpt-4o",
"provider": "openai"
}