Skip to content

Add knowledge to your app

Add private knowledge to your AI in 3 API calls — no vector database setup, no embedding configuration.

  1. Ingest a document

    From a URL:

    Terminal window
    curl -X POST https://app.neureus.ai/rag/ingest \
    -H "Authorization: Bearer nru_your_key" \
    -H "Content-Type: application/json" \
    -d '{"url": "https://example.com/your-document.pdf"}'

    Or raw text:

    Terminal window
    curl -X POST https://app.neureus.ai/rag/ingest \
    -H "Authorization: Bearer nru_your_key" \
    -H "Content-Type: application/json" \
    -d '{"content": "Our refund policy: customers may return items within 30 days...", "title": "Refund Policy"}'

    Response:

    { "documentId": "doc_abc123", "chunks": 12, "status": "indexed" }
  2. Query semantically

    Terminal window
    curl -X POST https://app.neureus.ai/rag/query \
    -H "Authorization: Bearer nru_your_key" \
    -H "Content-Type: application/json" \
    -d '{"query": "What is the return window?", "topK": 3}'

    Response includes matched chunks and their source documents:

    {
    "results": [
    {
    "content": "customers may return items within 30 days...",
    "documentId": "doc_abc123",
    "score": 0.94
    }
    ]
    }
  3. List and delete documents

    Terminal window
    # List all ingested documents
    curl https://app.neureus.ai/rag/documents \
    -H "Authorization: Bearer nru_your_key"
    # Delete a document and all its chunks
    curl -X DELETE https://app.neureus.ai/rag/documents/doc_abc123 \
    -H "Authorization: Bearer nru_your_key"

Using the SDK

import { Neureus } from '@neureus/sdk';
const client = new Neureus({ apiKey: process.env.NEUREUS_API_KEY! });
// Ingest
const { documentId } = await client.rag.ingest({
content: 'Your document text here...',
title: 'My Document',
});
// Query
const results = await client.rag.query({
query: 'What does it say about returns?',
topK: 5,
});
console.log(results[0].content);

Supported document types

URLs pointing to: PDF, DOCX, HTML, Markdown, plain text. Raw content string accepts any text.