API for agents

Have your agent verify before it executes.

When an agent proposes raising prices, cutting spend or signing a contract, Verdika evaluates the action against the alternatives and the evidence, returns a verdict and leaves a record that can be audited.

1 · The agent proposesIt sends the action, the alternatives and the evidence it has.
2 · Verdika evaluatesThe same engine as the memo: ranking, confidence capped by evidence, and the margin over the second option.
3 · Verdict and recordapprove, review or block according to your policy. Every verification lands in a hash-chained log.

Quickstart

Create a key in Account → API for agents (Pro plan) and call POST /v1/verify.

curl -X POST https://verdika.pro/v1/verify \
  -H "Authorization: Bearer vk_TU_CLAVE" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "Subir precios 20% a toda la base de clientes",
    "alternatives": ["Subir solo a clientes nuevos", "Crear un plan superior"],
    "context": "SaaS B2B, 420 clientes, churn mensual 3.1%",
    "evidence": [{"content": "El último aumento del 10% elevó el churn de 2.4% a 3.1%", "source": "CRM 2026"}],
    "policy": {"min_confidence": 0.6, "min_margin": 0.1, "min_evidence_quality": 0.3},
    "agent": {"name": "pricing-agent", "run_id": "run_8841"}
  }'

Response

{
  "verification_id": "aud_3f9c1a7e52b04d16",
  "verdict": "block",
  "reasons": ["a_better_alternative_exists"],
  "proposed_action": {"label": "ACCIÓN PROPUESTA: Subir precios 20% a toda la base", "rank": 3, "score": 0.41, "confidence": 0.62},
  "recommended": {"label": "Subir solo a clientes nuevos", "score": 0.74, "confidence": 0.70},
  "margin": -0.33,
  "confidence_cap": 0.70,
  "evidence_quality": 0.52,
  "key_risks": ["..."],
  "audit": {"id": "aud_3f9c1a7e52b04d16", "entry_hash": "9b1d…", "prev_hash": "44e0…"}
}

How the verdict is decided

The model proposes the ranking. The verdict is computed by a fixed, published rule, not by the model: the same numbers always give the same verdict.

VerdictWhen
approveThe action is the best option and clears all three policy thresholds.
reviewIt is the best, but confidence, lead or evidence quality fall below a threshold; or it is not the best but within the margin; or the engine could not identify it. Ask for a human decision.
blockAnother alternative beats it by more than the minimum margin.

Policy

Three thresholds between 0 and 1, per call: min_confidence (default 0.60), min_margin (0.10) and min_evidence_quality (0.30). Confidence never exceeds the cap the evidence supports: 40% with no evidence, 55%, 70%, and 85% at most.

Audit log

Each entry includes the hash of the previous one: modifying or deleting an entry breaks the chain and verification flags it. We store the action, the verdict and its reasons; for evidence we store only the source and a SHA-256 fingerprint, not the text.

REST reference

Base: https://verdika.pro. Full specification in OpenAPI 3 (openapi.json); agent-readable descriptor at /v1.

MethodPathKeyWhat it does
POST/v1/verifyYesVerify an action before executing it
POST/v1/ingestNoTurn files (CSV, XLSX, JSON) into evidence
GET/v1/auditYesList the log and check the chain
GET/v1/audit/{id}YesOne verification with its follow-ups
POST/v1/audit/{id}/resolutionYesWhat was finally done and who decided
POST/v1/audit/{id}/outcomeYesHow it turned out
POST/mcpYesMCP server (JSON-RPC)

Files as evidence

Send an income statement or an export from your ERP or CRM exactly as the system produces it. Verdika reads the table, detects line items and periods, and turns them into evidence with figures and changes. It uses no AI for this and does not store the file. Formats: CSV, TSV, XLSX, JSON and TXT, up to 2 MB and 5 files per call. You can also pass files straight to /v1/verify.

curl -X POST https://verdika.pro/v1/ingest \
  -H "Content-Type: application/json" \
  -d "{\"files\":[{\"filename\":\"pnl.csv\",\"content_base64\":\"$(base64 -w0 pnl.csv)\"}]}"
{
  "evidence": [
    {"content": "Tabla con 3 partidas y 3 periodos (Ene a Mar).", "source": "pnl.csv"},
    {"content": "Ingresos: 120,000 en Ene → 150,000 en Mar (+25.0%). Serie: Ene: 120,000, Feb: 135,000, Mar: 150,000.", "source": "pnl.csv"}
  ],
  "items": 4,
  "stored": false
}

Signed evidence

Optional. Register an ML-DSA (FIPS 204) public key under Account → Signed evidence and send each item with key_id, signature and signed_at. If a signature does not match, the verification returns block without running the analysis. With require_signed_evidence, unsigned input has confidence capped at 40% and is never approved. max_evidence_age_hours rejects old signatures. A signature proves origin and that the data did not change; it does not prove it is true.

GET /v1/audit/{id}/receipt returns a signed receipt of each record, which you can check with the key at /v1/signing-key.

Connectors

Claude (MCP)

In Claude Code, one command. Any other MCP client with HTTP transport uses the same URL and header.

claude mcp add --transport http verdika https://verdika.pro/mcp \
  --header "Authorization: Bearer vk_TU_CLAVE"

n8n

Use an HTTP Request node, or import this template with the verification and a Switch on the verdict: n8n-verdika-verify.json.

Python

import base64, requests

with open("pnl-2026.xlsx", "rb") as f:
    archivo = {"filename": "pnl-2026.xlsx", "content_base64": base64.b64encode(f.read()).decode()}

r = requests.post(
    "https://verdika.pro/v1/verify",
    headers={"Authorization": "Bearer vk_TU_CLAVE"},
    json={"action": "Recortar 15% el gasto de marketing", "files": [archivo]},
    timeout=120,
)
v = r.json()
if v["verdict"] != "approve":
    raise SystemExit(f"No ejecutar: {v['verdict']} {v['reasons']}")

JavaScript

const r = await fetch("https://verdika.pro/v1/verify", {
  method: "POST",
  headers: { Authorization: "Bearer vk_TU_CLAVE", "Content-Type": "application/json" },
  body: JSON.stringify({ action: "Firmar contrato anual con el proveedor B", alternatives: ["Renovar con el proveedor A"] }),
});
const { verdict, reasons, audit } = await r.json();

Zapier, Make and in-house systems

Any tool that can send an HTTP request with an Authorization header works: it is a POST call with JSON. The OpenAPI specification lets you generate a client.

As an MCP tool

The same service is available over Model Context Protocol at https://verdika.pro/mcp (HTTP, JSON-RPC). Tools: verify_decision, get_audit_record, audit_data_provenance and record_resolution.

{
  "mcpServers": {
    "verdika": {
      "type": "http",
      "url": "https://verdika.pro/mcp",
      "headers": { "Authorization": "Bearer vk_TU_CLAVE" }
    }
  }
}

Limits and scope

Related guides

Have your agent verify before it executes.

Create my key