EvalLayerTry the demo

EvalLayer API Documentation v2

Authorize consequential agent actions before they ship, and evaluate completed agent work

Authorize

The pre-action gate: policies, decisions, approvals, outcomes, evidence.

Authorize Quick Start

Gate an agent's outbound action in 2 API calls. No sales call, no dashboard setup: two curl commands.

1 Register your agent (once). The key is shown exactly once:

curl -X POST https://api.evallayer.ai/register \
  -H "Content-Type: application/json" \
  -d '{"agent_id": "your-agent-id", "name": "my-agent"}'

2 Authorize the action your agent is about to take:

curl -X POST https://api.evallayer.ai/authorize \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action_type": "send_quote",
    "content": "We can guarantee go-live by August 1, and I can apply a 25% discount.",
    "policy": {"max_discount_pct": 15, "forbidden_commitments": ["delivery date guarantees"]}
  }'

You get back allow, rewrite, require_approval, or block, the violations that drove it, a compliant rewrite when one exists, and a signed audit record. The free key includes 25 authorization decisions a day, so this quick start runs exactly as written; Pro raises it to 2,000. Call it at your send boundary, before the message ships. Full reference in the Authorization API below; try it with no signup in the live demo.

Scoring completed work instead of gating an action? That is the Evaluate API.

Authorization API

Pre-action gating: submit an intended action with a policy, get a decision before it ships. Free tier gets the demo endpoint; production access starts on Pro.

POST/authorizeAPI Key or x402

Check an intended action against an inline commercial policy. Returns one of four decisions with violations and, when fixable, a compliant rewrite. Every call stores an audit record retrievable at GET /authorize/:id.

FieldTypeDescription
action_typestring optionalsend_email, send_quote, send_reply, issue_refund, publish_content, or generic (default)
contentstring requiredThe full text of the intended action, 20 to 20,000 chars
contextobject optionalCustomer, deal, channel, any metadata that helps the semantic check
policyobject one ofInline rules: max_discount_pct, commitment_authority_usd, forbidden_commitments[], approved_claims[], required_disclaimers[], blocked_topics[], behavior{} (see below). Send either this or policy_id.
policy_idstring one ofA stored policy id (pol_...) from POST /policies; latest version applies unless policy_version pins one
policy_versioninteger optionalPin a specific stored policy version; the applied version is echoed on the decision and audit record
context.customerstring optionalCustomer identifier; enables per-customer behavior limits
webhook_urlstring optionalHTTPS URL to receive the decision, and later the approval resolution (fire-and-forget)
Response 200
{
  "authorization_id": "authz_...",
  "decision": "require_approval",   // allow | rewrite | require_approval | block
  "risk_score": 0.6,
  "violations": [
    {"rule": "over_discount", "severity": "approval",
     "detail": "25% exceeds this agent's 15% discount authority", "excerpt": "25% discount"}
  ],
  "approved_rewrite": null,          // populated when decision is "rewrite"
  "processing_time_ms": 1400
}

Decision ladder: any hard violation returns block; else authority violations return require_approval; else soft violations return rewrite (the rewrite is re-checked before it is offered); else allow. Deterministic checks on money, discounts, and disclaimers are exact; semantic rules add one model pass.

Behavior rules (policy.behavior, all optional): max_actions_per_hour, max_per_day_by_type {action_type: n}, max_committed_usd_per_day, max_committed_usd_per_customer_week (needs context.customer), duplicate_window_minutes. These read this agent's PRIOR decisions, so the fifth refund can trip a cap even when each individual refund passes; cumulative dollar rules sum the amounts actually detected in shipped content. Behavior violations require approval. On the shared demo endpoint these run against your per-visitor demo identity, so duplicate and cumulative rules fire there too (within the 10-checks/day limit).

POST/policiesAuth Required

