Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/JasonHonKL/spy-search/llms.txt

Use this file to discover all available pages before exploring further.

The Spy Search API is a FastAPI application served on http://localhost:8000 by default. It exposes endpoints for streaming LLM completions, web and academic search, multi-agent report generation, news retrieval, agent configuration, RAG file management, and conversation history.

Base URL

http://localhost:8000

Authentication

No authentication is required in the default configuration. Spy Search is designed as a single-user, self-hosted deployment. An optional api form field exists on streaming and search endpoints to pass an API key override directly to the underlying LLM provider at request time.

Content Types

DirectionFormat
Request body (JSON endpoints)application/json
Request body (upload/streaming endpoints)multipart/form-data
Response (most endpoints)application/json
Response (streaming endpoints)text/plain (chunked transfer encoding)
Response (file download)application/octet-stream

Endpoint Overview

MethodPathDescription
POST/stream_completion/{query}Streaming search + chat completion
POST/stream_completion_academic/{query}Streaming arXiv academic search
POST/quick/{query}Non-streaming quick search
POST/report/{query}Full multi-agent report generation
GET/news/{category}Today’s news by category
GET/get_configGet current agent/model config
POST/agents_selectionUpdate agent/model config
GET/folder_listList RAG folders
POST/create_folderCreate RAG folder
GET/select_folderSet active RAG folder
POST/upload_fileUpload file to RAG folder
POST/delete_fileDelete file from RAG
GET/download_file/{filepath:path}Download file (:path preserves slashes)
GET/get_titlesList saved conversation titles
POST/load_messageLoad conversation by title
POST/delete_messageDelete conversation
POST/append_messageAppend message to conversation

Pydantic Schemas

These schemas are defined in src/api/models/schemas.py and appear as request/response bodies across multiple endpoints.

Message

A single chat message with a role and content string.
{
  "role": "user",
  "content": "What is the speed of light?"
}
FieldTypeDescription
rolestringThe message role — e.g. "user", "assistant", or "system"
contentstringThe text content of the message

AgentsRequest

Used by POST /agents_selection to update the active agent list and LLM settings.
{
  "agents": ["reporter"],
  "provider": "openai",
  "model": "gpt-4o"
}
FieldTypeDescription
agentsstring[]List of agent names to activate
providerstringLLM provider identifier (e.g. "openai", "anthropic")
modelstringModel name to use (e.g. "gpt-4o")

TitleRequest

Identifies a saved conversation by its title.
{
  "title": "My Research Session"
}
FieldTypeDescription
titlestringThe title of the saved conversation

AppendRequest

Appends a single message to an existing conversation.
{
  "title": "My Research Session",
  "message": {
    "role": "assistant",
    "content": "Here is the summary..."
  }
}
FieldTypeDescription
titlestringThe conversation title to append to
messageMessageThe message object to append

FolderCreateRequest

Specifies the path for a new RAG folder.
{
  "filepath": "my_documents"
}
FieldTypeDescription
filepathstringThe folder name/path to create within the RAG directory

FolderContent

Represents a single folder and its file listing, used inside FolderListResponse.
{
  "foldername": "research_papers",
  "contents": ["transformer_survey.pdf", "llm_scaling.pdf"]
}
FieldTypeDescription
foldernamestringThe name of the folder
contentsstring[]List of filenames within the folder

FolderListResponse

Returned by GET /folder_list.
{
  "files": [
    { "foldername": "research_papers", "contents": ["transformer_survey.pdf"] }
  ]
}
FieldTypeDescription
filesFolderContent[]Array of folder objects, each with a name and file list

Interactive Documentation

FastAPI automatically generates interactive API documentation. With Spy Search running locally, visit:
  • Swagger UIhttp://localhost:8000/docs
  • ReDochttp://localhost:8000/redoc
Both UIs allow you to explore all endpoints, inspect schemas, and execute live requests directly from your browser.

Build docs developers (and LLMs) love