Base URL
Health check
GET /health
Check API status. No authentication required.Verification endpoints
POST /verify/natural_language
Main entry point for verifying natural language queries. Routes through the QWED Control Plane with multi-tenancy support. Request:
Response:
The response follows the
VerificationResult schema. For math queries, the top-level status is INCONCLUSIVE because the LLM translation step is not formally verified — see Trust boundary for details.
Previous versions set the
status field to the inner engine result (e.g., VERIFIED). It now returns INCONCLUSIVE when the inner engine returns VERIFIED or CORRECTION_NEEDED, because the natural language pipeline involves a non-deterministic LLM translation step. Use the trust_boundary object to inspect the detailed verification breakdown. For fully deterministic results, use POST /verify/math directly.trust_boundary fields:
POST /verify/math
Updated in v5.1.0:
verify_identity() numerical sampling fallback now returns BLOCKED with is_equivalent: false instead of UNKNOWN. This fail-closed behavior ensures that sampling-only agreement is never mistaken for a verified identity.
Response (equation):
is_symbolic: true. Expressions involving complex numbers include is_complex: true.
Ambiguous expressions: Expressions with implicit multiplication after division (e.g., 1/2(3+1)) are rejected with is_valid: false, result: false, and status: "BLOCKED". The response includes warning: "ambiguous" and a message explaining why. Rewrite the expression with explicit parentheses or a * operator to remove the ambiguity.
log(0), and square root of negative numbers in the real domain return is_valid: false with a descriptive error and message.
Tolerance bounding: When verifying an expression against an expected value with a tolerance parameter, the engine enforces a deterministic upper bound on the tolerance. The maximum allowed tolerance is max(0.01, abs(calculated_value) * 0.01). If the requested tolerance exceeds this bound, the request returns a BLOCKED status. Invalid tolerance values (negative, NaN, Infinity, or non-numeric) are also rejected with BLOCKED.
Response (tolerance exceeded):
POST /verify/logic
Verify logical constraints. Routes through the QWED Control Plane. Request:
Response:
provider_used field indicates which LLM provider handled the translation step. This field is included in both success and error responses, which helps with debugging provider routing issues.
Error response:
POST /verify/code
Check code for security vulnerabilities using AST analysis. Request:
Response:
POST /verify/sql
Validate SQL queries against a provided schema. Request:
Response:
POST /verify/fact
Verify a factual claim against a provided context. Request:
Response:
POST /verify/consensus
New in v4.0.0 · Updated in v5.0.0
Decimal arithmetic internally, which avoids floating-point drift when engines cross-check results.
The fact engine is excluded from automatic engine selection during consensus verification. Fact-based verification requires external context and will return an error if invoked without it, preventing self-referential consensus loops.
Verification modes:
Response:
POST /verify/image
Verify claims about image content. Accepts multipart form data with an image file (max 10 MB). Supported formats: PNG, JPEG, GIF, WebP. Request:
Response:
POST /verify/stats
Verify statistical claims against CSV data. Accepts multipart form data with a CSV file. Statistical code execution requires the secure Docker sandbox. If Docker is unavailable, the endpoint returns HTTP 503. If the verification is blocked by a security policy, it returns HTTP 403. Request:
Response:
Statistical verification requires a running Docker daemon. If Docker is unavailable, the endpoint returns HTTP 503 instead of falling back to in-process execution. See the Stats engine page for details.
POST /verify/process
New in v4.0.1
Response (IRAC mode):
POST /verify/rag
New in v4.0.1
max_drm_rate accepts only string values for symbolic precision. Use fraction notation like "1/10" instead of 0.1.POST /verify/batch
Verify multiple items in a single request. Processes all items concurrently and returns aggregated results. Maximum 100 items per batch. Request:
Response:
Math items: proof vs. simplification
Math items are split into two distinct outcomes so that symbolic transformation is never mistaken for a verified claim:- Equality or proof claims (e.g.,
x**2 + 2*x + 1 = (x+1)**2) take the proof path. Verified identities returnis_valid: truewithmessage: "Identity verified". Non-identities returnis_valid: falsewithmessage: "Not equal". - Non-equality expressions (e.g.,
x + x) are simplified only. They are returned as explicit simplification results, not as valid proofs.
Example response for
"x + x":
GET /verify/batch/
Get the status and results of a batch verification job. Use this to poll results when processing large batches. Response:Agent endpoints
POST /agents/register
Register a new AI agent with QWED for verified agentic workflows. Request:
Agent types:
Response:
POST /agents//verify
Updated in v5.0.0
tool_schema is provided.
Request:
Headers:
- Exfiltration check: Always runs on every agent verification request. If the query payload is flagged, the request is rejected with a
403. - MCP poison check: Runs automatically when
tool_schemais present. If the tool definition is flagged, the request is rejected with a403.
POST /agents//tools/
Submit an agent tool call for risk evaluation before execution. Unknown tools (not on the safe or dangerous operations list) are denied by default, regardless of risk score. See tool approval policy for details. Request:GET /agents//activity
Retrieve the audit log for a specific agent. Provides a full audit trail of all agent actions. Headers:
Response:
Attestation endpoints
GET /attestation/
Get an attestation by ID.POST /attestation/verify
Verify an attestation JWT. Request:Observability endpoints
GET /metrics
Returns global system metrics and per-tenant breakdowns. Requires admin authentication. Provide either a JWT token for an active user with theowner or admin role, or an API key linked to an active owner or admin user.
Headers (one of):
GET /metrics/
Returns metrics scoped to a specific organization. Tenants can only view their own metrics.GET /metrics/prometheus
Returns metrics in Prometheus text format for scraping by monitoring infrastructure. Requires the same admin authentication asGET /metrics.
Headers (one of):
GET /logs
Returns verification logs for the authenticated tenant, ordered by most recent first. Query params:
Response:
Admin endpoints
New in v4.0.0
admin:all API key scope.
GET /admin/compliance/export/csv
Export the full audit trail as a CSV file.GET /admin/compliance/verify/
Cryptographically verify a specific audit log entry using HMAC-SHA256 and hash-chain validation. The response reports three independent checks: payload hash, HMAC signature (compared in constant time), and chain linkage to the prior entry within the same organization. Genesis entries must have anull previous_hash; non-genesis entries must link to a non-empty prior entry hash. Entries with malformed stored result payloads cause verification to fail closed with SecurityError instead of returning "valid": true.
Hash matching accepts either the current canonical payload (which includes raw_llm_output) or the legacy canonical payload, so entries written before that field was covered remain verifiable after the upgrade.
Response:
AuditLogger requires QWED_AUDIT_SECRET_KEY to be set. If the key is missing or persisted chain continuity cannot be loaded, initialization raises SecurityError and verification endpoints fail closed.GET /admin/compliance/report/soc2/
Generate a SOC 2 Type II compliance report for an organization.GET /admin/security/threats/
Returns a real-time threat summary for an organization, including blocked injection attempts and anomalous patterns.POST /admin/keys/rotate
Rotate an API key. Available to admin and member roles. Request:Badge endpoints
All badge endpoints return SVG images (image/svg+xml). You can embed them directly in Markdown or HTML.
GET /badge/verified
Get a verified or failed badge SVG.GET /badge/status/
Get a badge for any verification status (e.g.,VERIFIED, FAILED, CORRECTED, BLOCKED, PENDING, ERROR).