Skip to content

Quickstart

From zero to a cited answer. You need an API key from your organization's admin, issued in Renbase Studio under API Keys.

export RENBASE_API=https://api.renbase.ai
export RENBASE_KEY=kb_live_...

1. Upload a document

Send the file with the collection it belongs to. Collections organize your corpus — support, policies, handbook — and you create one simply by naming it.

curl -X POST $RENBASE_API/v1/documents \
  -H "Authorization: Bearer $RENBASE_KEY" \
  -F file=@handbook.pdf \
  -F collection=support

The response is immediate and returns a job:

{ "id": "9f3c…", "status": "pending", "stage": "queued" }

Processing runs in the background, so a large manual doesn't hold your connection open. Poll the job or watch the live stream:

curl $RENBASE_API/v1/jobs/9f3c… -H "Authorization: Bearer $RENBASE_KEY"

When status reaches done, the document is searchable. PDF, DOCX, PPTX, XLSX, HTML, Markdown and plain text are supported.

2. Ask a question

curl -N -X POST $RENBASE_API/v1/ask \
  -H "Authorization: Bearer $RENBASE_KEY" \
  -H 'content-type: application/json' \
  -d '{"query": "what is the return window?", "collection": "support"}'

The answer streams back over Server-Sent Events: first the sources it will use, then the text token by token, then a final event with the citations resolved.

event: sources
data: {"sources": [{"n": 1, "title": "handbook.pdf", "excerpt": "…"}]}

event: token
data: {"text": "Returns are accepted within 30 days"}

event: done
data: {"citations": [{"n": 1, "document_id": "…", "chunk_id": "…"}], "abstained": false}

Every [1] in the text points at an entry in citations. If the corpus can't support an answer, abstained comes back true and the text explains why — that is a correct outcome, not an error.

3. Define a term your team owns

Documents cover what's written down. Definitions cover what your organization has decided. Adding one takes a single call from an admin:

curl -X POST $RENBASE_API/v1/context \
  -H "Authorization: Bearer $ADMIN_TOKEN" \
  -H 'content-type: application/json' \
  -d '{"kind": "metric",
       "name": "active customer",
       "aliases": ["active account"],
       "body": "An account with at least one paid seat and a sign-in in the last 90 days.",
       "approve": true}'

From now on, any question mentioning "active customer" resolves to this definition — exactly, not by similarity — and answers cite it with its version and approver. See Business definitions.

4. Connect an agent

Your assistants can query the same corpus over MCP:

claude mcp add --transport http renbase https://api.renbase.ai/mcp \
  --header "Authorization: Bearer $RENBASE_KEY"

See AI agents (MCP) for the available tools.

Doing it without code

Everything above is also available in Renbase Studio, the web workspace: upload documents by dragging them in, ask questions with live citations, review and approve definitions, invite members and issue keys. Most teams use the workspace for governance and the API for integration.