{"openapi":"3.0.3","info":{"title":"Caelara Labs Agent Safety Suite","description":"Zero-scrape guardrails for AI agents: input firewall, output validator, PII redaction, prompt-injection scanning, token compression, JSON repair, schema enforcement, grounding diff, citation extraction and context chunking.","version":"1.0.0","contact":{"email":"ops@caelaralabs.com","url":"https://caelaralabs.com"}},"servers":[{"url":"https://agent.caelaralabs.com"}],"components":{"securitySchemes":{"RapidAPIKey":{"type":"apiKey","in":"header","name":"X-RapidAPI-Proxy-Secret"},"CaelaraKey":{"type":"apiKey","in":"header","name":"X-Caelara-Key"},"x402USDC":{"type":"http","scheme":"bearer","description":"x402 USDC payment on Base network"}}},"paths":{"/health":{"get":{"summary":"Health check","responses":{"200":{"description":"Service is healthy","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/agent-input-firewall":{"post":{"summary":"Scan untrusted input: injection risk + PII redaction + sanitized text + allow/review/block verdict","security":[{"RapidAPIKey":[]},{"CaelaraKey":[]},{"x402USDC":[]}],"parameters":[],"responses":{"200":{"description":"Success (partial:true when upstream unavailable)","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"402":{"description":"Payment Required - x402 USDC on Base","headers":{"X-Payment-Required":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}}},"x-caelara-price-usdc":"0.025","x-caelara-tier":"composite","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"Untrusted input text"},"redact_pii":{"type":"boolean","description":"Redact PII in sanitized output (default true)"}},"required":["text"]}}}}}},"/v1/agent-output-validator":{"post":{"summary":"Validate LLM output: repair JSON, enforce schema, check grounding against a source, extract citations","security":[{"RapidAPIKey":[]},{"CaelaraKey":[]},{"x402USDC":[]}],"parameters":[],"responses":{"200":{"description":"Success (partial:true when upstream unavailable)","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"402":{"description":"Payment Required - x402 USDC on Base","headers":{"X-Payment-Required":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}}},"x-caelara-price-usdc":"0.025","x-caelara-tier":"composite","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"output":{"type":"string","description":"Raw LLM output"},"schema":{"type":"object","description":"JSON Schema subset to enforce"},"source":{"type":"string","description":"Source text for grounding check"}},"required":["output"]}}}}}},"/v1/pii-redactor":{"post":{"summary":"Redact emails, phones, SSNs, cards (Luhn), IPs, API keys and JWTs","security":[{"RapidAPIKey":[]},{"CaelaraKey":[]},{"x402USDC":[]}],"parameters":[],"responses":{"200":{"description":"Success (partial:true when upstream unavailable)","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"402":{"description":"Payment Required - x402 USDC on Base","headers":{"X-Payment-Required":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}}},"x-caelara-price-usdc":"0.005","x-caelara-tier":"atomic","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"Text to redact"}},"required":["text"]}}}}}},"/v1/prompt-injection-scanner":{"post":{"summary":"Score text for prompt-injection patterns","security":[{"RapidAPIKey":[]},{"CaelaraKey":[]},{"x402USDC":[]}],"parameters":[],"responses":{"200":{"description":"Success (partial:true when upstream unavailable)","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"402":{"description":"Payment Required - x402 USDC on Base","headers":{"X-Payment-Required":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}}},"x-caelara-price-usdc":"0.005","x-caelara-tier":"atomic","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"Text to scan"}},"required":["text"]}}}}}},"/v1/token-compressor":{"post":{"summary":"Compress text to a target ratio of its original length","security":[{"RapidAPIKey":[]},{"CaelaraKey":[]},{"x402USDC":[]}],"parameters":[],"responses":{"200":{"description":"Success (partial:true when upstream unavailable)","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"402":{"description":"Payment Required - x402 USDC on Base","headers":{"X-Payment-Required":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}}},"x-caelara-price-usdc":"0.005","x-caelara-tier":"atomic","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"Text to compress"},"ratio":{"type":"number","description":"Target ratio 0.1-0.9 (default 0.5)"}},"required":["text"]}}}}}},"/v1/json-auto-repair":{"post":{"summary":"Repair malformed JSON from LLM output","security":[{"RapidAPIKey":[]},{"CaelaraKey":[]},{"x402USDC":[]}],"parameters":[],"responses":{"200":{"description":"Success (partial:true when upstream unavailable)","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"402":{"description":"Payment Required - x402 USDC on Base","headers":{"X-Payment-Required":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}}},"x-caelara-price-usdc":"0.005","x-caelara-tier":"atomic","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"Malformed JSON text"}},"required":["text"]}}}}}},"/v1/schema-enforcer":{"post":{"summary":"Validate and coerce data to a JSON Schema","security":[{"RapidAPIKey":[]},{"CaelaraKey":[]},{"x402USDC":[]}],"parameters":[],"responses":{"200":{"description":"Success (partial:true when upstream unavailable)","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"402":{"description":"Payment Required - x402 USDC on Base","headers":{"X-Payment-Required":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}}},"x-caelara-price-usdc":"0.005","x-caelara-tier":"atomic","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Data to enforce"},"schema":{"type":"object","description":"JSON Schema subset"}},"required":["data","schema"]}}}}}},"/v1/hallucination-diff":{"post":{"summary":"Flag answer sentences unsupported by the source text","security":[{"RapidAPIKey":[]},{"CaelaraKey":[]},{"x402USDC":[]}],"parameters":[],"responses":{"200":{"description":"Success (partial:true when upstream unavailable)","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"402":{"description":"Payment Required - x402 USDC on Base","headers":{"X-Payment-Required":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}}},"x-caelara-price-usdc":"0.005","x-caelara-tier":"atomic","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string","description":"Source / ground-truth text"},"answer":{"type":"string","description":"Model answer to check"}},"required":["source","answer"]}}}}}},"/v1/citation-extractor":{"post":{"summary":"Extract URLs, DOIs, arXiv ids and author-year citations","security":[{"RapidAPIKey":[]},{"CaelaraKey":[]},{"x402USDC":[]}],"parameters":[],"responses":{"200":{"description":"Success (partial:true when upstream unavailable)","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"402":{"description":"Payment Required - x402 USDC on Base","headers":{"X-Payment-Required":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}}},"x-caelara-price-usdc":"0.005","x-caelara-tier":"atomic","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"Text containing citations"}},"required":["text"]}}}}}},"/v1/context-chunker":{"post":{"summary":"Split text into token-bounded overlapping chunks","security":[{"RapidAPIKey":[]},{"CaelaraKey":[]},{"x402USDC":[]}],"parameters":[],"responses":{"200":{"description":"Success (partial:true when upstream unavailable)","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"402":{"description":"Payment Required - x402 USDC on Base","headers":{"X-Payment-Required":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}}},"x-caelara-price-usdc":"0.005","x-caelara-tier":"atomic","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"Text to chunk"},"max_tokens":{"type":"integer","description":"Max tokens per chunk (default 500)"},"overlap":{"type":"integer","description":"Overlap tokens (default 50)"}},"required":["text"]}}}}}}}}