{"openapi":"3.1.0","info":{"title":"OmniStrat AI","version":"0.1.0","description":"Multi-provider AI gateway with capability-aware routing, BYOK, answer\ncaching (exact; semantic near-match per organisation, opt-in), code-mode execution, and SSE streaming. Single API for many\nproviders (OpenAI, Anthropic, Google, xAI, Microsoft Azure, Amazon\nBedrock, Cloudflare Workers AI and more).\n","contact":{"name":"OmniStrat Support","url":"https://docs.omnistrat.ai"}},"servers":[{"url":"https://api.petraproof.com"}],"components":{"securitySchemes":{"agentKey":{"type":"http","scheme":"bearer","description":"The agent endpoints (/v1/messages, /v1/responses, /v1/chat/completions, /v1/identities) take the org API key, a member key or a scoped ost_ token as \"Authorization Bearer\" or as x-api-key. The org comes from the credential only; no org header or body field is read."},"bodyCredentials":{"type":"apiKey","in":"header","name":"authorization","description":"Credentials travel in the JSON body as {\"org_id\": \"org_...\", \"api_key\": \"sk_live_...\"} on every /api/ endpoint. OpenAPI has no vocabulary for body-carried credentials, so this scheme is declared against the Authorization header, which the OpenAI-compatible surface (/v1/chat/completions) does accept as \"Bearer sk_live_...\". Use whichever matches the endpoint you are calling; both resolve to the same org."},"passportSession":{"type":"http","scheme":"bearer","description":"A verified Passport session (the admin console), as \"Authorization Bearer <JWT>\", with NO api_key in the body. Accepted by /api/byok, /api/usage and /api/scoped-tokens (and /api/members, /api/org). The org and the role come from the session: the org the signed-in user created (role owner) or the one they are an active member of (that members row's role, never owner). org_id may be omitted; when sent it must be the session's org, else 403 SESSION_ORG_MISMATCH. 403 EMAIL_NOT_VERIFIED / NO_ORG for a session that acts for no org; 503 AUTH_UNAVAILABLE when that cannot be read. A body api_key, when present, authenticates as before."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"doc_url":{"type":"string","format":"uri"},"request_id":{"type":"string"}}}}},"Capability":{"type":"string","enum":["text","vision","audio","function_calling","json_mode"]},"RoutingProfile":{"type":"string","enum":["cost","quality","balanced","latency","race"]},"ToolDef":{"type":"object","required":["type","function"],"properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"parameters":{"type":"object"}}}}},"JsonSchema":{"type":"object","properties":{"type":{"type":"string","enum":["object","array","string","number","integer","boolean",null]},"properties":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonSchema"}},"required":{"type":"array","items":{"type":"string"}},"items":{"$ref":"#/components/schemas/JsonSchema"},"enum":{"type":"array"},"minLength":{"type":"integer"},"maxLength":{"type":"integer"},"minimum":{"type":"number"},"maximum":{"type":"number"}}},"ImpactDimensionCounts":{"type":"object","description":"Aggregate counts for one dimension. counts maps each category (EEO-1 Component 1; intersectional keys are \"<sex>.<race_ethnicity>\") to assessed and selected; every assessed individual is in one category or in unknown_assessed.","required":["counts","unknown_assessed"],"properties":{"counts":{"type":"object","additionalProperties":{"type":"object","required":["assessed","selected"],"properties":{"assessed":{"type":"integer","minimum":0},"selected":{"type":"integer","minimum":0}}}},"unknown_assessed":{"type":"integer","minimum":0}}},"RouteRequest":{"type":"object","required":["prompt","org_id","api_key"],"properties":{"prompt":{"type":"string","maxLength":50000},"org_id":{"type":"string","maxLength":128},"api_key":{"type":"string","maxLength":256},"temperature":{"type":"number","minimum":0,"maximum":2},"system_prompt":{"type":"string","maxLength":8000},"provider":{"type":"string","description":"Explicit intent or any:vision / any:cheap / etc."},"model":{"type":"string","description":"A vendor model id (GET /v1/models) or an omni/* virtual model, including omni/petra and omni/rowdy. An unknown id is 404 model_not_found, never forwarded."},"open_models":{"type":"string","enum":["off","include","only"],"description":"The open-weight toggle (also the x-omnistrat-open-models header; the two must agree). off excludes open-weight rows, only excludes every row not confirmed open-weight, include (default) filters nothing. Applies to a named model only. When the toggle alone leaves nothing eligible the answer is 409 NO_OPEN_MODEL_ELIGIBLE with every row's reasons; the request is never widened."},"session_id":{"type":"string"},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/Capability"}},"routing_profile":{"$ref":"#/components/schemas/RoutingProfile"},"max_cost_usd":{"type":"number","minimum":0},"fan_out":{"type":"integer","minimum":1,"maximum":4},"fallback":{"type":"array","items":{"type":"string"}},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ToolDef"}},"tool_choice":{"description":"auto | none | required | {type:function,function:{name}}"},"response_format":{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"schema":{"$ref":"#/components/schemas/JsonSchema"}}},"redact_pii":{"type":"boolean"},"semantic_cache":{"type":"boolean","description":"The semantic (near-match) answer cache is OFF unless your organisation's owner or admin has enabled it (semantic_cache_enabled on PUT /api/routing/settings; default false). When it is enabled, false opts this request out. true cannot turn it on for an organisation that has not enabled it: the request is served without it and the response says so in x-omnistrat-adjusted (semantic_cache). A setting that cannot be read counts as off. The exact-answer cache is not affected. A semantic hit answers with cache \"semantic\" and its similarity."},"no_store":{"type":"boolean","description":"When true, this call neither reads nor writes the answer cache (exact or semantic) and shares no in-flight result with another request, in either direction. (No inference call, no_store or not, is cached at Cloudflare AI Gateway.) An honoured call answers with no_store true. A non-boolean value is refused with 400 INVALID_NO_STORE."},"study":{"type":"object","description":"A theology study request (docs/STUDY-LIBRARY.md). The sources are checked against the study catalog (GET /api/study/catalog) before any model is called. mark_quotes true asks the router to send the quotation-marking instruction; its tokens are not billed, and with a system prompt of your own it is refused with 400 STUDY_MARK_QUOTES_CONFLICT (your prompt is never edited). The omni CLI and the web terminal send it by default. The response's study.quotes says which quotations were checked or flagged.","required":["sources"],"properties":{"sources":{"type":"array","minItems":1,"maxItems":8,"items":{"type":"string"}},"jurisdiction":{"type":"string","enum":["US","other"]},"purpose":{"type":"string","enum":["study","daily_readings"]},"mark_quotes":{"type":"boolean"}}},"stream":{"type":"boolean"},"moderate_output":{"type":"boolean"},"execute_code":{"type":"boolean","description":"Opt in to Code Mode. Only when true is a tool declaration injected into the prompt and a js/ts code block in the answer run, in an isolated Worker sandbox with no network. Default false - the answer is returned as the model wrote it and nothing is executed. If no isolate is available the answer is returned unchanged and routing.code_exec says why. Never triggers a second provider call. Required when mcp_servers is sent."},"mcp_servers":{"type":"array","items":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri"},"bearer_token":{"type":"string"}}}}}},"TokenUsage":{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"}}},"ToolCallOutput":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"type":"string","description":"JSON-encoded args"}}}}},"RouteResponse":{"type":"object","properties":{"tier":{"type":"integer","description":"1=cache, 2=system, 3=byok, 4=code-mode, 5=tier5-reasoning"},"provider":{"type":"string"},"model":{"type":"string"},"key_source":{"type":"string","enum":["byok","system","cache"]},"cache":{"type":"string","enum":["hit","miss","stale","semantic"]},"result":{"type":"string"},"usage":{"$ref":"#/components/schemas/TokenUsage"},"tool_calls":{"type":"array","items":{"$ref":"#/components/schemas/ToolCallOutput"}},"schema_validated":{"type":"boolean"},"similarity":{"type":"number","description":"Cosine similarity (semantic cache only)"},"cost_usd":{"type":["number","null"],"description":"The call's price on the basis of the key that served it -- the platform price (vendor price plus the platform margin) on OmniStrat's key, the vendor price on your own key (BYOK). null when the price is unknown (an unpriced call); never 0 for unknown. This is a price, not the money taken from your balance -- that is charged_usd."},"cost_estimated":{"type":"boolean","description":"Present and true when cost_usd (and charged_usd) is an estimate -- the provider did not report usage, or the usage could not be priced -- rather than a priced figure."},"charged_usd":{"type":"number","minimum":0,"description":"What this call debited from your prepaid credit. 0 when your own provider key (BYOK) served it (the vendor bills you directly) or a free model did, even though cost_usd states the price. Also present, inside the error envelope, on every refusal that comes after a provider call ran (402/403/503 post-call admission, 451 MODERATION_FLAGGED, Code Mode and MCP tool-loop failures, a failed agent turn), so a 4xx there is never read as free."},"receipt":{"type":["object","null"],"additionalProperties":true,"description":"The decision receipt (receipt_id, entry_hash, verify_url, signed, ...). Verify it at GET /api/decision/verify/{receipt_id}; its id is also in the x-omnistrat-receipt header. null when this call has no receipt, and then receipt_unavailable says why -- never omitted."},"receipt_unavailable":{"$ref":"#/components/schemas/ReceiptUnavailable"}}},"ReceiptUnavailable":{"type":"object","description":"Present, beside receipt null, when a call that was served has no receipt because its decision could not be recorded in the audit chain. Every routed exit mints one otherwise (cache answers and streams included). The answer is still served and billed. Headers say the same with x-omnistrat-receipt-unavailable RECEIPT_UNAVAILABLE in place of x-omnistrat-receipt.","required":["code","reason"],"properties":{"code":{"type":"string","enum":["RECEIPT_UNAVAILABLE"]},"reason":{"type":"string","description":"Plain words, content-free."}}},"AuthenticatedRequest":{"type":"object","description":"Base body for every authenticated endpoint. Operation-specific fields are documented per endpoint and may be sent alongside these.","required":["org_id","api_key"],"additionalProperties":true,"properties":{"org_id":{"type":"string","description":"Organisation id, e.g. org_9f2c."},"api_key":{"type":"string","description":"Org API key or a scoped sub-token."}}}}},"paths":{"/health":{"get":{"summary":"Liveness probe","parameters":[{"in":"query","name":"deep","schema":{"type":"string","enum":["1"]},"description":"When 1, runs dependency probes (KV, Supabase, key presence)."}],"responses":{"200":{"description":"ok or degraded"},"503":{"description":"down"}},"description":"Liveness probe (?deep=1 for dependency checks)","tags":["Service"]}},"/version":{"get":{"summary":"Build version and timestamp","responses":{"200":{"description":"ok"}},"description":"Build version and timestamp","tags":["Service"]}},"/v1/messages":{"post":{"summary":"Anthropic Messages API (Claude Code)","description":"The Anthropic Messages wire format, on the metered /api/route pipeline. Billed from provider-reported usage (cache tokens at their own prices) at the platform price (vendor + 10%) on platform keys; BYOK is not marked up. Every answer carries x-omnistrat-receipt, or x-omnistrat-receipt-unavailable RECEIPT_UNAVAILABLE when its receipt could not be recorded (the answer is still served and billed). Contract and status (checked against Anthropic's documented examples; a live Claude Code session not yet verified) in docs/foundry-terminal/CONTRACT.md.","responses":{"200":{"description":"an Anthropic Message, or an SSE stream when stream is true"},"400":{"description":"invalid_request_error (unknown or refused field, prompt too long)"},"401":{"description":"authentication_error"},"402":{"description":"out of credit or spend limit reached"},"404":{"description":"model_not_found"},"429":{"description":"rate_limit_error, with retry-after"},"529":{"description":"overloaded_error, with retry-after (never switched to another vendor mid-conversation)"}},"tags":["Inference"],"security":[{"agentKey":[]}]}},"/v1/responses":{"post":{"summary":"OpenAI Responses API (Codex), stateless","description":"The OpenAI Responses wire format on the same metered pipeline. Stateless -- store true, previous_response_id, conversation and background are refused 400 by name; replay the conversation in input. Checked against OpenAI's documented examples; a live Codex session not yet verified.","responses":{"200":{"description":"a Response object, or an SSE stream when stream is true"},"400":{"description":"invalid_request_error naming the refused field"},"401":{"description":"invalid credential"},"402":{"description":"out of credit or spend limit reached"},"404":{"description":"model_not_found"}},"tags":["Inference"],"security":[{"agentKey":[]}]}},"/v1/chat/completions":{"post":{"summary":"OpenAI Chat Completions, with tool calls","description":"OpenAI Chat Completions on the structured agent path -- tools, tool calls and tool results are carried through, not flattened. Same metering, receipts and margin as /v1/messages.","responses":{"200":{"description":"a chat.completion, or an SSE stream when stream is true"},"400":{"description":"invalid request"},"401":{"description":"invalid credential"},"402":{"description":"out of credit or spend limit reached"}},"tags":["Inference"],"security":[{"agentKey":[]}]}},"/v1/models":{"get":{"summary":"Model catalogue (OpenAI shape; Anthropic shape with anthropic-version)","description":"Every model id the router accepts, each row marked verified true/false (price checked against the vendor's page), open or closed weights, and the omni/* virtual models with their published billing rule.","responses":{"200":{"description":"list"}},"tags":["Service"]}},"/v1/identities":{"get":{"summary":"Petra and Rowdy availability for the caller","description":"Free and content-free -- no inference, no hold, no charge. Per identity, available, unavailable (identity_disabled or not_deployed, with a reason) or unknown (the operator switch could not be read; never reported as available). The site's Petra and Rowdy chat boxes light up only on available.","responses":{"200":{"description":"{object: \"list\", billed: false, identities: [{identity, model, status, reason, detail, alternative, open_models_default}]}"},"401":{"description":"no or invalid credential"}},"tags":["Inference"],"security":[{"agentKey":[]}]}},"/models":{"get":{"summary":"Provider catalogue","description":"Lists all 12 provider intents with vendor labels, cost rank, category pseudo-providers, supported endpoints, and feature flags.","responses":{"200":{"description":"catalogue"}},"tags":["Service"]}},"/openapi.json":{"get":{"summary":"OpenAPI schema (this document, in JSON)","responses":{"200":{"description":"ok"}},"description":"OpenAPI 3.1 schema summary","tags":["Service"]}},"/api/route":{"post":{"summary":"Main inference endpoint","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RouteRequest"}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RouteResponse"}}}},"400":{"description":"invalid body"},"401":{"description":"auth failed"},"402":{"description":"cost cap exceeded"},"429":{"description":"rate limited or budget exhausted"},"451":{"description":"moderation flagged"},"502":{"description":"model failed"}},"description":"Main inference endpoint","tags":["Inference"],"security":[{"bodyCredentials":[]}]}},"/api/route/stream":{"post":{"summary":"Streaming inference endpoint (SSE)","description":"Returns text/event-stream with chunks data&#58; {\"text\":\"...\",\"done\":false}\\n\\n. The final done event carries receipt (the decision receipt), or receipt null beside receipt_unavailable (see ReceiptUnavailable) when the receipt could not be minted.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RouteRequest"}}}},"responses":{"200":{"description":"SSE stream","content":{"text/event-stream":{"schema":{"type":"string"}}}}},"tags":["Inference"],"security":[{"bodyCredentials":[]}]}},"/api/batch":{"post":{"summary":"Batch inference (up to 50 prompts)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["org_id","api_key","prompts"],"properties":{"org_id":{"type":"string"},"api_key":{"type":"string"},"shared":{"$ref":"#/components/schemas/RouteRequest"},"prompts":{"type":"array","maxItems":50,"items":{"$ref":"#/components/schemas/RouteRequest"}}}}}}},"responses":{"200":{"description":"ordered results array"}},"description":"Batch inference (up to 50 prompts) - sync or webhook-async","tags":["Inference"],"security":[{"bodyCredentials":[]}]}},"/api/byok":{"post":{"summary":"Customer-provided keys","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["op"],"properties":{"op":{"type":"string","enum":["list","upsert","delete","add-to-rotation","check"]},"org_id":{"type":"string","description":"Required with api_key; optional with a Passport session (must be the session's org)."},"api_key":{"type":"string","description":"The org key or a member key. Omit it to authenticate with a Passport session."},"provider":{"description":"Required for every op but list.","type":"string","enum":["openai","claude","gemini","xai","groq","muse","mistral","cohere","perplexity","nvidia-nim","anyscale","hyperbolic","baseten","lepton","replicate","together","inkling"]},"byok_key":{"type":"string","description":"Required for upsert and add-to-rotation"},"store_unchecked":{"type":"boolean","description":"upsert / add-to-rotation: store the key even when the provider could not be asked about it (it is then answered and listed as key_check \"unchecked\", never \"works\"). A key the provider refused is never stored."}}}}}},"responses":{"200":{"description":"ok. op=list answers {ok, complete: true, providers: [{provider, state: \"configured\", masked, key_check}]}, key_check being the last check with the provider: {state: \"checked\", verdict, checked_at, status?, detail, phase} or {state: \"not_checked\", reason: \"never\" | \"unreadable\"}. upsert / add-to-rotation check the key with the provider FIRST (one read-only list-models or account request) and answer key_check \"works\" | \"unverified\" (the provider has no verified check endpoint; no request was made) | \"unchecked\" (store_unchecked). op=check re-checks every stored key for the provider, changes no key, and answers {verdict: \"works\" | \"refused\" | \"unreachable\" | \"unverified\", checked_at, detail, keys: [{slot, verdict, status?, provider_reason?}]}."},"403":{"description":"upsert | delete | add-to-rotation need the admin role (INSUFFICIENT_ROLE; ROLE_UNVERIFIED for a credential with no verified role)."},"404":{"description":"op=check with no key stored for the provider (BYOK_NOT_CONFIGURED)."},"422":{"description":"PROVIDER_KEY_REFUSED: the provider refused the key (provider_status, provider_error_code, provider_reason in its words, the key withheld). Nothing was stored."},"429":{"description":"KEY_CHECK_RATE_LIMITED: the organisation reached the key-check limit (10 a minute, 100 a day). No request was made and nothing was stored. Retry-After."},"503":{"description":"op=list could not read every provider's record: error.code BYOK_LIST_INCOMPLETE, error.complete false, error.unreadable [provider], error.providers with state \"read_failed\" for those. Never reported as \"not registered\". Retry-After. PROVIDER_KEY_UNCHECKED: the provider could not be asked (timeout, network, 5xx, 429 or another status that does not answer), nothing stored; KEY_CHECK_UNAVAILABLE: the key-check limiter could not count; KEY_CHECK_READ_FAILED (op=check): the stored record could not be read."}},"description":"Customer-provided keys: list | upsert | delete | add-to-rotation | check","tags":["Keys & access"],"security":[{"bodyCredentials":[]},{"passportSession":[]}]}},"/api/dsl":{"post":{"summary":"Routing DSL get/set/delete","responses":{"200":{"description":"ok"}},"description":"Routing DSL: get | set | delete","tags":["Governance"],"security":[{"bodyCredentials":[]}]}},"/api/usage":{"post":{"summary":"Per-day usage counters","responses":{"200":{"description":"ok"}},"description":"Per-day usage counters","tags":["Billing"],"security":[{"bodyCredentials":[]},{"passportSession":[]}]}},"/api/whoami":{"post":{"summary":"Authenticated org info","responses":{"200":{"description":"ok"}},"description":"Authenticated org info","tags":["Billing"],"security":[{"bodyCredentials":[]}]}},"/api/estimate":{"post":{"summary":"Pre-flight cost estimate","description":"Returns USD estimate per provider for the given prompt without making a provider call. Takes the credentials POST /api/route takes, through the same resolver - the body api_key, or \"Authorization Bearer ost_...\" (a scoped token whose scope reaches /api/estimate) with no api_key. org_id is required either way and must be the token's own org.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RouteRequest"}}}},"responses":{"200":{"description":"estimate"}},"tags":["Inference"],"security":[{"bodyCredentials":[]}]}},"/admin":{"get":{"summary":"Self-contained admin web UI","description":"HTML SPA served at /admin. Authenticates against /api/whoami using org_id + api_key entered at the login screen. Pure same-origin; no server-side session.","responses":{"200":{"description":"HTML","content":{"text/html":{"schema":{"type":"string"}}}}},"tags":["Service"]}},"/api/audit/search":{"post":{"summary":"Search audit events","description":"Searches the 30-day rolling KV-indexed audit log. Best for dev/debug;\nproduction analytics should query a SIEM via Logpush.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["org_id","api_key"],"properties":{"org_id":{"type":"string"},"api_key":{"type":"string"},"trace_id":{"type":"string"},"request_id":{"type":"string"},"event":{"type":"string"},"provider":{"type":"string"},"status_min":{"type":"integer"},"status_max":{"type":"integer"},"from_unix_sec":{"type":"integer"},"to_unix_sec":{"type":"integer"},"limit":{"type":"integer","minimum":1,"maximum":500}}}}}},"responses":{"200":{"description":"matches"}},"tags":["Governance"],"security":[{"bodyCredentials":[]}]}},"/api/experiments":{"post":{"summary":"A/B experiment management","description":"CRUD + report for A/B experiments. Variants override request fields\n(provider, model, profile, etc.) so the same prompt routes\ndifferently per variant. Optional Workers AI judge scores responses\non a customer-supplied rubric. Report endpoint returns metrics with\n95% confidence intervals.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["org_id","api_key","op"],"properties":{"op":{"type":"string","enum":["list","get","set","delete","conclude","report"]},"org_id":{"type":"string"},"api_key":{"type":"string"},"id":{"type":"string","description":"Required for get/delete/conclude/report"},"experiment":{"type":"object","description":"Required for set op","required":["id","variants"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","active","paused","concluded"]},"traffic_pct":{"type":"number","minimum":0,"maximum":100},"sticky_by":{"type":"string","enum":["session_id","request_id"]},"variants":{"type":"array","minItems":2,"maxItems":8,"items":{"type":"object","required":["name","split"],"properties":{"name":{"type":"string"},"split":{"type":"number","minimum":0.01,"maximum":100},"overrides":{"type":"object","properties":{"provider":{"type":"string"},"model":{"type":"string"},"routing_profile":{"type":"string"},"temperature":{"type":"number"},"system_prompt":{"type":"string"},"fallback":{"type":"array","items":{"type":"string"}}}}}}},"scoring":{"type":"object","properties":{"rubric":{"type":"string","description":"Judge prompt that returns a single integer 0-10"},"sample_rate":{"type":"number","minimum":0,"maximum":1},"model":{"type":"string","description":"Workers AI judge model"}}}}}}}}}},"responses":{"200":{"description":"ok"},"400":{"description":"invalid experiment config"},"404":{"description":"experiment not found"}},"tags":["Governance"],"security":[{"bodyCredentials":[]}]}},"/api/flags":{"get":{"summary":"Evaluate a feature flag (Flagship-compatible, Agents Week 2026)","parameters":[{"name":"app","in":"query","required":false,"schema":{"type":"string"},"description":"App namespace. Defaults to 'default'."},{"name":"key","in":"query","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["boolean","string","number","object"]}},{"name":"default","in":"query","required":false,"schema":{"type":"string"},"description":"Default value (coerced per `type`)."},{"name":"ctx","in":"query","required":false,"schema":{"type":"string"},"description":"JSON-encoded evaluation context."}],"responses":{"200":{"description":"ok"}},"description":"OpenFeature compatible feature flags backed by KV.","tags":["Governance"],"security":[{"bodyCredentials":[]}]},"post":{"summary":"Manage feature flags (upsert | delete | list)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["org_id","api_key","action"],"properties":{"org_id":{"type":"string"},"api_key":{"type":"string"},"action":{"type":"string","enum":["upsert","delete","list"]},"app":{"type":"string"},"key":{"type":"string"},"flag":{"type":"object"}}}}}},"responses":{"200":{"description":"ok"}},"description":"OpenFeature compatible feature flags backed by KV.","tags":["Governance"],"security":[{"bodyCredentials":[]}]}},"/api/memory":{"post":{"summary":"Agent typed memory with 5-channel RRF retrieval (Agents Week 2026)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["org_id","api_key","action"],"properties":{"org_id":{"type":"string"},"api_key":{"type":"string"},"action":{"type":"string","enum":["remember","retrieve","forget"]},"type":{"type":"string","enum":["fact","event","instruction","task"]},"text":{"type":"string"},"key":{"type":"string","description":"Canonical fact-key for supersession."},"importance":{"type":"number","minimum":0,"maximum":1},"query":{"type":"string","description":"Required for retrieve action."},"topK":{"type":"integer","minimum":1,"maximum":100},"types":{"type":"array","items":{"type":"string"}},"id":{"type":"string","description":"Required for forget action."}}}}}},"responses":{"200":{"description":"ok"}},"description":"Typed memory store with 5-channel RRF retrieval (BM25, key, substring, vector, HyDE).","tags":["Agents"],"security":[{"bodyCredentials":[]}]}},"/api/aisearch":{"post":{"summary":"Hybrid BM25 + vector retrieval over RAG collections (Agents Week 2026)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["org_id","api_key","query"],"properties":{"org_id":{"type":"string"},"api_key":{"type":"string"},"query":{"type":"string"},"collection":{"type":"string","description":"Single-instance mode."},"collections":{"type":"array","items":{"type":"string"},"description":"Cross-instance mode."},"topK":{"type":"integer","minimum":1,"maximum":50},"metadataFilter":{"type":"object"},"boosts":{"type":"array"},"vectorizeWeight":{"type":"number","minimum":0,"maximum":1},"bm25Weight":{"type":"number","minimum":0,"maximum":1}}}}}},"responses":{"200":{"description":"ok"}},"description":"Hybrid BM25 + vector retrieval with cross-instance support.","tags":["Retrieval"],"security":[{"bodyCredentials":[]}]}},"/api/artifacts":{"post":{"summary":"Git-shape versioned config storage (Agents Week 2026 - Artifacts)","description":"Operations: init, commit, read, list, fork, log. Stores routing\nDSL, prompt templates, experiments, and agent skills with full\nGit semantics (time-travel reads, branch fork, content-addressed\nSHA-256 blobs).\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["org_id","api_key","action"],"properties":{"org_id":{"type":"string"},"api_key":{"type":"string"},"action":{"type":"string","enum":["init","commit","read","list","fork","log"]},"repo":{"type":"string"},"branch":{"type":"string"},"source":{"type":"string","description":"Source ref for fork."},"path":{"type":"string"},"data":{"type":"string"},"message":{"type":"string"},"ref":{"type":"string","description":"Branch name or commit sha."},"limit":{"type":"integer","minimum":1,"maximum":100}}}}}},"responses":{"200":{"description":"ok"}},"tags":["Retrieval"],"security":[{"bodyCredentials":[]}]}},"/api/email":{"post":{"summary":"Send notification email via Cloudflare Email Service (Agents Week 2026)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["org_id","api_key","to","subject","text"],"properties":{"org_id":{"type":"string"},"api_key":{"type":"string"},"kind":{"type":"string","enum":["raw"],"description":"Optional; plain-text messages only. System notification kinds are sent by the platform itself and are not accepted here."},"to":{"type":"string","description":"An active member of the org, or its contact address, that has a verified OmniStrat account."},"subject":{"type":"string"},"text":{"type":"string","description":"Plain text body. HTML is not accepted; mail is sent from the platform default sender."}}}}}},"responses":{"200":{"description":"ok"},"502":{"description":"email transport unavailable"}},"description":"Notifications via Cloudflare Email Service.","tags":["Notifications"],"security":[{"bodyCredentials":[]}]}},"/api/elicit":{"post":{"summary":"Approval gate for Code Mode / MCP write tools (Agents Week 2026, Agent Lee)","description":"Two-phase approval: agent calls action=create to request approval,\nadmin calls action=decide approved=true to grant a token, then the\noriginal tool call can proceed. Classifies as read / write /\ndestructive automatically.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["org_id","api_key","action"],"properties":{"org_id":{"type":"string"},"api_key":{"type":"string"},"action":{"type":"string","enum":["create","decide","list"]},"agent_id":{"type":"string"},"call":{"type":"object","description":"Required for action=create.","properties":{"tool":{"type":"string"},"method":{"type":"string"},"path":{"type":"string"},"body_summary":{"type":"string"},"args":{"type":"object"}}},"ttlSec":{"type":"integer","minimum":60,"maximum":3600},"token":{"type":"string","description":"Required for action=decide."},"approved":{"type":"boolean","description":"Required for action=decide."}}}}}},"responses":{"200":{"description":"ok"}},"tags":["Agents"],"security":[{"bodyCredentials":[]}]}},"/api/templates":{"post":{"summary":"Prompt templates","description":"Prompt templates: get | set | list | delete","tags":["Governance"],"responses":{"200":{"description":"ok"},"400":{"description":"invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate limited or budget exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticatedRequest"}}}},"security":[{"bodyCredentials":[]}]}},"/api/embed":{"post":{"summary":"Standalone embeddings","description":"Standalone embeddings (OpenAI / Workers AI)","tags":["Inference"],"responses":{"200":{"description":"ok"},"400":{"description":"invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate limited or budget exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticatedRequest"}}}},"security":[{"bodyCredentials":[]}]}},"/api/tokenize":{"post":{"summary":"Token count estimate","description":"Token count estimate (no provider call)","tags":["Inference"],"responses":{"200":{"description":"ok"},"400":{"description":"invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate limited or budget exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticatedRequest"}}}},"security":[{"bodyCredentials":[]}]}},"/api/moderate":{"post":{"summary":"Standalone LlamaGuard moderation","description":"Standalone LlamaGuard moderation","tags":["Inference"],"responses":{"200":{"description":"ok"},"400":{"description":"invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate limited or budget exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticatedRequest"}}}},"security":[{"bodyCredentials":[]}]}},"/api/rag":{"post":{"summary":"RAG document store","description":"RAG document store: upsert | query | delete | list","tags":["Retrieval"],"responses":{"200":{"description":"ok"},"400":{"description":"invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate limited or budget exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticatedRequest"}}}},"security":[{"bodyCredentials":[]}]}},"/api/billing/checkout":{"post":{"summary":"Create a Stripe checkout session for plan upgrade","description":"Create a Stripe checkout session for plan upgrade","tags":["Billing"],"responses":{"200":{"description":"ok"},"400":{"description":"invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate limited or budget exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticatedRequest"}}}},"security":[{"bodyCredentials":[]}]}},"/api/billing/webhook":{"post":{"summary":"Stripe webhook receiver","description":"Stripe webhook receiver (HMAC-signed)","tags":["Billing"],"responses":{"200":{"description":"ok"},"400":{"description":"invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate limited or budget exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticatedRequest"}}}},"security":[{"bodyCredentials":[]}]}},"/api/billing/portal":{"post":{"summary":"Stripe Customer Portal session","description":"Stripe Customer Portal session","tags":["Billing"],"responses":{"200":{"description":"ok"},"400":{"description":"invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate limited or budget exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticatedRequest"}}}},"security":[{"bodyCredentials":[]}]}},"/api/billing/credits":{"post":{"summary":"Account credits","description":"Account credits: get | add | refund (admin)","tags":["Billing"],"responses":{"200":{"description":"ok"},"400":{"description":"invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate limited or budget exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticatedRequest"}}}},"security":[{"bodyCredentials":[]}]}},"/api/image":{"post":{"summary":"Text-to-image","description":"Text-to-image (SDXL / DALL-E)","tags":["Media"],"responses":{"200":{"description":"ok"},"400":{"description":"invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate limited or budget exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticatedRequest"}}}},"security":[{"bodyCredentials":[]}]}},"/api/transcribe":{"post":{"summary":"Speech-to-text","description":"Speech-to-text (Whisper)","tags":["Media"],"responses":{"200":{"description":"ok"},"400":{"description":"invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate limited or budget exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticatedRequest"}}}},"security":[{"bodyCredentials":[]}]}},"/api/speak":{"post":{"summary":"Text-to-speech","description":"Text-to-speech (MeloTTS / OpenAI TTS)","tags":["Media"],"responses":{"200":{"description":"ok"},"400":{"description":"invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate limited or budget exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticatedRequest"}}}},"security":[{"bodyCredentials":[]}]}},"/api/mcp/v1":{"post":{"summary":"Native MCP JSON-RPC server","description":"Native MCP JSON-RPC server (initialize, tools/list, tools/call)","tags":["Agents"],"responses":{"200":{"description":"ok"},"400":{"description":"invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate limited or budget exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticatedRequest"}}}},"security":[{"bodyCredentials":[]}]}},"/api/agent":{"post":{"summary":"Managed agent","description":"Managed agent: configure | turn | get | reset (DO-backed memory)","tags":["Agents"],"responses":{"200":{"description":"ok"},"400":{"description":"invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate limited or budget exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticatedRequest"}}}},"security":[{"bodyCredentials":[]}]}},"/api/workflows":{"post":{"summary":"Dynamic workflows","description":"Dynamic workflows: set | get | delete | start | get-run","tags":["Agents"],"responses":{"200":{"description":"ok"},"400":{"description":"invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate limited or budget exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticatedRequest"}}}},"security":[{"bodyCredentials":[]}]}},"/api/scoped-tokens":{"post":{"summary":"Issue / revoke / verify scoped sub-tokens","description":"Issue / list / revoke / revoke-all / verify scoped sub-tokens. op=issue takes scope (inference | agent | admin), ttl_sec (whole seconds; default 7 days, or the scope's maximum when shorter), caps and an optional label (1-64 printable ASCII characters, shown by op=list, never inside the signed token). A ttl_sec above the scope's maximum (24 h for admin, 30 days otherwise) is REFUSED with 400 TTL_TOO_LONG naming max_ttl_sec -- it is never shortened; below 60 s is TTL_TOO_SHORT, a non-integer INVALID_TTL, a bad label INVALID_LABEL. Success answers {ok, token, sub_id, scope, ttl_sec, expires_at, label?}.","tags":["Keys & access"],"responses":{"200":{"description":"ok"},"400":{"description":"invalid body, TTL_TOO_LONG, TTL_TOO_SHORT, INVALID_TTL or INVALID_LABEL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate limited or budget exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticatedRequest"}}}},"security":[{"bodyCredentials":[]},{"passportSession":[]}]}},"/api/code-review":{"post":{"summary":"AI-powered code review","description":"AI-powered code review (security / correctness / performance)","tags":["Agents"],"responses":{"200":{"description":"ok"},"400":{"description":"invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate limited or budget exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticatedRequest"}}}},"security":[{"bodyCredentials":[]}]}},"/api/orders/multi":{"post":{"summary":"Multi-account execution","description":"Multi-account execution: one order to every account the caller owns. Two-phase - preflight refuses the whole request before anything is placed","tags":["Platform"],"responses":{"200":{"description":"ok"},"400":{"description":"invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate limited or budget exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticatedRequest"}}}},"security":[{"bodyCredentials":[]}]}},"/api/atm":{"post":{"summary":"Arm automatic trade management on a position","description":"Arm automatic trade management on a position: stop, target, breakeven and trailing. Requires an explicit acknowledgement that the server holds usable credentials","tags":["Platform"],"responses":{"200":{"description":"ok"},"400":{"description":"invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate limited or budget exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticatedRequest"}}}},"security":[{"bodyCredentials":[]}]}},"/api/level2":{"get":{"summary":"Depth-of-market book for the DOM ladder, from the venue that trades the symbol. ","description":"Depth-of-market book for the DOM ladder, from the venue that trades the symbol. Refuses rather than showing another venue's book","tags":["Platform"],"responses":{"200":{"description":"ok"},"400":{"description":"invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate limited or budget exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bodyCredentials":[]}]}},"/api/scheduling/pages":{"post":{"summary":"Create a public booking page","description":"Create a public booking page: availability windows, slot length, buffer, notice and horizon","tags":["Platform"],"responses":{"200":{"description":"ok"},"400":{"description":"invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate limited or budget exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticatedRequest"}}}},"security":[{"bodyCredentials":[]}]}},"/api/scheduling/bookings":{"get":{"summary":"The host's bookings","description":"The host's bookings","tags":["Platform"],"responses":{"200":{"description":"ok"},"400":{"description":"invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate limited or budget exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bodyCredentials":[]}]}},"/api/book":{"get":{"summary":"PUBLIC booking page. Free slots only - never a busy list, which would publish th","description":"PUBLIC booking page. Free slots only - never a busy list, which would publish the host's working day","tags":["Platform"],"responses":{"200":{"description":"ok"},"400":{"description":"invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate limited or budget exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bodyCredentials":[]}]}},"/api/matchmaking/impact-ratio":{"post":{"summary":"Impact-ratio calculator for a deployer of the talent-matching program","description":"Arithmetic on aggregate counts the deployer supplies, by the selection-rate method of 6 RCNY 5-301 (selection rate per category; impact ratio = category rate / the most selected category's rate; sex, race/ethnicity and intersectional categories; a category under 2% is excluded only with a stated justification). For an owner or admin of an org that is a deployer of the program, for that org only. Nothing is stored and nothing acts on the result; it is not an independent audit. Input that looks like individual records is refused.","tags":["Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["total_assessed"],"properties":{"total_assessed":{"type":"integer","minimum":2},"sex":{"$ref":"#/components/schemas/ImpactDimensionCounts"},"race_ethnicity":{"$ref":"#/components/schemas/ImpactDimensionCounts"},"intersectional":{"$ref":"#/components/schemas/ImpactDimensionCounts"},"exclude_small_categories":{"type":"object","required":["justification"],"properties":{"justification":{"type":"string","minLength":20,"maxLength":1000}}}}}}}},"responses":{"200":{"description":"rates and ratios per category, the excluded categories named, stored false"},"400":{"description":"IMPACT_INPUT_INVALID, ROW_LEVEL_DATA_REFUSED, UNKNOWN_CATEGORY, INCONSISTENT_COUNTS or JUSTIFICATION_REQUIRED; nothing stored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"no Passport session"},"403":{"description":"NO_ORG, or ROLE_REQUIRED (not an owner or admin)"},"404":{"description":"NOT_FOUND (the org is not a deployer, or the body names another org)"},"413":{"description":"BODY_TOO_LARGE"},"503":{"description":"DEPLOYER_UNREADABLE"}},"security":[{"passportSession":[]}]}}},"tags":[{"name":"Agents","description":"Long-running work: managed agents, workflows, memory and the MCP server."},{"name":"Billing","description":"Usage counters, credits and Stripe surfaces."},{"name":"Governance","description":"Audit search, experiments, feature flags and routing policy."},{"name":"Inference","description":"Prompt in, completion out. Routing profile, capability filter and cost cap all apply."},{"name":"Keys & access","description":"Customer-provided provider keys and scoped sub-tokens."},{"name":"Media","description":"Image generation, transcription and speech."},{"name":"Notifications","description":"Outbound email."},{"name":"Platform","description":"Everything else the worker exposes."},{"name":"Retrieval","description":"Search and document-backed context."},{"name":"Service","description":"Unauthenticated: health, version, catalogue and this document."}]}