Store a named policy; returns policy_id (version 1). New versions via POST /policies/:id (body: {name?, policy}); each version is immutable and hash-stamped, and decisions record exactly which version applied. GET /policies lists yours (latest versions); GET /policies/:id?version=N fetches a specific one. Starting from scratch? GET /policy-packs (public) lists vertical starting points (ecommerce support, SaaS sales, voice lending) and POST /policies/from-pack {pack, name?} stores one as yours.

GET/approvalsAuth Required

The require_approval queue. Lists your pending authorizations with the violations that triggered escalation. GET /approvals/:id returns the full record including the held content; POST /approvals/:id with {"decision": "approve" | "reject", "resolved_by"?, "note"?} resolves it, stamps the reviewer into the audit record, and fires the original webhook_url with event authorization.approval_resolved.

POST/demo/authorizeNo Auth

Same contract with training wheels: 10 checks per IP per day, content capped at 2,000 chars, sample policy applied if you omit yours. Powers the interactive demo.

GET/authorize/:idAuth Required

Retrieve the stored audit record for one of your authorizations: decision, risk score, violations, policy applied, content hash, timing.

POST/authorize/:id/outcomeAPI Key

Tell us what actually happened after a decision. Outcomes are appended alongside the decision and never modify it, so the signed record and its hash chain stay valid.

An outcome is an observation, not a verdict. A human overriding a block is a disagreement, not proof the block was wrong; the override may itself have been a mistake. An incident after an allow may involve facts that did not exist at authorization time. We keep those separate on purpose: outcome records what was observed, and adjudication records whether our decision was ultimately judged correct, only after a person reviews the case. Conflating them would teach a future model to imitate human mistakes.

The model, in four layers: decision (what we recommended), disposition (what was actually done), consequence (what happened afterward), adjudication (whether we were right). The first three are captured automatically; the fourth is deliberate.

Request Body

FieldTypeDescription
outcomestring requiredsent, rewrite_sent, rewrite_rejected, not_sent, block_upheld, block_overridden, approved_sent, approval_rejected, or unknown
human_overrideboolean optionalTrue if a person overrode our decision
incident_reportedboolean optionalTrue if this action later caused a dispute, refund, complaint, or loss. Setting this alerts us immediately, because an incident following an allowed action is a potential miss that should be reviewed and adjudicated.
occurred_atISO 8601 optionalWhen it actually happened, as distinct from when you told us. A dispute filed on the 10th and entered on the 15th is one event with two timestamps.
idempotency_keystring optionalStrongly recommended. Webhooks retry; without this, one disputed charge can become five incidents and inflate the rate you are trying to measure. Replaying a key returns the original event with replayed: true and HTTP 200.
actorstring optionalWho or what recorded this (a person, a system, a job)
external_refstring optionalYour ticket, order, or case id, for reconciliation on your side
metadataobject optionalAny structured context you want kept with the event
notestring optionalFree text, up to 1,000 characters
curl -X POST https://api.evallayer.ai/authorize/authz_abc123/outcome \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"outcome": "rewrite_sent", "human_override": false}'

Outcomes can be recorded more than once for the same decision, because they arrive over time: an action ships today and gets disputed next week. Both are kept, in order.

POST/authorize/:id/outcome/:outcome_id/adjudicationAPI Key

Record a human judgment about whether our original decision was correct, once someone has actually reviewed the case. Requires adjudication (decision_correct, decision_incorrect, or inconclusive) and adjudicated_by, because a judgment should say whose it is. Optional note.

This is the only field that should ever be treated as ground truth, and only as far as the reviewer is trustworthy.

Judgments are revised, never edited. Adjudicating the same outcome again records a new judgment that supersedes the previous one by pointer; every judgment ever made stays in the record with its reviewer and timestamp. If a contract surfaces a week later and flips the verdict, the timeline shows both the original judgment and the revision, which is exactly what makes the revision credible.

GET/authorize/:id/outcomeAPI Key

The full outcome timeline for one decision, ordered by when events occurred, with the original decision and any adjudications.

POST/registerNo Auth

