{"openapi": "3.0.3", "info": {"title": "Proprioceptive AI \u2014 Lens-Swarm API", "version": "1.8.8S-candidate", "description": "Small-model swarm with receipts: every delivered verdict is hash-chained into an append-only ledger anyone can verify without a key. Verdict + receipt out; mechanism, fitted values and internal states never out. The live registry (GET /v1/swarm/models) is the source of truth for model rows and the running edge version.", "contact": {"email": "logan@proprioceptiveai.com"}, "x-terms": {"trial": "free, no card", "lifetime_requests": 5000, "daily_requests": 1000000000, "window_hours": 336, "signup": "POST /v1/swarm/signup {email}"}}, "servers": [{"url": "https://api.proprioceptiveai.com"}], "security": [], "components": {"securitySchemes": {"ApiKeyHeader": {"type": "apiKey", "in": "header", "name": "X-API-Key"}}}, "paths": {"/v1/swarm/signup": {"post": {"operationId": "post_v1_swarm_signup", "summary": "Create an account; the key is returned exactly once (free, no card)", "responses": {"201": {"description": "account created; api_key returned once"}, "400": {"description": "malformed input \u2014 refused BEFORE any charge (zero-charge law: costs nothing)"}, "429": {"description": "too many NEW signups from this source network (default 40 per hour, env-tunable via SWARM_SIGNUP_MAX) \u2014 the response carries a Retry-After header (seconds until a slot frees); nothing is created or charged"}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"email": {"type": "string", "description": "account email"}}, "required": ["email"]}}}}}}, "/v1/swarm/answer": {"post": {"operationId": "post_v1_swarm_answer", "summary": "Multiple-choice swarm verdict (choices REQUIRED \u2014 this API is multiple-choice-only)", "responses": {"200": {"description": "edge JSON envelope (never a foreign shape)"}, "400": {"description": "malformed input \u2014 refused BEFORE any charge (zero-charge law: costs nothing)"}, "401": {"description": "missing X-API-Key"}, "403": {"description": "unknown key / expired trial / switch off"}, "429": {"description": "cap reached \u2014 nothing consumed"}}, "security": [{"ApiKeyHeader": []}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"question": {"type": "string", "description": "the question stem"}, "choices": {"type": "array", "items": {"type": "string"}, "minItems": 2, "maxItems": 12, "description": "REQUIRED. This API is MULTIPLE-CHOICE-ONLY: a question without 2-12 answer choices is refused 400 before any charge; free-form answering is not offered"}, "k": {"type": "integer", "description": "deliberation rounds 1-8 (default 5)"}, "n_shuffle": {"type": "integer", "description": "shuffle ballots per round 1-3 (default 3)"}, "model": {"description": "board model id from GET /v1/swarm/models"}}, "required": ["question", "choices"]}}}}, "x-multiple-choice-only": true, "x-charge": "1 per delivered ANSWER; a served abstention is refunded at ZERO net (you never pay for a shrug); malformed 400 costs zero"}}, "/v1/swarm/select": {"post": {"operationId": "post_v1_swarm_select", "summary": "Certified selection read from submitted text", "responses": {"200": {"description": "edge JSON envelope (never a foreign shape)"}, "400": {"description": "malformed input \u2014 refused BEFORE any charge (zero-charge law: costs nothing)"}, "401": {"description": "missing X-API-Key"}, "403": {"description": "unknown key / expired trial / switch off"}, "429": {"description": "cap reached \u2014 nothing consumed"}}, "security": [{"ApiKeyHeader": []}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"question": {"type": "string", "description": "question text, 5-2000 chars"}, "choices": {"type": "array", "items": {"type": "string"}, "minItems": 2, "maxItems": 12, "description": "REQUIRED \u2014 multiple-choice-only"}, "answer": {"description": "int index or exact choice text"}}, "required": ["question", "choices", "answer"]}}}}, "x-multiple-choice-only": true}}, "/v1/swarm/hook": {"post": {"operationId": "post_v1_swarm_hook", "summary": "Certified-state gate verdict for a captured state vector", "responses": {"200": {"description": "edge JSON envelope (never a foreign shape)"}, "400": {"description": "malformed input \u2014 refused BEFORE any charge (zero-charge law: costs nothing)"}, "401": {"description": "missing X-API-Key"}, "403": {"description": "unknown key / expired trial / switch off"}, "429": {"description": "cap reached \u2014 nothing consumed"}}, "security": [{"ApiKeyHeader": []}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"model_family": {"type": "string", "description": "certified family slug or public model id"}, "state": {"type": "array", "items": {"type": "number"}, "minItems": 16, "maxItems": 16, "description": "the captured state vector per GET /v1/swarm/capture/<family>"}}, "required": ["model_family", "state"]}}}}}}, "/v1/swarm/batch": {"post": {"operationId": "post_v1_swarm_batch", "summary": "Batch of items with per-item charge decisions", "responses": {"200": {"description": "edge JSON envelope (never a foreign shape)"}, "400": {"description": "malformed input \u2014 refused BEFORE any charge (zero-charge law: costs nothing)"}, "401": {"description": "missing X-API-Key"}, "403": {"description": "unknown key / expired trial / switch off"}, "429": {"description": "cap reached \u2014 nothing consumed"}}, "security": [{"ApiKeyHeader": []}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"items": {"type": "array", "items": {"type": "object", "properties": {}}, "description": "per-item objects; invalid items cost zero, charge is per delivered item (frozen consume->refund spine)"}}, "required": ["items"]}}}}}}, "/v1/swarm/judge": {"post": {"operationId": "post_v1_swarm_judge", "summary": "Fleet judge round", "responses": {"200": {"description": "edge JSON envelope (never a foreign shape)"}, "400": {"description": "malformed input \u2014 refused BEFORE any charge (zero-charge law: costs nothing)"}, "401": {"description": "missing X-API-Key"}, "403": {"description": "unknown key / expired trial / switch off"}, "429": {"description": "cap reached \u2014 nothing consumed"}}, "security": [{"ApiKeyHeader": []}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {}}}}}}}, "/v1/swarm/control": {"post": {"operationId": "post_v1_swarm_control", "summary": "Controlled multi-model run with strict-majority verdict", "responses": {"200": {"description": "edge JSON envelope (never a foreign shape)"}, "400": {"description": "malformed input \u2014 refused BEFORE any charge (zero-charge law: costs nothing)"}, "401": {"description": "missing X-API-Key"}, "403": {"description": "unknown key / expired trial / switch off"}, "429": {"description": "cap reached \u2014 nothing consumed"}}, "security": [{"ApiKeyHeader": []}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {}}}}}, "x-charge": "1 per delivered consensus verdict; a served abstention is refunded at zero net; malformed 400 costs zero"}}, "/v1/swarm/agents/register": {"post": {"operationId": "post_v1_swarm_agents_register", "summary": "Register a fleet agent", "responses": {"200": {"description": "edge JSON envelope (never a foreign shape)"}, "400": {"description": "malformed input \u2014 refused BEFORE any charge (zero-charge law: costs nothing)"}, "401": {"description": "missing X-API-Key"}, "403": {"description": "unknown key / expired trial / switch off"}, "429": {"description": "cap reached \u2014 nothing consumed"}}, "security": [{"ApiKeyHeader": []}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {}}}}}}}, "/v1/swarm/agents/gate": {"post": {"operationId": "post_v1_swarm_agents_gate", "summary": "Gate a fleet agent's submitted answer", "responses": {"200": {"description": "edge JSON envelope (never a foreign shape)"}, "400": {"description": "malformed input \u2014 refused BEFORE any charge (zero-charge law: costs nothing)"}, "401": {"description": "missing X-API-Key"}, "403": {"description": "unknown key / expired trial / switch off"}, "429": {"description": "cap reached \u2014 nothing consumed"}}, "security": [{"ApiKeyHeader": []}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {}}}}}}}, "/v1/swarm/agents/remove": {"post": {"operationId": "post_v1_swarm_agents_remove", "summary": "Remove a fleet agent", "responses": {"200": {"description": "edge JSON envelope (never a foreign shape)"}, "400": {"description": "malformed input \u2014 refused BEFORE any charge (zero-charge law: costs nothing)"}, "401": {"description": "missing X-API-Key"}, "403": {"description": "unknown key / expired trial / switch off"}, "429": {"description": "cap reached \u2014 nothing consumed"}}, "security": [{"ApiKeyHeader": []}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {}}}}}}}, "/v1/swarm/models": {"get": {"operationId": "get_v1_swarm_models", "summary": "Live model registry + certified families (source of truth for rows and version)", "responses": {"200": {"description": "edge JSON envelope (never a foreign shape)"}, "400": {"description": "malformed input \u2014 refused BEFORE any charge (zero-charge law: costs nothing)"}, "401": {"description": "missing X-API-Key"}, "403": {"description": "unknown key / expired trial / switch off"}, "429": {"description": "cap reached \u2014 nothing consumed"}}}}, "/v1/swarm/health": {"get": {"operationId": "get_v1_swarm_health", "summary": "Service health (no key)", "responses": {"200": {"description": "edge JSON envelope (never a foreign shape)"}, "400": {"description": "malformed input \u2014 refused BEFORE any charge (zero-charge law: costs nothing)"}, "401": {"description": "missing X-API-Key"}, "403": {"description": "unknown key / expired trial / switch off"}, "429": {"description": "cap reached \u2014 nothing consumed"}}}}, "/v1/swarm/status": {"get": {"operationId": "get_v1_swarm_status", "summary": "Own quota status", "responses": {"200": {"description": "edge JSON envelope (never a foreign shape)"}, "400": {"description": "malformed input \u2014 refused BEFORE any charge (zero-charge law: costs nothing)"}, "401": {"description": "missing X-API-Key"}, "403": {"description": "unknown key / expired trial / switch off"}, "429": {"description": "cap reached \u2014 nothing consumed"}}, "security": [{"ApiKeyHeader": []}]}}, "/v1/swarm/verify/{receipt_id}": {"get": {"operationId": "get_v1_swarm_verify_receipt_id", "summary": "Public receipt verification \u2014 no key needed", "responses": {"200": {"description": "edge JSON envelope (never a foreign shape)"}, "400": {"description": "malformed input \u2014 refused BEFORE any charge (zero-charge law: costs nothing)"}, "401": {"description": "missing X-API-Key"}, "403": {"description": "unknown key / expired trial / switch off"}, "429": {"description": "cap reached \u2014 nothing consumed"}}}}, "/v1/swarm/proof/{receipt_id}": {"get": {"operationId": "get_v1_swarm_proof_receipt_id", "summary": "Owner-gated receipt proof", "responses": {"200": {"description": "edge JSON envelope (never a foreign shape)"}, "400": {"description": "malformed input \u2014 refused BEFORE any charge (zero-charge law: costs nothing)"}, "401": {"description": "missing X-API-Key"}, "403": {"description": "unknown key / expired trial / switch off"}, "429": {"description": "cap reached \u2014 nothing consumed"}}, "security": [{"ApiKeyHeader": []}], "x-annotations": "owner key"}}, "/v1/swarm/export": {"get": {"operationId": "get_v1_swarm_export", "summary": "Owner-gated tamper-evident ledger export bundle", "responses": {"200": {"description": "edge JSON envelope (never a foreign shape)"}, "400": {"description": "malformed input \u2014 refused BEFORE any charge (zero-charge law: costs nothing)"}, "401": {"description": "missing X-API-Key"}, "403": {"description": "unknown key / expired trial / switch off"}, "429": {"description": "cap reached \u2014 nothing consumed"}}, "security": [{"ApiKeyHeader": []}], "x-annotations": "owner key; admin + ?client_id="}}, "/v1/swarm/agents": {"get": {"operationId": "get_v1_swarm_agents", "summary": "Owner-gated fleet list", "responses": {"200": {"description": "edge JSON envelope (never a foreign shape)"}, "400": {"description": "malformed input \u2014 refused BEFORE any charge (zero-charge law: costs nothing)"}, "401": {"description": "missing X-API-Key"}, "403": {"description": "unknown key / expired trial / switch off"}, "429": {"description": "cap reached \u2014 nothing consumed"}}, "security": [{"ApiKeyHeader": []}], "x-annotations": "owner key"}}, "/v1/swarm/account/email": {"get": {"operationId": "get_v1_swarm_account_email", "summary": "Owner-gated account email recovery", "responses": {"200": {"description": "edge JSON envelope (never a foreign shape)"}, "400": {"description": "malformed input \u2014 refused BEFORE any charge (zero-charge law: costs nothing)"}, "401": {"description": "missing X-API-Key"}, "403": {"description": "unknown key / expired trial / switch off"}, "429": {"description": "cap reached \u2014 nothing consumed"}}, "security": [{"ApiKeyHeader": []}], "x-annotations": "owner key"}}, "/v1/report/{model}": {"get": {"operationId": "get_v1_report_model", "summary": "Public report card for a board model", "responses": {"200": {"description": "edge JSON envelope (never a foreign shape)"}, "400": {"description": "malformed input \u2014 refused BEFORE any charge (zero-charge law: costs nothing)"}, "401": {"description": "missing X-API-Key"}, "403": {"description": "unknown key / expired trial / switch off"}, "429": {"description": "cap reached \u2014 nothing consumed"}}, "security": [{"ApiKeyHeader": []}]}}, "/v1/swarm/basis": {"post": {"operationId": "post_v1_swarm_basis", "summary": "Register a capture basis", "responses": {"200": {"description": "edge JSON envelope (never a foreign shape)"}, "400": {"description": "malformed input \u2014 refused BEFORE any charge (zero-charge law: costs nothing)"}, "401": {"description": "missing X-API-Key"}, "403": {"description": "unknown key / expired trial / switch off"}, "429": {"description": "cap reached \u2014 nothing consumed"}}, "security": [{"ApiKeyHeader": []}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {}}}}}, "x-annotations": "owner key; 5/day"}}, "/v1/swarm/bases": {"get": {"operationId": "get_v1_swarm_bases", "summary": "Owner-gated list of own bases", "responses": {"200": {"description": "edge JSON envelope (never a foreign shape)"}, "400": {"description": "malformed input \u2014 refused BEFORE any charge (zero-charge law: costs nothing)"}, "401": {"description": "missing X-API-Key"}, "403": {"description": "unknown key / expired trial / switch off"}, "429": {"description": "cap reached \u2014 nothing consumed"}}, "security": [{"ApiKeyHeader": []}], "x-annotations": "owner key"}}, "/v1/swarm/capture/{family}": {"get": {"operationId": "get_v1_swarm_capture_family", "summary": "Public capture manifest (shape information only)", "responses": {"200": {"description": "edge JSON envelope (never a foreign shape)"}, "400": {"description": "malformed input \u2014 refused BEFORE any charge (zero-charge law: costs nothing)"}, "401": {"description": "missing X-API-Key"}, "403": {"description": "unknown key / expired trial / switch off"}, "429": {"description": "cap reached \u2014 nothing consumed"}}, "x-annotations": "public"}}, "/v1/swarm/score": {"post": {"operationId": "post_v1_swarm_score", "summary": "Score an answer you already have: verdict + confidence class + receipt", "responses": {"200": {"description": "verdict + receipt only (zero-IP surface)", "content": {"application/json": {"schema": {"type": "object", "properties": {"verdict": {"type": "string", "description": "verified | suspicious | unknown"}, "confidence_class": {"type": "string", "description": "clear | low-signal | none"}, "receipt": {"type": "string", "description": "ledger receipt id (16-hex prefix); absent on net-zero refusals"}, "model": {"type": "string", "description": "resolved certified family"}, "evidence": {"type": "string", "description": "verdict-only"}}}}}}, "400": {"description": "malformed input \u2014 refused BEFORE any charge (zero-charge law: costs nothing)"}, "401": {"description": "missing X-API-Key"}, "403": {"description": "unknown key / expired trial / switch off"}, "429": {"description": "cap reached \u2014 nothing consumed"}}, "security": [{"ApiKeyHeader": []}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"model": {"type": "string", "description": "certified family slug or public model id (see GET /v1/swarm/score/families)"}, "question": {"type": "string", "description": "question text exactly as the model saw it (1-4096 chars)"}, "answer": {"type": "string", "description": "the answer to score (1-2048 chars)"}}, "required": ["model", "question", "answer"]}}}}, "x-charge": "1 per delivered verdict (an abstain verdict is delivered); malformed 400 costs zero; capture_unavailable is net-zero refund"}}, "/v1/swarm/score/batch": {"post": {"operationId": "post_v1_swarm_score_batch", "summary": "Score up to 10 answers in one call; one charge decision per delivered item", "responses": {"200": {"description": "edge JSON envelope (never a foreign shape)"}, "400": {"description": "malformed input \u2014 refused BEFORE any charge (zero-charge law: costs nothing)"}, "401": {"description": "missing X-API-Key"}, "403": {"description": "unknown key / expired trial / switch off"}, "429": {"description": "cap reached \u2014 nothing consumed"}}, "security": [{"ApiKeyHeader": []}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"model": {"type": "string", "description": "certified family slug or public model id"}, "items": {"type": "array", "minItems": 1, "maxItems": 10, "items": {"type": "object", "properties": {"question": {"type": "string", "description": "question text"}, "answer": {"type": "string", "description": "answer text"}}, "required": ["question", "answer"]}, "description": "1-10 {question, answer} objects; one charge per DELIVERED item"}}, "required": ["model", "items"]}}}}}}, "/v1/swarm/score/families": {"get": {"operationId": "get_v1_swarm_score_families", "summary": "Certified head capability list for POST /v1/swarm/score", "responses": {"200": {"description": "edge JSON envelope (never a foreign shape)"}, "400": {"description": "malformed input \u2014 refused BEFORE any charge (zero-charge law: costs nothing)"}, "401": {"description": "missing X-API-Key"}, "403": {"description": "unknown key / expired trial / switch off"}, "429": {"description": "cap reached \u2014 nothing consumed"}}, "x-annotations": "public"}}, "/v1/swarm/panel": {"get": {"operationId": "get_v1_swarm_panel", "summary": "Keyed calibration-panel export (3/day/account)", "responses": {"200": {"description": "edge JSON envelope (never a foreign shape)"}, "400": {"description": "malformed input \u2014 refused BEFORE any charge (zero-charge law: costs nothing)"}, "401": {"description": "missing X-API-Key"}, "403": {"description": "unknown key / expired trial / switch off"}, "429": {"description": "cap reached \u2014 nothing consumed"}}, "security": [{"ApiKeyHeader": []}], "x-annotations": "owner key; 3/day"}}, "/v1/swarm/stats": {"get": {"operationId": "get_v1_swarm_stats", "summary": "/v1/swarm/stats", "responses": {"200": {"description": "edge JSON envelope (never a foreign shape)"}, "400": {"description": "malformed input \u2014 refused BEFORE any charge (zero-charge law: costs nothing)"}, "401": {"description": "missing X-API-Key"}, "403": {"description": "unknown key / expired trial / switch off"}, "429": {"description": "cap reached \u2014 nothing consumed"}}, "security": [{"ApiKeyHeader": []}], "x-annotations": "admin; disabled unless provisioned"}}, "/openapi.json": {"get": {"operationId": "get_openapi", "summary": "this spec, generated from the live route table", "responses": {"200": {"description": "OpenAPI 3.0.3 document"}}}}, "/llms.txt": {"get": {"operationId": "get_llms_txt", "summary": "minimal honest plain-language index for LLM agents", "responses": {"200": {"description": "text/plain"}}}}}, "x-error-envelope": {"shape": {"error": "string", "routes": "see x-routes"}, "note": "unknown routes answer with THIS edge envelope \u2014 never a foreign {detail} shape"}, "x-routes": ["POST /v1/swarm/signup", "POST /v1/swarm/answer", "POST /v1/swarm/select", "POST /v1/swarm/hook", "POST /v1/swarm/batch", "POST /v1/swarm/judge", "POST /v1/swarm/control", "POST /v1/swarm/agents/register", "POST /v1/swarm/agents/gate", "POST /v1/swarm/agents/remove", "GET /v1/swarm/models", "GET /v1/swarm/health", "GET /v1/swarm/status", "GET /v1/swarm/verify/<receipt_id>", "GET /v1/swarm/proof/<receipt_id> (owner key)", "GET /v1/swarm/export (owner key; admin + ?client_id=)", "GET /v1/swarm/agents (owner key)", "GET /v1/swarm/account/email (owner key)", "GET /v1/report/<model>", "POST /v1/swarm/basis (owner key; 5/day)", "GET /v1/swarm/bases (owner key)", "GET /v1/swarm/capture/<family> (public)", "POST /v1/swarm/score", "POST /v1/swarm/score/batch", "GET /v1/swarm/score/families (public)", "GET /v1/swarm/panel (owner key; 3/day)", "GET /v1/swarm/stats (admin; disabled unless provisioned)"], "x-billing-law": "validate-before-charge: every malformed request answers 400 with ZERO quota consumed and NO receipt; zero delivery refunds on the frozen consume->refund spine (audit-2, receipt 999)", "x-ip-law": "verdict + receipt out; mechanism, fitted values and internal states NEVER out"}