Spy Search exposes five endpoints for querying the web, streaming LLM completions, generating structured reports, and fetching today’s news. All search and completion endpoints acceptDocumentation 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.
multipart/form-data requests; the news endpoint is a simple GET with a path parameter.
POST /stream_completion/{query}
Streams a chat completion response back to the client as chunked plain text. If thequery string contains the prefix search:, Spy Search automatically performs a DuckDuckGo web search first and injects the results into the LLM prompt before streaming the answer.
Request format: multipart/form-data
Response format: text/plain (streaming)
Path Parameters
The search or chat query. Prefix with
search: to trigger a DuckDuckGo web
search before generating the completion.Examples: "What is quantum computing?" or "search: latest AI news"Form Parameters
A JSON-serialised array of
Message objects representing the conversation
history. The final element is treated as the current user turn.One or more file attachments (optional). Accepted as a multipart file upload.
Optional API key override. When provided, this key is forwarded to the
underlying LLM provider instead of the key configured in the server
environment.
Response
Returns atext/plain streaming response. Chunks are yielded as they are produced by the model. Each chunk is a raw text fragment — clients should concatenate them to reconstruct the full response.
Example
POST /stream_completion_academic/{query}
Streams a chat completion that is automatically grounded in arXiv research papers. The endpoint prependssite:arxiv.org to the query before performing the DuckDuckGo search, so results are filtered to academic preprints and published papers indexed on arXiv.
Request format: multipart/form-data
Response format: text/plain (streaming)
Path Parameters
The academic topic or research question. The endpoint automatically constructs
the search query
site:arxiv.org {query} — you do not need to add the site
prefix yourself.Form Parameters
A JSON-serialised array of
Message objects representing the conversation
history.One or more file attachments (optional).
Optional API key override forwarded to the LLM provider.
Response
Returns atext/plain streaming response grounded in arXiv search results.
Example
POST /quick/{query}
Non-streaming search and LLM completion. Performs a DuckDuckGo search, builds a prompt from the results, calls the configured LLM, and returns the full response as a JSON object. Use this endpoint when you need the complete answer at once rather than a stream. Request format:multipart/form-data
Response format: application/json
Path Parameters
The search and chat query.
Form Parameters
A JSON-serialised array of
Message objects.One or more file attachments (optional).
Optional API key override.
Response
The full LLM-generated answer as a single string.
Details of any uploaded files. Each element contains:
filename(string) — the original filenamesize(integer) — file size in bytes
Echo of the parsed
Message objects that were supplied in the request.Example
POST /report/{query}
Triggers a full multi-agent report generation pipeline. The request passes through a Planner → Searcher → Reporter agent chain: the Planner decomposes the query into sub-tasks, the Searcher gathers evidence from the web, and the Reporter synthesises a structured report. This endpoint is significantly slower than/quick but produces a much more comprehensive result.
Request format: multipart/form-data
Response format: application/json
Because this endpoint orchestrates multiple LLM calls and web searches, it
may take 30–120 seconds to respond depending on query complexity and your LLM
provider’s latency. Consider it a background job rather than an interactive
call.
Path Parameters
The research question or report topic.
Form Parameters
A JSON-serialised array of
Message objects representing the conversation
context.One or more file attachments (optional).
Response
The full multi-agent generated report as a single Markdown-formatted string.
Details of any uploaded files (filename + size).
Echo of the parsed
Message objects supplied in the request.Example
GET /news/{category}
Returns today’s top news headlines for a given category, fetched via DuckDuckGo News. Response format:application/json
Path Parameters
The news category to retrieve. Examples:
technology, finance,
entertainment, sports, world, health.Response
An array of news article objects returned by DuckDuckGo News for the given
category. The exact fields of each item depend on the DuckDuckGo response.