Chat completions
Send messages and get an answer, with the model and temperature you choose.
AI
Chat, embeddings, retrieval and natural language to SQL in the same SDK as your database, with vectors stored in your own PostgreSQL.
What’s included
Send messages and get an answer, with the model and temperature you choose.
Read tokens as they arrive, and cancel the stream with an AbortSignal.
Responses report input, output and reasoning tokens, and a finish reason that shows when an answer was cut short.
Turn text into vectors and store them next to your data.
Ingest content, then ask questions and get answers with their sources.
List, re-index and delete the corpora your project has built.
Find content by meaning, with a result count and a similarity threshold.
Ask a question in plain words. The server reads your real schema and caps the rows the SQL returns.
Embeddings live in your project’s PostgreSQL, which ships with pgvector.
How it works
Send your content to a namespace with ragIngest.
Aurabase turns it into vectors stored in your database.
Call rag or semanticSearch with a question.
Get the answer with its sources, or stream tokens with chatStream.
REST API
The SDK is a thin layer over these routes. Send your project’s API key with each request.
| Method | Endpoint | Description |
|---|---|---|
| POST | /v1/ai/chat | Get a complete chat answer. |
| POST | /v1/ai/chat/stream | Stream a chat answer as server-sent events. |
| POST | /v1/ai/embed | Create an embedding for a text. |
| POST | /v1/ai/rag/ingest | Add content to a RAG namespace. |
| POST | /v1/ai/rag/query | Answer a question from a namespace, with sources. |
| GET | /v1/ai/rag/namespaces | List RAG namespaces. |
| POST | /v1/ai/rag/{namespace}/reindex | Re-index a namespace after an embedding change. |
| DELETE | /v1/ai/rag/{namespace} | Delete a namespace and its documents. |
| GET | /v1/ai/search | Search a namespace by meaning. |
| POST | /v1/ai/nl2sql | Turn a question into SQL for your database. |
Questions
Ready to add AI?
AI is included in every project. No credit card required.