Kroos Developers
Kroos Developers › APIs

API overview

Hosts, request format, authentication, errors with fix pointers, streaming, rate limits and CORS for every Kroos API.

The APIs#

APIBaseAuthUse it for
Website chatbot APIhttps://api.kroos.ai/api/public/v1Publishable key + allowed originBuilding your own chat UI, voice, handoff
Organization APIhttps://kroos.ai/api/tenantBearer kroos_sk_…Setup and configuration from your backend
Admin APIhttps://kroos.ai/v1Bearer kroos_ak_…Usage, cost, limits, keys, end users
Internal assistant APIhttps://api.kroos.ai/internal/v1Employee sessionYour company's assistant in your own tools
MCPhttps://api.kroos.ai/mcp/tenant/<orgId>Public facts; tools by tokenAI assistants and agents
SCIM 2.0https://kroos.ai/scim/v2Bearer kroos_sk_…Provisioning employees

Requests#

  • Content-Type: application/json for every write. Bodies are limited (256 KB on the AI host; 1 MB on the website host; 8 MB for document uploads).
  • Browser writes to https://kroos.ai/api/* from another origin are refused (403 csrf.origin_mismatch). Call the organization and admin APIs from your server.
  • The AI host accepts only GET, POST and OPTIONS, and only AI routes.

Responses#

Successful responses are JSON with status 200. Each carries a kroos-request-id header; include it when you contact support.

Errors#

json
{
  "error": {
    "code": "policy.restricted_mode",
    "message": "This key is in restricted mode: it only works on the Kroos preview page until a domain is verified and a policy is signed.",
    "fix": { "tab": "setup", "section": "sec-domain", "label": "Verify a domain and sign your policy", "url": "/console#setup/sec-domain" }
  }
}
  • code is stable; branch on it, not on message.
  • fix, when present, points to the console section that resolves the problem. Show it to the person who can act.
StatusTypical codes
400invalid_json, invalid_policy, access.credentials_detected
401auth.required, auth.enduser_token_invalid, auth.pairing_token_invalid
402billing.credits_exhausted
403policy.restricted_mode, auth.origin_not_allowed, csrf.origin_mismatch
404not_found, conversation_not_found
412explorer.access_required, explorer.roua_failing, explorer.metadata_only
421ai.moved (with apiBase)
429Rate limits, abuse.challenge_required (with challenge), budget limits (budget.*)

See Errors & codes for the full list.

Streaming#

Endpoints ending in /stream return Server-Sent Events:

text
event: start
data: {"at":1764547200000}

event: token
data: {"t":"Our opening "}

event: done
data: { ...the same object the JSON endpoint returns... }

An event: error carries { code, message, fix? } instead of done.

jsReading a stream
const res = await fetch("https://api.kroos.ai/api/public/v1/chat/stream", {
  method: "POST", headers: { "content-type": "application/json" },
  body: JSON.stringify({ pk: "kroos_pk_...", message: "Do you deliver?" }),
});
const reader = res.body.getReader(); const dec = new TextDecoder(); let buf = "";
for (;;) {
  const { value, done } = await reader.read(); if (done) break;
  buf += dec.decode(value, { stream: true });
  let i; while ((i = buf.indexOf("\n\n")) >= 0) {
    const chunk = buf.slice(0, i); buf = buf.slice(i + 2);
    const ev = chunk.match(/^event: (.*)$/m)?.[1], data = JSON.parse(chunk.match(/^data: (.*)$/m)?.[1] ?? "null");
    if (ev === "token") process.stdout.write(data.t);
    if (ev === "done") console.log("\nconversation:", data.conversationId);
  }
}

Rate limits#

Limits apply per IP, per visitor, per workspace and per organization tier. Website chatbot responses carry kroos-ratelimit-* headers (details). On 429, wait for the -reset time; don't retry in a tight loop.

CORS#

The website chatbot API answers CORS preflights for your verified domains and allowed origins only. Other APIs don't allow browser cross-origin calls.

Versioning#

Paths are versioned (/api/public/v1, /v1). Fields may be added at any time; existing fields and codes aren't removed or renamed without a new version and notice in the changelog.

Last updated 2026-12-03