Knowledge SpacesDeveloper Platform

Build on Knowledge Spaces

Build your product on the governed control layer behind Knowledge Spaces: isolated tenants, scoped retrieval, and audited model calls out of the box. Register with your organization name, connect your model key, and make your first API call in minutes.

your first call
$ curl -X POST \
  -H "Content-Type: application/json" \
  -H "X-API-Key: ks_live_••••••••" \
  -d '{ "session_id": "<conversation UUID>",
        "text": "What should I read first?"
      }' \
  https://spaces.sprinklenet.com/api/bots/$BOT_ID/chat

200 OK
{
  "success": true,
  "text": {
    "content": "Start with the implementation brief..."
  }
}
# 200 means your org key and bot are working.
✓ Workspace on Signup ✓ Organization API Key ✓ Session APIs and Usage Controls ✓ BYOK or Managed Models
multi‑tenant
Tenants as isolated workspaces
free → paid
Limited access, then higher limits
sessions
Conversation continuity
metered
Usage-based, scales with you
From first call to production

Four Steps to Live

Sign up with your organization name, grab the Organization API Key we provision for you, then make your first bot call. No long setup, and no sales call required to start.

1

Create Your Workspace

Register with an organization name and Knowledge Spaces creates your initial workspace.

2

Connect a Model Key

Free access runs on your provider key. Add OpenAI, Anthropic, Gemini, DeepSeek, or another supported model.

3

Get Your Org Key

We create your organization and provision its API Key. Copy it from your console, keep it in your secret store, and regenerate it at any time.

4

Go Live

Move to paid usage when you need higher limits, managed models, or production support.

Quickstart

Talk to a Bot in One Call

Connect a model provider key, generate your Organization API Key, then point it at a bot and get an answer grounded in your content.

POST /api/bots/<bot_id>/chat
SESSION_ID="$(uuidgen)"   # one new UUID per conversation

curl -X POST https://spaces.sprinklenet.com/api/bots/<bot_id>/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: ks_live_••••••••" \
  -d '{ "session_id": "'"$SESSION_ID"'",
        "text": "What is our refund policy?" }'
const sessionId = crypto.randomUUID(); // one per conversation

const res = await fetch(
  "https://spaces.sprinklenet.com/api/bots/<bot_id>/chat",
  {
    method: "POST",
    headers: {
      "X-API-Key": "ks_live_••••••••",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      session_id: sessionId,
      text: "What is our refund policy?",
    }),
  }
);
const data = await res.json();
console.log(data.text.content);
import uuid
import requests

session_id = str(uuid.uuid4())  # one per conversation

res = requests.post(
    "https://spaces.sprinklenet.com/api/bots/<bot_id>/chat",
    headers={"X-API-Key": "ks_live_••••••••"},
    json={"session_id": session_id, "text": "What is our refund policy?"},
)
print(res.json()["text"]["content"])
Multi-Tenant Architecture

One Platform, Many Tenants

Your account starts with an organization workspace. As you grow, managed organizations can separate bots, knowledge spaces, and data by customer, brand, or environment.

Organization keys, rate limits, sessions, and bots are scoped by organization, so one customer can never reach another's data.

Your platform · principal org
Tenant A
Tenant B
Tenant C
managed organizations, isolated data
end users end users end users
What you get

Platform Capabilities

Everything you need to run AI knowledge agents for many tenants in production.

Tenant Isolation

Organizations and managed child organizations keep each customer's data, bots, and spaces isolated.

Organization API Key

One hashed organization key for bot chat and session APIs. Regenerate it in Account Settings when access needs to rotate.

Session APIs

Create, continue, inspect, update, end, and delete conversation sessions through the public API.

Usage Controls

Track answer usage by organization and bot. Plans scale from free BYOK to managed model access.

Your Models or Ours

Bring your own OpenAI, Anthropic, Gemini, DeepSeek, or AWS-connected model access, or run on managed models.

Governance on Every Call