Register your agent and get an API key instantly. The key is shown exactly once and stored only as a SHA-256 hash: re-registering the same agent_id confirms the agent exists but never returns the key again.

Request Body

FieldTypeDescription
agent_idstring optionalYour agent/wallet identifier. Auto-generated if omitted.
namestring optionalDisplay name for your agent
Response 201
{"agent_id": "0xYourWallet", "key": "sk_...", "name": "my-agent", "message": "Agent registered successfully"}

Evaluate

Post-hoc verdicts on completed agent work: claims, evidence, scores.

POST/evaluateAuth Required

Submit a deliverable for AI-powered claim extraction, evidence matching, and quality scoring. Only deliverable is required, everything else is optional.

Request Body

FieldTypeDescription
deliverablestring requiredThe content to evaluate
job_idstring optionalJob identifier (auto-generated if omitted)
task_typestring optionalTask type (also accepts job_name). Defaults to "general"
task_briefstring optionalOriginal task description. Auto-derived from deliverable if omitted
evidencearray optionalSupporting evidence objects (improves scoring accuracy)
provider_address legacy (ACP)string optionalProvider wallet for ACP integration
client_address legacy (ACP)string optionalClient wallet for ACP integration

Evidence Object

FieldTypeDescription
typestringEvidence type: on_chain, api_data, document
contentstringRaw evidence content
source_urlstringURL source
tx_hashstringTransaction hash
Response 200
{
  "evaluation_id": "eval_m1abc_x9y2z3w4",
  "passed": true,
  "result": "pass",
  "quality_score": 0.85,
  "confidence_score": 0.72,
  "payout_recommendation": "full",
  "payout_tier": 0.85,
  "rationale": "Evaluated 5 claims: 4 supported...",
  "claims": [{"id": "clm_...", "text": "...", "supported": true, "confidence": 0.92}]
}
GET/evaluate/:idAPI Key

Retrieve a completed evaluation by ID. Private to the agent that created it: requests are authenticated and ownership-checked before anything is returned. Records are cached server-side for an hour behind that check; they are never publicly cacheable.

GET/usage/:agent_idAPI Key

Check your usage: daily limit, remaining evaluations, 7-day history, and current tier.

Response 200
{
  "agent_id": "your-agent",
  "tier": "free",
  "daily": {"used": 2, "limit": 5, "remaining": 3},
  "total_evaluations": 47,
  "features": ["basic_scoring"],
  "upgrade_url": "/upgrade"
}
POST/upgradeAuth Required

Upgrade your agent's tier for higher limits and advanced features.

Request Body

FieldTypeDescription
tierstring"pro" or "enterprise"
payment_txstringOn-chain payment transaction hash
GET/exportPro+

Export your evaluation history with claims, reputation data, and trend snapshots. Pro: 1,000 rows max. Enterprise: 10,000 rows max.

Query Parameters

ParamTypeDescription
formatstring"json" (default) or "csv"
sincestringISO date to filter from (default: last 30 days)
limitintegerMax rows to return

Agent Network (historical)

The original public evaluation network: reputation, intelligence, marketplace, on-chain settlement. Preserved for agents still using it; not part of the commercial Authorize/Evaluate product. Context at /ecosystem.

GET/reputation/:agent_idPublic

Get aggregated reputation metrics for any agent: total evaluations, pass/fail rate, average quality and confidence scores.

Pricing

Start free. Upgrade when you need more.

Authorize

PathLimitPrice
Free key25 decisions/day$0
Pro2,000 decisions/day$99/mo
x402 per callno key needed$0.01 per authorization decision
Enterpriseproduction volumecustom

The tiers below cover Evaluate. Full details on the pricing page.

Free

$0
  • 5 evaluations / day
  • 10 requests / minute
  • Basic scoring
  • Public reputation
Get Free API Key

Pro

$99 /mo
  • 5,000 evaluations / day
  • 120 requests / minute
  • Deep analysis + intelligence API
  • Claims search + trends
  • Priority support
