/api/v1. The examples use these shell variables:
1
Create a personal access token
- Sign in to PipesHub.
- Open Workspace settings and select Personal access tokens under Developer settings.
- Select New token, give it a name, and select the scopes you need. For this page, select
kb:read,semantic:writeandconversation:chat. - Copy the token. PipesHub shows it only once.
2
List your knowledge bases
knowledgeBases array. Each entry has an id and a name.A missing or revoked token returns 401. A token without the required scope returns 403.3
Search
limit defaults to 10. Search needs the semantic:write scope (semantic:read covers search history only), and returns results only from content PipesHub has indexed.By default, search also rewrites your query with your AI model. Without a model set up in Workspace → AI models, it returns 500. Add "rewriteQuery": false to the body to search with your exact text and skip the model.To get ranked passages for your own RAG pipeline instead, use the Retrieval API.4
Ask a question
Chat answers stream as server-sent events. The first event carries the new conversation’s ID:To get the whole answer in one response instead, send the same body without
chatMode is required on this endpoint and must be internal_search, web_search or agent:chatMode to POST /api/v1/conversations/create.Chat needs the conversation:chat scope and an AI model set up in Workspace → AI models. Without a model, /conversations/create returns 424, and the stream sends the conversation_created event and then a RUN_ERROR event with "code": "llm_initialization_failed".Use an SDK
PipesHub has SDKs for Python, TypeScript and Go. Pass the same token and set the server URL to$PIPESHUB_URL/api/v1.
- Python
- TypeScript
- Go
Explore the full API
Every instance serves an interactive API reference at$PIPESHUB_URL/api/v1/docs. The OpenAPI spec is the OpenAPI file on GitHub. See API Reference for an overview by area.
Next steps
OAuth 2.0
Let other people authorize your app, or use the device flow for a CLI.
MCP Server
Connect Claude, Cursor and other AI clients without writing code.