Developers

NeuroStack API for developers.

Embed document Q&A into your product in a few lines of code.

From documents to API in three steps

Get up and running with the NeuroStack API in minutes

1

Create a workspace

Sign up and create your first workspace. Upload documents via the dashboard or API.

2

Upload documents

Use the web interface or POST to /v1/documents to add PDFs and other files.

3

Query via API

Call the /v1/query endpoint with your question and get instant, sourced answers.

Simple, powerful API

Query your documents with a single HTTP request

// JavaScript Example
const response = await fetch('https://api.neurostack.ai/v1/query', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${API_KEY}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    workspace_id: 'ws_abc123',
    question: 'What are the key features of this product?',
    include_sources: true
  })
});

const data = await response.json();
console.log(data.answer);
console.log(data.sources);

Response Structure

Every query returns a structured JSON response with the answer and source citations:

{
  "answer": "The product features include...",
  "sources": [
    {
      "document_id": "doc_xyz789",
      "title": "Product Overview.pdf",
      "page": 3,
      "snippet": "Key features include...",
      "relevance_score": 0.94
    }
  ],
  "query_id": "qry_12345"
}

Powerful API capabilities

Everything you need to build with document intelligence

📄

Document Management

Upload, update, delete, and list documents programmatically. Support for PDFs, DOCX, and more.

🔍

Advanced Querying

Filter by document type, date, metadata. Control response length and citation depth.

👥

Workspace Management

Create and manage workspaces, control permissions, and organize documents at scale.

📊

Usage Analytics

Track query volume, response times, popular questions, and user engagement metrics.

Low Latency

Global CDN and optimized infrastructure deliver sub-second response times worldwide.

🔒

Secure by Default

API keys with scoped permissions, rate limiting, and request validation built in.

Webhooks & Events

Receive real-time notifications when documents are processed

Document Processing Events

Get notified when documents complete processing or encounter errors:

  • document.processed – Document ready for queries
  • document.failed – Processing error occurred
  • document.updated – Document re-processed

Query & Usage Events

Monitor queries and usage in real-time:

  • query.executed – Query completed successfully
  • workspace.limit_reached – Approaching plan limits
  • usage.threshold – Custom usage threshold hit

Official SDKs

Native libraries for your favorite languages

💻

JavaScript / TypeScript

Full TypeScript support with auto-complete and type safety. Works in Node.js and browsers.

npm install @neurostack/sdk

🐍

Python

Pythonic API with async support. Perfect for data pipelines and backend services.

pip install neurostack

⌨️

CLI

Command-line interface for scripting and automation. Manage workspaces and documents from your terminal.

npm install -g neurostack-cli

More languages coming soon: Go, Ruby, PHP, and Java

Ready to start building?

Create a free account and get your API key in seconds.