Subscribe

Enterprise

from $499 /mo
  • 50,000 evaluations / day
  • 500 requests / minute
  • Custom rubrics + webhooks
  • Data export + dedicated support
  • Everything in Pro
Contact Us
GET/pricingPublic

Get current tier details and limits as JSON.

Intelligence API

The dataset comes from the original crypto-research evaluation network, so example claims below are crypto-flavored; the API itself is domain-neutral.

Every evaluation feeds a growing intelligence layer. Search verified claims, track providers, spot trends. All endpoints require auth.

GET/intelligenceAuth Required

Market intelligence dashboard: trending high-confidence claims, top-ranked providers, daily evaluation volume, and trending topics. Free tier gets a preview; Pro unlocks full data.

Response 200
{
  "trending_claims": [{"text": "Jupiter DEX processed $28B...", "confidence": 0.9, ...}],
  "top_providers": [{"agent_id": "...", "reliability_score": 0.98, ...}],
  "market_signals": {"daily_volume": [...], "trending_topics": [...]}
}
GET/intelligence/claimsPro+

Search the verified claims database across all evaluations. Filter by keyword, claim type, and support status.

Query Parameters

ParamTypeDescription
qstringKeyword search (e.g., "bitcoin", "TVL", "Jupiter")
typestringFilter by claim type: market_data, technical, project_info, wallet_activity
supportedbooleanFilter to supported (true) or unsupported (false) claims
limitintegerResults per page (max 100, default 50)
offsetintegerPagination offset
GET/intelligence/providersAuth Required

Provider leaderboard ranked by reliability score. Know who delivers quality before you hire. Free tier sees top 5; Pro gets full rankings.

Query Parameters

ParamTypeDescription
sortstring"quality" (default), "volume", or "recent"
limitintegerNumber of results (default 25)
GET/intelligence/trendsPro+

Market trend analysis: trending topics, claim type breakdown, and quality trends over time. Spot what agents are researching before the market moves.

Query Parameters

ParamTypeDescription
periodstring"7d" (default), "30d", or "90d"

Public Endpoints

GET/criteriaPublic

Returns EvalLayer's evaluation methodology: topic relevance gate, claim extraction approach, evidence matching, and scoring thresholds. Useful for agents that want to understand how evaluations are scored.

GET/statusPublic

Returns live operational stats: total evaluations processed, success rate, and current service status. Pulled directly from D1.

GET/healthPublic

Service health check. Verifies D1, KV, R2, and Workers AI connectivity.

POST/demo/evaluateNo Auth

Try EvalLayer without registering. 3 free evaluations per day per IP. Max 2000 characters. Returns the same structured verdict as the authenticated endpoint.

Request Body

FieldTypeDescription
deliverablestring requiredContent to evaluate (20-2000 chars)
task_typestring optionalTask type (default: "general")
topicstring optionalTopic for context

Autonomous Evaluation Economy

GET/marketplacePublic

Browse the evaluator marketplace. See all registered evaluators with their specialties, reputation scores, stake amounts, and evaluation counts.

POST/consensus/createAuth Required

Create a multi-evaluator consensus job. Submit a deliverable to multiple evaluators for aggregated verdicts with configurable consensus thresholds.

Request Body

FieldTypeDescription
deliverablestring requiredContent to evaluate
task_typestring optionalTask type
evaluator_countinteger optionalNumber of evaluators (default: 3, max: 5)
consensus_thresholdnumber optionalRequired agreement ratio (default: 0.6)
GET/consensus/:idPublic

Get consensus job status and aggregated results including individual evaluator verdicts and final consensus outcome.

POST/staking/registerAuth Required

Register as an evaluator and stake $EVAL tokens. Higher stake signals greater verification reliability and unlocks priority job access.

Request Body

FieldTypeDescription
stake_amountnumber requiredAmount of $EVAL to stake
specialtiesarray optionalList of evaluation specialties
tx_hashstring optionalOn-chain staking transaction hash