{"openapi":"3.1.0","info":{"title":"MironDome Gateway API","version":"1.0.0","description":"The DLP scanning and OpenAI-compatible proxy API exposed by a MironDome gateway deployment. See https://mirondome.com/developers for SDKs and the MCP server, and https://mirondome.com/llms.txt for when to use MironDome."},"servers":[{"url":"https://{gateway_host}","variables":{"gateway_host":{"default":"your-ctg-gateway.example.com","description":"Your self-hosted MironDome gateway's host."}}}],"security":[{"AgentId":[]}],"paths":{"/v1/guardrail":{"post":{"summary":"Scan chat messages against active DLP policies","operationId":"scanGuardrail","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanRequest"}}}},"responses":{"200":{"description":"Scan result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanResponse"}}}},"401":{"description":"Missing or unknown x-user-id"}}}},"/v1/chat/completions":{"post":{"summary":"OpenAI-compatible Chat Completions, scanned before/after forwarding","operationId":"chatCompletions","description":"Accepts a standard OpenAI Chat Completions request. Request and response messages are scanned against active DLP policies; a blocking violation short-circuits the call before it reaches the model.","responses":{"200":{"description":"OpenAI-compatible Chat Completions response"},"403":{"description":"Blocked by a DLP policy"}}}},"/v1/completions":{"post":{"summary":"OpenAI-compatible legacy Completions, scanned before/after forwarding","operationId":"completions","responses":{"200":{"description":"OpenAI-compatible Completions response"},"403":{"description":"Blocked by a DLP policy"}}}}},"components":{"securitySchemes":{"AgentId":{"type":"apiKey","in":"header","name":"x-user-id","description":"Your Microsoft Entra Object ID, checked against the tenant's directory."}},"schemas":{"ChatMessage":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string"},"content":{"type":"string"}}},"ScanRequest":{"type":"object","required":["messages"],"properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessage"}},"direction":{"type":"string","enum":["request","response"],"default":"request"}}},"ScanViolation":{"type":"object","properties":{"ruleId":{"type":"string"},"ruleName":{"type":"string"},"policyId":{"type":"string"},"policyName":{"type":"string"},"action":{"type":"string","enum":["block","redact","allow"]},"severity":{"type":"string","enum":["low","warning","high","critical"]}}},"ScanResponse":{"type":"object","properties":{"content":{"type":"string","description":"The (possibly redacted) content."},"violations":{"type":"array","items":{"$ref":"#/components/schemas/ScanViolation"}},"blocked":{"type":"boolean"}}}}}}