Every call is tenant-scoped, retrieval-bounded, and logged. It is the same control layer documented in our security white paper.

What you can build

Knowledge Agents for Any Audience

Ground answers in your own content and serve a different assistant to each customer, team, or product.

Customer Support Agents

Answer from your help center, docs, and policies, with one isolated workspace per customer.

Internal Knowledge Assistants

Answer from runbooks, wikis, and handbooks, with each team's assistant scoped to its own Spaces.

Product and Docs Q&A

Embed an assistant grounded in your documentation, in your app or your site.

Recipes

Copy, Paste, Ship

Two end-to-end walkthroughs, checked against the OpenAPI spec. Each one goes from zero to a working call, with the response you should see and the fix for the most common failure.

1

Your First Governed Chat Call in Five Minutes

Register, generate your Organization API Key in the console, and get a bot answer with your organization's governance (tenant isolation, logged calls) applied automatically.

1. Register and Generate Your Key

Sign up at spaces.sprinklenet.com/register with your organization name to create your workspace, then open Account Settings in the console, find Organization API Key, and select Regenerate Key (or Generate API Key if no key is set) to view your key. The full key is shown only once, so store it in a secret manager now. Regenerating replaces the previous key immediately.

shell
export KS_API_KEY="ks_live_your_key_here"
export BOT_ID="665f1a2b3c4d5e6f7a8b9c0d"   # from your bot in the console

2. Call the Bot

One POST with a session_id you control and the user's text.

POST /api/bots/{bot_id}/chat
curl -X POST "https://spaces.sprinklenet.com/api/bots/$BOT_ID/chat" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $KS_API_KEY" \
  -d '{ "session_id": "'"$(uuidgen)"'", "text": "What should I read first?" }'
response
200 OK
{
  "success": true,
  "text": {
    "content": "Start with the implementation brief...",
    "resources": [],
    "isComplete": true
  }
}

That call ran with your org's governance applied: the key is scoped to a single organization, so it can only reach bots and sessions your org owns, and the call is tenant-scoped and logged. The answer is in text.content. Want tokens as they generate? Add "stream": true and the response becomes a text/event-stream of Server-Sent Events.

3. Read the Rate-Limit Headers

Every response carries RateLimit-Limit, RateLimit-Remaining, and RateLimit-Reset, and a 429 carries Retry-After. Read your limits from these headers rather than hard-coding them, and back off on 429. GET /rate-limit/info returns the published policy without authentication.

If it fails: 401 { "message": "Invalid API key" }

The key is missing, truncated, or under the wrong header. Send the full ks_live_... value as X-API-Key (or Authorization: Bearer). A key that was regenerated or revoked also returns 401. Lost keys can't be recovered (only a hash is stored); regenerate in Account Settings.

If it fails: 404 { "message": "Bot not found" }

The bot ID is wrong, or the bot belongs to a different organization than the key. A key only reaches bots its own organization owns, which is the isolation working as designed. Re-copy the bot ID from the console and confirm the key comes from the same organization.

2

Sessions That Persist

Keep one conversation across many calls, then read the transcript and manage the session's lifecycle.

1. Mint an Unguessable Session ID

session_id is caller-controlled: reuse a value to continue a thread, use a new value to start fresh. A predictable id (an email, a row number) risks one user's messages landing in another user's thread inside your product, so mint a UUID per conversation.

node
const sessionId = crypto.randomUUID();
// e.g. "6b3f2c9e-8a41-4d2f-9c57-1e2a7b3d4f80"

2. Chat, Then Chat Again With the Same ID

The second call answers with the earlier turns in context.

POST /api/bots/{bot_id}/chat
const BASE = "https://spaces.sprinklenet.com/api";
const headers = {
  "X-API-Key": process.env.KS_API_KEY,
  "Content-Type": "application/json",
};

await fetch(`${BASE}/bots/${process.env.BOT_ID}/chat`, {
  method: "POST",
  headers,
  body: JSON.stringify({
    session_id: sessionId,
    text: "My name is Dana. Which plan fits a two-person team?",
  }),
});

