The Shadow-OS agent, as an API
Premium multi-agent reasoning at a fraction of the usual API cost. One REST endpoint, your API key, JSON in & out. A free monthly tier is included — no credit card required.
Your API keys
Quickstart
Send a POST request to the endpoint below with your API key in the Authorization header.
https://shadow-os-backend.onrender.com/api/v1/agentAuthentication
Every request must include your secret key — as a Bearer token, or via the X-Shadow-API-Key header. Keep it server-side; never expose it in client-side code.
Request body
inputstringrequiredThe prompt / instruction for the agent.session_idstringoptionalReuse the same value across calls to keep conversation context.Response
Endpoints
/api/v1/agentRun the agent on a prompt (chat, reasoning, tools). · 1 quota unit/api/v1/uploadUpload a document (pdf/txt/md/csv/docx) into your knowledge base. · 1 quota unit/api/v1/searchSemantic search over your uploaded documents. · 1 quota unit/api/v1/documentsList the documents in your knowledge base. · free/api/v1/usageYour current quota + lifetime usage statistics. · freeErrors
Errors use standard HTTP status codes and return a JSON body with a machine-readable error and a human-readable detail.
invalid_keyMissing or invalid API key.quota_exceededFree monthly quota reached.rate_limitedToo many requests — retry after a short wait.bad_requestMalformed body, or the 'input' field is missing.Agent Platform API
The pizzeria-style templates are just the easy on-ramp. Under them is a full multi-tenant platform for orgs and developers: configure an agent (persona, knowledge, rules), then drive it with one token that works as a human magic-link, a WhatsApp click-to-chat, and a REST key. Every member gets their own private, persistent memory; knowledge is shared across the org. Strict per-agent isolation, fail-closed.
POST {API}/api/agent/run
Content-Type: application/json
{
"token": "sk-agent-…", // the agent token (manager or member)
"input": "Do you deliver to Florentin?",
"member_key": "user-42", // ← per-PERSON: private memory + history
"session_id": "main" // ← conversation id (multi-conversation orgs)
}GET /api/agent/info?token=….Full, durable history (members are not guests): every member’s conversations are saved server-side and listable —
GET /api/agent/threads?token=&member_key= lists a member’s conversations;GET /api/agent/history?token=&member_key=&thread_id= returns one conversation’s messages. Both are scoped to that member (fail-closed) — no one reads another member’s threads.POST {API}/api/v1/agents
Authorization: Bearer sk-shadow-…
{ "template": "support", "fields": { "business_name": "Acme" },
"config": { "webhook": "https://you.com/hook", "collect_contact": true } }
→ { "agent": {…}, "manager_token": "sk-agent-…" } // run it via /api/agent/runsk-shadow-…):·
POST /api/v1/agents — create · GET /api/v1/agents — list · PATCH /api/v1/agents/:id — persona, rules & full config· define your own end-users with
member_key (each gets private memory + a living profile) · separate chats with session_id·
GET /api/agent/threads · GET /api/agent/history — a user's conversations·
config.webhook — we POST escalation AND outcome events to your server in real time·
config.integrations — connect your own HTTP tools the agent calls mid-chat · config.collect_contact, config.fallback, config.tone, config.require_login, config.memory_mode·
POST /api/agents/:id/knowledge (text) · POST /api/agents/:id/knowledge/file (PDF/txt/md/csv/docx) · GET/DELETE …/knowledge·
POST /api/agents/:id/tokens (mint, limits) · POST /api/agents/:id/share (opaque links) · GET /api/agents/:id/members (with profiles)·
GET /api/agents/:id/appointments · GET /api/agents/:id/analytics (leads · bookings · quotes · resolved · handoffs)·
GET /api/agents/:id/escalations + stale-customer alerts · POST …/:eid/answer (the human-in-the-loop)