
Configure and test your production API endpoint with proper authentication
Configure API security settings and test your RAG endpoint with proper authentication. This step transforms your tested configuration into a production-ready API.
Entry Point: API Setup tab → "Test Endpoint" button
Prerequisites: Pipeline configuration optimized (Step 3 complete)
Expected Outcome: Verified API endpoint working with authentication
| Item | Status | Notes |
|---|---|---|
| API key generated | ✅ Automatic | Created on project creation |
| API key securely stored | ⚠️ Manual | Copy immediately after creation |
| API key masked display | ✅ Automatic | For verification only |
Important: The raw API key is only shown once during initial generation. Store it securely immediately.
| Setting | Recommended Value | Purpose |
|---|---|---|
| Rate Limit | 1000 req/hour | Prevent abuse |
| Timeout | 30 seconds | Resource management |
| IP Whitelist | Your application IPs | Additional security |
Verify your API accepts:
Location: API Setup tab → "Test Endpoint" button
Steps:
What to Verify:
Basic Query:
curl -X POST "https://api.guidedmind.ai/v1/rag/YOUR_PROJECT_ID/query" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "What is the return policy?",
"options": {
"max_results": 5,
"temperature": 0.7
}
}'Query with Filters:
curl -X POST "https://api.guidedmind.ai/v1/rag/YOUR_PROJECT_ID/query" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "What is the return policy?",
"filters": {
"document_ids": ["doc_123", "doc_456"]
},
"options": {
"max_results": 5
}
}'Query with GraphRAG:
curl -X POST "https://api.guidedmind.ai/v1/rag/YOUR_PROJECT_ID/query" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "Who works at Acme Corp?",
"options": {
"include_graph": true
}
}'For AI agents using MCP, the tool is automatically discovered:
User: "What is the return policy?"
Agent: [Automatically calls MCP tool `rag_query` with query]
Agent: "Based on the documents, the return policy states..."
MCP Tool Discovery:
{
"query": "What is the return policy?",
"response": "Returns are accepted within 30 days of purchase. Refunds are processed within 5-7 business days.",
"sources": [
{
"document_id": "doc_123",
"title": "Return Policy",
"content": "Returns accepted within 30 days...",
"similarity_score": 0.89,
"metadata": {
"page": 3,
"section": "Returns"
}
}
],
"processing_time": 1.23,
"token_usage": {
"query_tokens": 8,
"response_tokens": 45,
"total_tokens": 53
}
}| Field | Description |
|---|---|
query | Original user query |
response | Generated answer |
sources | Retrieved chunks with scores |
processing_time | Total latency in seconds |
token_usage | Token consumption breakdown |
{
"query": "Who works at Acme Corp?",
"response": "John Smith and Jane Doe work at Acme Corp.",
"sources": [...],
"graph_results": {
"entities": [
{
"id": "node_1",
"name": "John Smith",
"category": "Person"
},
{
"id": "node_2",
"name": "Acme Corp",
"category": "Organization"
}
],
"relationships": [
{
"source": "node_1",
"target": "node_2",
"type": "WORKS_FOR"
}
]
}
}| Aspect | REST API v1 | MCP Server |
|---|---|---|
| Best For | Traditional apps, web backends | AI agents (Claude, Cursor) |
| Authentication | API key in header | MCP protocol handles auth |
| Query Style | HTTP POST with JSON | Natural language tool calls |
| Response Format | Structured JSON | Structured JSON (MCP standard) |
| Streaming | SSE support | MCP progress tokens |
| Tool Discovery | Manual (read docs) | Automatic (MCP manifest) |
Cause: Invalid or missing API key
Solution:
# Verify API key is correct
curl -X POST "https://api.guidedmind.ai/v1/rag/YOUR_PROJECT_ID/query" \
-H "Authorization: Bearer YOUR_API_KEY" \
...Cause: Too many requests
Solution:
Cause: Server-side issue
Solution:
Cause: Query taking too long
Solution:
Proceed to Step 5: Benchmark & Iterate to measure and improve your RAG system performance.
Proceed to Step 5: AI Graph Editor to test graph search and editing capabilities.