const followUp = await fetch(`${BASE}/bots/${process.env.BOT_ID}/chat`, {
  method: "POST",
  headers,
  body: JSON.stringify({ session_id: sessionId, text: "What was my name again?" }),
});
console.log(await followUp.json());
// { "success": true, "text": { "content": "You said your name is Dana.", ... } }

3. Retrieve the Transcript

Returns the 10 most recent messages in the session, oldest first. Each message carries role, text, resources, and createdAt; ignore fields you do not use.

GET /api/bots/{bot_id}/chat?session_id=...
const history = await fetch(
  `${BASE}/bots/${process.env.BOT_ID}/chat?session_id=${sessionId}`,
  { headers: { "X-API-Key": process.env.KS_API_KEY } }
);
console.log(await history.json());
response
200 OK
{
  "success": true,
  "messages": [
    { "role": "user", "text": "My name is Dana. Which plan...", "createdAt": "2026-07-08T14:03:12.000Z" },
    { "role": "assistant", "text": "For a two-person team...", "createdAt": "2026-07-08T14:03:14.000Z" }
  ]
}

4. Inspect and Manage the Session

GET /sessions/{session_id} returns the record: session_id, chatbot_id, created_at, last_active_at, message_count, status. Attach your own metadata with PUT /sessions/{session_id}/context, close with POST /sessions/{session_id}/end (transcript retained), or erase entirely with DELETE /sessions/{session_id} for GDPR erasure requests.

PUT /api/sessions/{session_id}/context
curl -X PUT "https://spaces.sprinklenet.com/api/sessions/$SESSION_ID/context" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $KS_API_KEY" \
  -d '{ "end_user_id": "user_42", "custom_context": { "plan": "enterprise" } }'
If it fails: 404 Not Found on GET /sessions/{session_id}

Sessions are created by the first chat call that uses the id; there's no separate "create session" step. Send at least one chat message with that session_id first, and check the id in the URL matches the one you chatted with exactly.

Data sovereignty

Control the Data Plane as You Grow

BYOK is available today. Customer storage and private model endpoints are Enterprise architecture options, not free-tier toggles.

Customer Storage Review

Enterprise deployments can evaluate customer-controlled object storage, region selection, encryption policy, and retention requirements.

Private Model Endpoints

For regulated teams, we can scope OpenAI-compatible private endpoints, customer cloud models, and egress controls as part of Enterprise setup.

Governed Rollout

Storage and private-model controls affect support, billing, security, and incident response, so they are configured through a managed Enterprise workflow.

Pricing

Pay for Answers, Not Seats

Start on your own model key. Move up as you need managed models, team controls, and enterprise governance. Each tier includes everything below it.

Free BYOK

$0 / mo
Bring your own model key. Build in a sandbox without Sprinklenet-funded inference.
  • 500 BYOK answers / month
  • 1 initial workspace
  • Organization API key
  • Community support

Managed Team

$750 / mo
Everything in Builder BYOK, plus Sprinklenet-managed models and team controls. The enterprise-ready tier, no contract required.
  • Managed models, no provider key
  • 7,500 managed answers, then $0.12 each
  • Role-based access and audit logs
  • Longer retention and prepaid balance control
  • Priority email support

Enterprise

From $2,500 / mo
Everything in Managed Team, plus enterprise governance and OEM scale. For platforms, regulated teams, and high-volume deployments.
  • Role-based access, audit logs, and advanced governance; SSO and SCIM on the roadmap
  • Pooled child-org and OEM deployments
  • Own cloud or customer-controlled storage review
  • Private model endpoint architecture review

An AI Answer is one grounded reply to your user. Failed or ungrounded replies are never billed. Managed-model usage requires a positive prepaid balance after the included pool is used.

Questions before you build? Talk to an engineer.

Start Building on Knowledge Spaces

Create your workspace, generate your Organization API Key, and make your first call today.

Start Building →