Logo IconGuided Mind
v2.4Sign In
RAG Wizard

Step 6 — API Setup & Endpoints

Get your API key and configure REST API, Python SDK, or MCP integration.

The final step generates your API key and provides three integration interfaces: REST API, Python SDK, and MCP Protocol.

Your API Key

After completing the wizard, you'll receive an API key that starts with rk_. This key authenticates all requests to your RAG project. Think of it as the password for your RAG endpoint — keep it secure and never share it publicly.

After completing the wizard, you'll receive an API key that starts with rk_. This key authenticates all requests to your RAG project.

rk_12345678_abcdef1234567890abcdef12

Copy your API key now. You won't see it again in full. You can regenerate it from the dashboard if lost.

Storing Your API Key

Store your API key in environment variables rather than hardcoding it into your application. This keeps your credentials secure and makes it easy to rotate keys without changing code.

# .env file (add to .gitignore)
GUIDEDMIND_API_KEY=rk_your_key_here
# Python - read from environment
import os
api_key = os.environ["GUIDEDMIND_API_KEY"]

REST API

The REST API provides direct HTTP access to your RAG system. It works with any programming language or tool that can make HTTP requests, making it the most flexible integration option.

Direct HTTP access that works with any language or tool.

Available Endpoints

The REST API exposes three core endpoints for searching and managing documents in your RAG project.

EndpointMethodDescription
/rag/searchPOSTSearch your document index
/rag/uploadPOSTUpload a document
/rag/upload-and-processPOSTUpload and process immediately
curl -X POST "https://api.guidedmind.ai/rag/search" \
  -H "X-API-Key: rk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"query": "What is the return policy?"}'

Example: Upload

curl -X POST "https://api.guidedmind.ai/rag/upload" \
  -H "X-API-Key: rk_your_key_here" \
  -F "file=@./document.pdf" \
  -F "project_id=your-project-id"

Python SDK

The Python SDK provides a type-safe client library with async support, automatic retries, and built-in error handling. It's the recommended integration method for Python applications.

Type-safe client with async support and automatic retries.

Installation

pip install guidedmind-rag-sdk-python

Basic Usage

from guidedmind import Client
 
client = Client()  # reads GUIDEDMIND_API_KEY from env
 
# Search
response = client.search(query="What is the return policy?")
for result in response.results:
    print(f"{result.score:.3f}  {result.content[:80]}")
 
# Upload
upload = client.documents.upload(file_path="./document.pdf")
print(f"Uploaded: {upload.document_id}")

MCP Protocol

The Model Context Protocol (MCP) integration allows AI agents and tools to interact with your RAG system as if it were a native tool. This is ideal for integrating with AI assistants, chatbots, and automated workflows.

Model Context Protocol integration for AI agents and tools.

Connection

# Connect via SSE
curl -N "https://api.guidedmind.ai/api/v1/mcp/sse?api_key=rk_your_key_here"

Available Tools

ToolDescription
rag_searchSearch the document index
upload_documentUpload a single document
upload_and_processUpload and process immediately

Example: Search via MCP

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "rag_search",
    "arguments": {
      "query": "What is the return policy?",
      "limit": 5,
      "threshold": 0.7
    }
  }
}

Endpoint Testing

Before deploying your integration, use the built-in testing tools to verify that your endpoints work correctly. The test modals let you send real queries, check authentication, and inspect response formats.

The wizard includes built-in testing tools to verify your endpoints before deploying. Use the test modals to:

  • Send test queries and inspect results
  • Verify authentication works
  • Check response times
  • Validate result quality

Use separate API keys for development, staging, and production environments. Rotate keys regularly for security.